Owner metadata is missing when regenerating libvirt XML after host reboot

Bug #1524363 reported by Simon Pasquier
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Low
Tardis Xu

Bug Description

Environment:

devstack running OpenStack from master.

Steps to reproduce:

1. Make sure that resume_guests_state_on_host_boot=True in nova.conf.
2. Boot an instance.
3. Check that the libvirt XML contains a nova:owner element with the project and user ids [1].
4. Stop the nova-compute service.
5. Destroy the instance using virsh. This is to simulate the reboot of the host.
6. Restart the nova-compute service.
7. Check that the instance is respawned.

Expected result:

The project id and user id are still present in the libvirt XML.

Actual result:

The project id and user id are missing [2].

[1] http://paste.openstack.org/show/481314/
[2] http://paste.openstack.org/show/481315/

Tardis Xu (xiaoxubeii)
Changed in nova:
status: New → Confirmed
assignee: nobody → Tardis Xu (xiaoxubeii)
importance: Undecided → Medium
Tardis Xu (xiaoxubeii)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Tardis Xu (xiaoxubeii) wrote :

The problem is in virt/libvirt/driver.py, _get_guest_config_meta, it gets the nova owner meta from current context. But if the instance is booted when host up, the context is admin. I think we can add the identity cache to instance like network info. If this, we must change the db table. So I think we should implement it as a bp not a bug.

Changed in nova:
status: In Progress → Opinion
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.