nova-multi-cell fails on stable branches with: Failed to compute_task_migrate_server: 'NoneType' object has no attribute 'version'

Bug #1907511 reported by melanie witt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned
Ussuri
Fix Released
Undecided
Balazs Gibizer
Victoria
Fix Released
Undecided
melanie witt

Bug Description

When we get a request to migrate a server that has minimum bandwidth
resource requests, we check whether the service on the target host is
new enough to support resource requests. However, we are not targeting
the target host's cell database when we do the lookup. This works OK
when the migration is occuring within the same cell, but if the target
host is in another cell, we will fail to lookup the service record in
the source cell with the following error [1]:

  Failed to compute_task_migrate_server: 'NoneType' object has no
  attribute 'version'

This is because when Service.get_by_host_and_binary fails to find a
matching record, it returns (and thus returns None).

This failure has recently emerged in the nova-multi-cell gate job
because tempest tests were recently added for minimum bandwidth
resource requests in change:

https://review.opendev.org/c/openstack/tempest/+/694539

and these tests include migration tests.

To fix this, we just need to target the cell database for the target
host's service record when we lookup the service.

This change is stable-only because the service version check was
recently removed in change:

https://review.opendev.org/c/openstack/nova/+/735570

and only exists in stable branches.

[1] https://zuul.opendev.org/t/openstack/build/2ee6a4a30c8f403b911386a6cd80fc51/log/controller/logs/screen-n-super-cond.txt#3778

Revision history for this message
melanie witt (melwitt) wrote :

Bug doesn't exist on master branch.

tags: added: gate-failure
Changed in nova:
assignee: melanie witt (melwitt) → nobody
status: New → Invalid
Revision history for this message
melanie witt (melwitt) wrote :
Revision history for this message
melanie witt (melwitt) wrote :
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

A gate unblocking patch has been proposed to avoid this failure in https://review.opendev.org/c/openstack/nova/+/765749

I will mark this bug closed for victoria once https://review.opendev.org/c/openstack/nova/+/765749 lands and keep handling the issue as part of the more generic bug https://bugs.launchpad.net/nova/+bug/1907522

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

https://review.opendev.org/c/openstack/nova/+/765749 has been merged so closing this for victoria

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

To further explain the closure of this bug.

There are two open bugs for the same root case. This and https://bugs.launchpad.net/nova/+bug/1907522
The fix https://review.opendev.org/c/openstack/nova/+/766925 proposed for https://bugs.launchpad.net/nova/+bug/1907522 will be backported to stable branches and it will make this bug disappear too. So I'm closing this bug and tracking the progress in https://bugs.launchpad.net/nova/+bug/1907522 instead.

Revision history for this message
melanie witt (melwitt) wrote :

Adding a comment with the explanation as to why we will not ever fix cell targeting for migrations with qos ports on stable/victoria:

We are going to disallow cross-cell migrations for instances with qos ports:

https://review.opendev.org/c/openstack/nova/+/766925

and backport it, so cell targeting will not be necessary as the code will never be reached.

When I opened this bug, I had thought there was simply a bug in cross-cell migrations for instances with qos ports, but it turned out that support was never added. So it was more a lack of a feature than it was a bug.

For this reason, cross-cell migration support will be added on the master branch as a feature and stable branches will remain without cross-cell migration support. As such, the cell targeting bug opened here is invalidated.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 22.1.0

This issue was fixed in the openstack/nova 22.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 21.2.0

This issue was fixed in the openstack/nova 21.2.0 release.

information type: Public → Private Security
information type: Private Security → Private
Changed in nova:
status: Invalid → Confirmed
status: Confirmed → Fix Released
information type: Private → Public
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.