yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #80063
[Bug 1835822] Re: vms loose acess to config drive with CONF.force_config_drive=True after hard reboot
Reviewed: https://review.opendev.org/669738
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=641feb62a33e211a3ed1f9a2309ee16d827f5fe2
Submitter: Zuul
Branch: master
commit 641feb62a33e211a3ed1f9a2309ee16d827f5fe2
Author: Sean Mooney <work@xxxxxxxxxxxxxxx>
Date: Mon Jul 8 18:35:11 2019 +0000
make config drives sticky bug 1835822
This change reorders the call in
_update_instance_after_spawn so that we call
configdrive.update_instance before we set
instance.launched_at. This ensures that if the vm
is booted with a config drive because the host had
force_config_drive=true the instance will keep its
config drive across reboots.
This change fixes a regression introduced as part
of fixing bug #1827492 which addressed failing
to boot vms after changing force_config_drive=false
to force_config_drive=true.
Change-Id: I9194423f5f95e9799bd891548e24756131d65e76
Related-Bug: #1827492
Closes-Bug: #1835822
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1835822
Title:
vms loose acess to config drive with CONF.force_config_drive=True
after hard reboot
Status in OpenStack Compute (nova):
Fix Released
Bug description:
The fix to bug https://bugs.launchpad.net/nova/+bug/1827492
https://review.opendev.org/#/c/659703/8
changed the behavior of nova.virt.configdrive.required_by
to depend on instance.launched_at
https://review.opendev.org/#/c/659703/8/nova/virt/configdrive.py@196
but did not reorder
https://github.com/openstack/nova/blob/86524773b8cd3a52c98409c7ca183b4e1873e2b8/nova/compute/manager.py#L1757-L1758
as a result when nova.compute.manager._update_instance_after_spawn
is called instance.launched_at is always set before we call nova.virt.configdrive.update_instance
as a result instance.config_drive will always be set to false if not
set on the api.
this results in a vm that is spawned on a host with force_config_drive=True initally spawning
with a config drive but loosing it after a hard reboot.
for any deployment that uses config driver for vendor data or device
role tagging because they do not deploy the metadata service this is a
regressions as they cannot fall back to the metadta service.
this also might cause issue for deployment that support the deprectated file injection api that is part of the v2.1 api as the files are only stored in the config drive and are not part metadta endoint
note: i have not checked if we autoset instnace.config_drive when you use file injection or not so it may be unaffected since the breakage of the other support uscases is enough to justify this bug.
the fix is simple jsut swap the order of https://github.com/openstack/nova/blob/86524773b8cd3a52c98409c7ca183b4e1873e2b8/nova/compute/manager.py#L1757-L1758
and then instance will have there instnace.config_drive value set correctly when they first boot
and it will be sticky for the lifetime of the instance.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1835822/+subscriptions
References