nova libvirt xml generate wrong metadata
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. login as demo/demo
2. boot a instance
3. virsh dumpxml <instance>, view metadata:
<nova:owner>
<nova:user uuid="<
</nova:owner>
4. login as admin/admin
5. hard boot the instance
6. virsh dumpxml <instance>, view metadata:
<nova:owner>
<nova:user uuid="<
</nova:owner>
Expected result:
The project and user metadata cannot get from current context.
Actual result:
The project and user metadata all get from current context.
Changed in nova: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Tardis Xu (xiaoxubeii) |
tags: | added: compute |
tags: | added: libvirt xml |
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 rebooted as other context, it will go wrong. 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.