Hi sutefun,

Thanks for the details!  So the issue here is that cloud-init only
generates network configuration at first boot for OpenStack instances.
So it's generating configuration that is tied to the MAC of your first
network interface, which you then remove.  As a result, the system ends
up with no configured network interfaces on the next boot.

To work around this, I would suggest either modifying your network
configuration before reboot (with netplan on Ubuntu, you should be able
to relax the match clause in the cloud-init file in /etc/netplan/), or
attaching the new network interface before reboot, so that you can
configure it exactly.

>From a longer term cloud-init POV, I see a couple of things we could do
to improve this: (a) add a way for users to indicate that they would
like network configuration regenerated every boot (or perhaps at just
the next boot) which would override the data source setting, and/or (b)
detect when the fallback configuration that was previously generated is
no longer applicable (e.g. in this case, the MAC address it specifies is
gone) and regenerate network configuration regardless of boot status in
that situation.


Thanks,

Dan

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1841582

Title:
  Interface detach and attach does not work with CentOS 7 and Ubuntu
  18.04 cloud images

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1841582/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to