yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76408
[Bug 1759924] Re: Port device owner isn't updated with new host availability zone during unshelve
Reviewed: https://review.openstack.org/559828
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=93802619adde69bf84d26d7231480abb4da07c91
Submitter: Zuul
Branch: master
commit 93802619adde69bf84d26d7231480abb4da07c91
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Mon Apr 9 16:12:19 2018 -0400
Update port device_owner when unshelving
When we shelve offload an instance, we unplug VIFs, delete
the guest from the compute host, etc. The instance is still
logically attached to its ports but they aren't connected
on any host.
When we unshelve an instance, it is scheduled and created
on a potentially new host, in a potentially new availability
zone. During unshelve, the compute manager will call the
setup_instance_network_on_host() method to update the port
host binding information for the new host, but was not
updating the device_owner, which reflects the availability
zone that the instance is in. Because of this, an instance
can be created in az1, shelved, and then unshelved in az2
but the port device_owner still says az1 even though the
port host binding is for a compute host in az2.
This change simply updates the port device_owner when
updating the port binding host during unshelve.
A TODO is left in the cleanup_instance_network_on_host()
method which is called during shelve offload but is currently
not implemented. We should unbind ports when shelve offloading,
but that is a bit of a bigger change and left for a separate
patch since it is not technically needed for this bug fix.
Change-Id: Ibd1cbe0e9b5cf3ede542dbf62b1a7d503ba7ea06
Closes-Bug: #1759924
** 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/1759924
Title:
Port device owner isn't updated with new host availability zone during
unshelve
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) ocata series:
Triaged
Status in OpenStack Compute (nova) pike series:
In Progress
Status in OpenStack Compute (nova) queens series:
In Progress
Status in OpenStack Compute (nova) rocky series:
In Progress
Bug description:
During an unshelve the host for an instance and therefor the
availability zone may change but does not seem to updated in the
port's device_owner causing problems with server action add fixed ip
for example.
In nova/network/neutronv2/api.py _update_port_binding_for_instance should probably update the port's device_owner the same way that _update_ports_for_instance does.
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | UP |
| allowed_address_pairs | |
| binding_host_id | r02c4b15 |
| binding_profile | |
| binding_vif_details | port_filter='True' |
| binding_vif_type | bridge |
| binding_vnic_type | normal |
| created_at | 2018-03-05T13:25:48Z |
| data_plane_status | None |
| description | |
| device_id | 53f04bf3-eb1f-4c64-a70f-fd16d6c1a5af |
| device_owner | compute:zone-r7 |
| dns_assignment | |
| dns_name | instance-w-volume-shelving-test |
| extra_dhcp_opts | |
| fixed_ips | |
| id | 327b891f-1820-4aa9-bbc3-fe9cc619eac3 |
| ip_address | None |
| mac_address | fa:16:3e:14:21:d1 |
| name | |
| network_id | e73b1699-0129-4c12-b722-e6ce52604824 |
| option_name | None |
| option_value | None |
| port_security_enabled | False |
| project_id | ecf32b152563403bbde297f58f4637d4 |
| qos_policy_id | None |
| revision_number | 19 |
| security_group_ids | bb25a73a-a62e-4015-9595-16add6b7d3a0 |
| status | ACTIVE |
| subnet_id | None |
| tags | |
| trunk_details | None |
| updated_at | 2018-03-28T20:03:23Z |
+-----------------------+--------------------------------------+
nova show 53f04bf3-eb1f-4c64-a70f-fd16d6c1a5af
+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | zone-r2 |
| OS-EXT-SRV-ATTR:host | r02c4b15 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | r02c4b15
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1759924/+subscriptions
References