[pve-devel] [PATCH 0/2] cloud-init v3

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Jun 17 13:02:22 CEST 2015


I'm attaching a second patch to your cloud-init patch, Alexandre.
Here's the summary of the changes:

 * Changing cidr and gatway setting names to ip, ip6, gw,
   gw6, as these are the names we are using for LXC.
 * Adding explicit ip=dhcp and ip6=dhcp options.
 * Removing the config-update code and instead generating
   the ide3 commandline in config_to_command.
   - Adding a conflict check to write_vm_config similar to
   the one for 'cdrom'.
 * Replacing UUID generation with a SHA1 hash of the
   concatenated userdata and network configuration. For this
   generate_cloudinit_userdata/network now returns the
   content variable.
 * Finishing ipv6 support in generate_cloudinit_network.
   Note that ipv4 now only defaults to dhcp if no ipv6
   address was specified. (Explicitly requested  dhcp is
   always used.)

Both the setting renames and UUID changes were requested by Dietmar.
Having consistent setting names make sense, and an explicit dhcp
option when ipv4 and ipv6 can be configured separately is also sort of
required if you want to for instance use dhcp for ipv4 but a fixed
ipv6 address.
(Also, in the container configuration GUI ipv4 and ipv6 are separate
boxes, so it makes sense to use the same layout here once we update
the GUI.)
As for the ide3 change: Rewriting the configuration with an ide3 line
means that you also have to take care to remove it when diabling
cloud-init, also it means a cloudinit cdrom drive appears in the GUI,
but removing it wouldn't be disabling cloudinit. Catching this kind of
settings change to disable cloudinit would be a possibility, but it
seems like a bit too much magic.
So instead, `cloudinit: 1` is considered incompatible with an `ide3:`
line, and behaves like mixing a `cdrom:` and an `ide2:` line

Alexandre Derumier (1):
  implement cloudinit v2

Wolfgang Bumiller (1):
  cloud-init changes

 PVE/QemuServer.pm | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 control.in        |   2 +-
 2 files changed, 210 insertions(+), 4 deletions(-)

-- 
2.1.4





More information about the pve-devel mailing list