db: Retrieve VirtualInterface objects by UUID, not address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Low
|
Minghong Hou |
Bug Description
1. I use the method get_by_uuid from VirtualInterface to get the vif of an instance.
vif = objects.
2. I change the 'tag' value in the vif.
3. I use the method vif.save()
Result:
I expect the the tag of my vif would be changed, but actually the LOG information of nova-compute says that 'Nonetype' object has no attribute to 'update'. By pdb check, I find out that the the method in nova/db/
The reason I guess is that when we use the method get_by_uuid, the address would be the mac address, but the address shows in the table of VirtualInterface is 'address/uuid', which causes the virtual_
Changed in nova: | |
assignee: | nobody → Minghong Hou (houmh) |
tags: | added: nova virtualinterface |
Changed in nova: | |
status: | New → In Progress |
summary: |
- VirtualInterface table can't use the default save() to change the table + db: Retrieve VirtualInterface objects by UUID, not address |
Changed in nova: | |
importance: | Undecided → Low |
Related fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /828819
Review: https:/