yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #56034
[Bug 1620845] [NEW] cloud-init-local.service should add Before=NetworkManager
Public bug reported:
When using systemd on CentOS 7/RHEL 7 with cloud-init configured to use
ConfigDrive on OpenStack, cloud-init-local needs to have a line added to
it's unit file that makes sure it gets to finish before NetworkManager
is started.
Before=NetworkManager.service
NetworkManager wants target network.target, currently that means it runs
at the same time as cloud-init-local, which means it will start DHCP and
write /etc/resolv.conf while cloud-init-local is parsing the ConfigDrive
and is writing the appropriate ifcfg-* files.
This causes a race condition with who gets to modify /etc/resolv.conf.
NetworkManager does not take kindly to that race.
When NetworkManager notices the new ifcfg-* files it will turn off DHCP
and mark the interfaces "unmanaged", however it doesn't notice the
change made to /etc/resolv.conf.
Related to the changes made here:
https://code.launchpad.net/~bregeer-ctl/cloud-init/+git/cloud-
init/+merge/305058
If NetworkManager is started after cloud-init-local, then NetworkManager
will correctly see that /etc/resolv.conf is not to be touched by it.
** Affects: cloud-init
Importance: Undecided
Status: New
** Tags: centos rhel
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1620845
Title:
cloud-init-local.service should add Before=NetworkManager
Status in cloud-init:
New
Bug description:
When using systemd on CentOS 7/RHEL 7 with cloud-init configured to
use ConfigDrive on OpenStack, cloud-init-local needs to have a line
added to it's unit file that makes sure it gets to finish before
NetworkManager is started.
Before=NetworkManager.service
NetworkManager wants target network.target, currently that means it
runs at the same time as cloud-init-local, which means it will start
DHCP and write /etc/resolv.conf while cloud-init-local is parsing the
ConfigDrive and is writing the appropriate ifcfg-* files.
This causes a race condition with who gets to modify /etc/resolv.conf.
NetworkManager does not take kindly to that race.
When NetworkManager notices the new ifcfg-* files it will turn off
DHCP and mark the interfaces "unmanaged", however it doesn't notice
the change made to /etc/resolv.conf.
Related to the changes made here:
https://code.launchpad.net/~bregeer-ctl/cloud-init/+git/cloud-
init/+merge/305058
If NetworkManager is started after cloud-init-local, then
NetworkManager will correctly see that /etc/resolv.conf is not to be
touched by it.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1620845/+subscriptions
Follow ups