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_available_resource periodic runs between those times on the dest host and we hit the NoneType error. As seen from the logs:
Oct 21 13:35:16.757137 ubuntu-bionic-rax-iad-0012404623 nova-compute[26938]: DEBUG nova.compute.resource_tracker [None req-dd5ddbad-4234-4288-bbab-2c3d20b7f4ad None None] [instance: cd4148a2-4550-4e83-b6f7-c91752eaf779] Starting to track incoming migration 407fd025-e8ba-4012-ade7-d0255d2a1837 with flavor 42 {{(pid=26938) _update_usage_from_migration /opt/stack/new/nova/nova/compute/resource_tracker.py:1337}}
...
Oct 21 13:35:16.977968 ubuntu-bionic-rax-iad-0012404623 nova-compute[26938]: ERROR nova.compute.manager [None req-dd5ddbad-4234-4288-bbab-2c3d20b7f4ad None None] Error updating resources for node ubuntu-bionic-rax-iad-0012404623.: TypeError: argument of type 'NoneType' is not iterable
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_ available_ resource periodic runs between those times on the dest host and we hit the NoneType error. As seen from the logs:
Oct 21 13:35:16.757137 ubuntu- bionic- rax-iad- 0012404623 nova-compute[ 26938]: DEBUG nova.compute. resource_ tracker [None req-dd5ddbad- 4234-4288- bbab-2c3d20b7f4 ad None None] [instance: cd4148a2- 4550-4e83- b6f7-c91752eaf7 79] Starting to track incoming migration 407fd025- e8ba-4012- ade7-d0255d2a18 37 with flavor 42 {{(pid=26938) _update_ usage_from_ migration /opt/stack/ new/nova/ nova/compute/ resource_ tracker. py:1337} }
...
Oct 21 13:35:16.977968 ubuntu- bionic- rax-iad- 0012404623 nova-compute[ 26938]: ERROR nova.compute. manager [None req-dd5ddbad- 4234-4288- bbab-2c3d20b7f4 ad None None] Error updating resources for node ubuntu- bionic- rax-iad- 0012404623. : TypeError: argument of type 'NoneType' is not iterable