Error 500 trying to migrate an instance after wrong request_spec
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Matt Riedemann | ||
Ocata |
Fix Committed
|
High
|
Matt Riedemann | ||
Pike |
Fix Released
|
High
|
Matt Riedemann | ||
Queens |
Fix Committed
|
High
|
Matt Riedemann | ||
Rocky |
Fix Committed
|
High
|
Matt Riedemann | ||
Stein |
Fix Committed
|
High
|
Matt Riedemann |
Bug Description
We've started an instance last Wednesday, and the compute where it ran failed (maybe hardware issue?). Since the networking looked wrong (ie: missing network interfaces), I tried to migrate the instance.
According to Matt, it looked like the request_spec entry for the instance is wrong:
<mriedem> my guess is something like this happened: 1. create server in a group, 2. cold migrate the server which fails on host A and does a reschedule to host B which maybe also fails (would be good to know if previous cold migration attempts failed with reschedules), 3. try to cold migrate again which fails with the instance_group.uuid thing
<mriedem> the reschedule might be the key b/c like i said conductor has to rebuild a request spec and i think that's probably where we're doing a partial build of the request spec but missing the group uuid
Here's what I had in my novaapidb:
{
"nova_
"nova_
"nova_
"ignore_hosts": null,
"requested_
"instance_
"num_
"image": {
"
"
"
"min_disk": 40,
"min_ram": 0,
}
},
"
"
"min_ram",
"min_disk"
]
},
"availabili
"flavor": {
"
"
"
"id": 28,
"name": "cpu2-ram6-disk40",
"root_gb": 40,
"vcpus": 2,
"disabled": false,
"flavorid": "e29f3ee9-
"deleted": false,
"swap": 0,
},
"
},
"force_hosts": null,
"retry": null,
"instance_
"
"
"
"members": null,
"hosts": null,
"policy": "anti-affinity"
},
"
"
"policy",
"members",
"hosts"
]
},
"scheduler_
"group": [
]
},
"limits": {
"
"
"
"disk_gb": null,
"vcpu": null
},
"
"
"disk_gb",
"vcpu",
]
},
"force_nodes": null,
"project_id": "1bf4dbb3d2c746
"user_id": "255cca4584c24b
"numa_
"is_bfv": false,
"pci_requests": {
"
"
"
"requests": []
},
"
}
},
"nova_
"nova_
"ignore_hosts",
"requested_
"num_
"image",
"availabili
"instance_
"flavor",
"scheduler_
"pci_requests",
"instance_
"limits",
"project_id",
"user_id",
"numa_
"is_bfv",
"retry"
]
}
This is the error by the way:
http:// paste.openstack .org/show/ 752159/
2019-05-28 13:40:16.610 159865 ERROR nova.api. openstack. wsgi [req-1ca4c1d0- 9f6f-4a04- 860d-1d3d03a0d0 63 9fb4630d74ad49e 8ac9f4e8a72b8ca fb 504ea0a356ca406 6aaa617daff8694 63 - default default] Unexpected exception in API method: nova.exception. ObjectActionErr or: Object action obj_load_attr failed because: unable to load uuid openstack. wsgi Traceback (most recent call last): openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/api/ openstack/ wsgi.py" , line 801, in wrapped openstack. wsgi return f(*args, **kwargs) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/api/ validation/ __init_ _.py", line 110, in wrapper openstack. wsgi return func(*args, **kwargs) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/api/ openstack/ compute/ migrate_ server. py", line 56, in _migrate openstack. wsgi host_name= host_name) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/compute/ api.py" , line 205, in inner openstack. wsgi return function(self, context, instance, *args, **kwargs) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/compute/ api.py" , line 213, in _wrapped openstack. wsgi return fn(self, context, instance, *args, **kwargs) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/compute/ api.py" , line 153, in inner openstack. wsgi return f(self, context, instance, *args, **kw) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/compute/ api.py" , line 3516, in resize openstack. wsgi context, instance.uuid) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ oslo_versionedo bjects/ base.py" , line 184, in wrapper openstack. wsgi result = fn(cls, context, *args, **kwargs) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/objects/ request_ spec.py" , line 531, in get_by_ instance_ uuid openstack. wsgi return cls._from_ db_object( context, cls(), db_spec) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ nova/objects/ request_ spec.py" , line 510, in _from_db_object openstack. wsgi context, spec.instance_ group.uuid) openstack. wsgi File "/usr/lib/ python3/ dist-packages/ oslo_versionedo bjects/ base.py" , line 67, in getter
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
2019-05-28 13:40:16.610 159865 ERROR nova.api.
20...