seed ISO network changes fails to function
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 19.04 with cloud-init 19
This is a local system while building an Ubuntu VM to eventually port to AWS, so internal systems.
[Eventually meta-data will be provided from the network as they do, but initially the seed.iso is the first layer to begin learning and developing for cloud-init.]
I tried many things for many days and could easily get the meta-data local-hostname to work.
This proves the system was correctly building and reading the cloud-init ISO mounting in VirtualBox as a seed.iso with files meta-data, user-data, and included network-config as the spec says should work.
Obviously the meta-data worked to change the local hostname. The 'user-data' file also worked as I will describe but network-config and the various methods of setting network info in meta-data, etc. failed to make any network changes to the booting system.
The first mystery I sold in this overly complected design in the end led to a hacky solution.
This is how the file /etc/cloud/
It would seem the file in /etc/netplan/
In case that is to be overrideen by seed.iso I tried disabling as recommended 99-disable-
I learned the only and best cloud-init way to get it to actually write those changes is reflected in the hacky solution I now depend on to be able to set this via a seed.iso.
Over write the file 50-curtin-
This only works in the user-data file in the seed.iso mounted by VirtualBox during startup if it already has run cloud-init clean --logs so it does qualify as first run for these settings.
write_files:
- path: /etc/cloud/
permissions: 0644
owner: root
content: |
network:
version: 2
runcmd:
- echo "Restarting cloud-init Local (networking)"
- cloud-init clean --logs
- cloud-init init --local
- netplan apply
I would expect the seed.iso to over ride all other settings and become permanent and not need to be told to 'clean' so it should allow you to change it's IP and other settings at boot (regardless of first-boot), it is acceptable that the image has been issued a clean before shutdown prior to subsequent repeated scaling launches.
Note: it will be important to enable IPv4 and IPv6 addresses for each CPU on the Virtual device.
Anyway instead of going over the days of toil (path of discovery) I can assure many comprehensive attempts where tried before arrive at this only hacky solution.
It needs looking into. I will attempt to explain what was tried and report back to any suggestions of how this is suppose to be done if I misunderstood and so if that's not already documented there is at minimum a problem on that level.
Hello!
Thanks for using cloud-init, and for filing this bug. It's not totally clear to me how I could reproduce the issue you're seeing. Could you give a clear list of reproduction steps, the actual behaviour you observe, the behaviour you would _expect_ to observe, and the tarball produced by `cloud-init collect-logs` on a failing instance, please?
Thanks!
Dan