_populate_assigned_resources raises "TypeError: argument of type 'NoneType' is not iterable" during active migration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
High
|
Eric Fried | ||
| Train |
High
|
Eric Fried |
Bug Description
Seen here:
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
Oct 21 13:35:16.977968 ubuntu-
This was added late in Train:
Matt Riedemann (mriedem) wrote : | #1 |
summary: |
- _populate_assigned_resources raises TypeError: argument of type - 'NoneType' is not iterable + _populate_assigned_resources raises "TypeError: argument of type + 'NoneType' is not iterable" during active migration |
Changed in nova: | |
status: | New → Confirmed |
Matt Riedemann (mriedem) wrote : | #2 |
This doesn't appear to cause any failures since it's probably a separate update_
Matt Riedemann (mriedem) wrote : | #3 |
I think what happens here is the RT is running on the dest host and tracking the incoming migration before the claim is made which creates the migration_context in the DB. The migration record is created in the control plane but the claim happens in the compute, so we can have a race where resource tracker's update_
Oct 21 13:35:16.757137 ubuntu-
...
Oct 21 13:35:16.977968 ubuntu-
Fix proposed to branch: master
Review: https:/
Changed in nova: | |
assignee: | nobody → Eric Fried (efried) |
status: | Confirmed → In Progress |
Related fix proposed to branch: master
Review: https:/
Eric Fried (efried) wrote : | #6 |
> This doesn't appear to cause any failures since it's probably a separate
> update_
> on the next opportunity and is resolved
So is this still "High"?
Eric Fried (efried) wrote : | #7 |
Regression test: https:/
(I created that review with the Related-Bug tag; why didn't it show up here?)
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit 761be5d0cb36433
Author: Eric Fried <email address hidden>
Date: Mon Oct 21 12:18:10 2019 -0500
Func: bug 1849165: mig race with _populate_
Add a functional regression test for the referenced bug:
If a migration is initiated, and update_
destination between when the migration record is associated with the
destination and when the migration context is added to the instance, it
will raise a TypeError attempting to _populate_
that instance, because that method attempts to access the
(as-
Note that this doesn't fail the migration; it just leaves ugly logs. In
real life it probably also leaves other pieces of
update_
Related-Bug: #1849165
Change-Id: I7e96cd24049c20
Related fix proposed to branch: stable/train
Review: https:/
Fix proposed to branch: stable/train
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit 80385a22ee480a4
Author: Eric Fried <email address hidden>
Date: Mon Oct 21 11:50:25 2019 -0500
Don't populate resources for not-yet-migrated inst
Per the referenced bug, it is possible for update_
race with a migration such that the migration record exists, but the
instance's migration context doesn't. In such cases we shouldn't try to
track the instance's assigned resources on this host (because there
aren't any yet).
Change-Id: I69f99adfa8c91b
Closes-Bug: #1849165
Changed in nova: | |
status: | In Progress → Fix Released |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 91a2056d526dd07
Author: Eric Fried <email address hidden>
Date: Mon Oct 21 12:18:10 2019 -0500
Func: bug 1849165: mig race with _populate_
Add a functional regression test for the referenced bug:
If a migration is initiated, and update_
destination between when the migration record is associated with the
destination and when the migration context is added to the instance, it
will raise a TypeError attempting to _populate_
that instance, because that method attempts to access the
(as-
Note that this doesn't fail the migration; it just leaves ugly logs. In
real life it probably also leaves other pieces of
update_
Related-Bug: #1849165
Change-Id: I7e96cd24049c20
(cherry picked from commit 761be5d0cb36433
tags: | added: in-stable-train |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 1a7be0d62e0b532
Author: Eric Fried <email address hidden>
Date: Mon Oct 21 11:50:25 2019 -0500
Don't populate resources for not-yet-migrated inst
Per the referenced bug, it is possible for update_
race with a migration such that the migration record exists, but the
instance's migration context doesn't. In such cases we shouldn't try to
track the instance's assigned resources on this host (because there
aren't any yet).
Change-Id: I69f99adfa8c91b
Closes-Bug: #1849165
(cherry picked from commit 80385a22ee480a4
This issue was fixed in the openstack/nova 20.0.1 release.
http:// logstash. openstack. org/#dashboard/ file/logstash. json?query= message% 3A%5C%22if% 20mig.dest_ compute% 20%3D%3D% 20self. host%20and% 20'new_ resources' %20in%20mig_ ctx%3A% 5C%22%20AND% 20tags% 3A%5C%22screen- n-cpu.txt% 5C%22&from= 7d