-
Notifications
You must be signed in to change notification settings - Fork 899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rfc]: Add support for allowing user-defined network configuration at runtime #4764
Comments
Continued from the original comment in a separate issue: #4621 (comment)
You probably want |
Agreed, but in cloud-init the capability already exists to set this (via netplan / networkv2) - it's just not possible for users to set this at runtime. |
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. This script takes care of the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. There is a Python script that fixes the DHCP4 options in the netplan configuration already generated by cloud-init. This cloud-init fragment simply reapplies the Netplan configuration after the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
…onfiguration See these issues for more information: - #300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. This script takes care of the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. There is a Python script that fixes the DHCP4 options in the netplan configuration already generated by cloud-init. This cloud-init fragment simply reapplies the Netplan configuration after the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. This script takes care of the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. There is a Python script that fixes the DHCP4 options in the netplan configuration already generated by cloud-init. This cloud-init fragment simply reapplies the Netplan configuration after the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
…onfiguration See these issues for more information: - #300 - canonical/cloud-init#4764
…onfiguration See these issues for more information: - #300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. This script takes care of the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. There is a Python script that fixes the DHCP4 options in the netplan configuration already generated by cloud-init. This cloud-init fragment simply reapplies the Netplan configuration after the modification. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
The Netplan config is created by cloud-init, but it needs to be slightly modified and reapplied. See these issues for more details: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764
This might be a way to fix #5249. |
How the network is configured today
In many cases, manually configuring an instance's network configuration on boot is unnecessary. This is handled automatically by cloud-init in the following way:
Cloud-init automatically configures the network when a cloud image boots. To accomplish this, it provides a reasonable default network configuration to the system's network manager (systemd-networkd, NetworkManager, netplan, eni, sysconfig, etc).
In some cases, the cloud may request that the network be configured in a specific way at runtime. This allows cloud providers to support a more dynamic network environment. Cloud-init accomplishes this by setting up a temporary network to read a configuration[1] from the cloud's IMDS server. This all happens before the networking manager is started by the init system, so no service restarts or reconfiguration is necessary.
The cloud-provided configuration may be overridden by the user in the base image by modifying
/etc/cloud/cloud.cfg.d/*
, or in the kernel command line. This doesn't, however, allow the user to manually set the network configuration at runtime.More details on network configuration can be found here.
Allowing user-defined network configuration at runtime
Despite cloud-init configuring networking in a way that accomplishes the users' needs in many cases, some users might wish to customize their instance with a configuration at runtime. This might be provided in the same way that users provide cloud-config user-data (perhaps as a new sub-key?).
Such a feature would be quite powerful. It would also be difficult to debug (though some clouds provide a way to "serial console" into the instance for debugging). Since some clouds expect to be able to provide dynamic configuration via cloud metadata, a user that overrides this configuration with a custom one might unexpectedly prevent the cloud from delivering the configuration that is needed to deal with a dynamic network environment. This means that if cloud-init grows the ability to allow users to provide network configuration, this would require that either 1) users are expected to know what they are doing or 2) we provide some safety net, such as the ability for the cloud-provided configuration to (optionally) merge with the user-provided configuration. At a minimum, we would have to document which clouds provide networking configuration.
Example use cases (add more in comments below please)
[1] the configuration formats[1][2] are converted (rendered)
The text was updated successfully, but these errors were encountered: