reproduce:
1. Create multiple vms
2. Create a multiattach volume
3. Attach the volume to all vms
4. Shut down all vms and migrate all vms at the same time
5. It is possible to find that a vm migration failed
The nova-compute log is as follows:
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [req-95d6268a-95eb-4ea2-98e0-a9e973b8f19c cb6c975e503c4b1ca741f64a42d09d50 68dd5eeecb434da0aa5ebcdda19a8db6 - default default] [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] Setting instance vm_state to ERROR: nova.exception.InvalidInput: Invalid input received: Invalid volume: Volume e269257b-831e-4be0-a1e6-fbb2aac922a6 status must be available or in-use or downloading to reserve, but the current status is attaching. (HTTP 400) (Request-ID: req-3515d919-aee2-40f4-887e-d5abb34a9d2e)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] Traceback (most recent call last):
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/nova/volume/cinder.py", line 396, in wrapper
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] res = method(self, ctx, *args, **kwargs)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/nova/volume/cinder.py", line 432, in wrapper
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] res = method(self, ctx, volume_id, *args, **kwargs)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/nova/volume/cinder.py", line 807, in attachment_create
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] instance_uuid=instance_id)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/oslo_utils/excutils.py", line 227, in __exit__
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] self.force_reraise()
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/oslo_utils/excutils.py", line 200, in force_reraise
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] raise self.value
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/nova/volume/cinder.py", line 795, in attachment_create
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] volume_id, _connector, instance_id)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/cinderclient/api_versions.py", line 423, in substitution
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] return method.func(obj, *args, **kwargs)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/cinderclient/v3/attachments.py", line 39, in create
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] retval = self._create('/attachments', body, 'attachment')
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/cinderclient/base.py", line 300, in _create
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] resp, body = self.api.client.post(url, body=body)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/cinderclient/client.py", line 217, in post
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] return self._cs_request(url, 'POST', **kwargs)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/cinderclient/client.py", line 205, in _cs_request
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] return self.request(url, method, **kwargs)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] File "/usr/local/lib/python3.6/site-packages/cinderclient/client.py", line 191, in request
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] raise exceptions.from_response(resp, body)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] cinderclient.exceptions.BadRequest: Invalidvolume: Volume e269257b-831e-4be0-a1e6-fbb2aac922a6 status must be available or in-use or downloading to reserve, but the current status is attaching. (HTTP 400) (Request-ID: req-3515d919-aee2-40f4-887e-d5abb34a9d2e)
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d]
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d] During handling of the above exception, another exception occurred:
2022-04-11 16:49:46.685 23871 ERROR nova.compute.manager [instance: 17fc694e-284a-43f0-b6c6-c640a02db23d]
reproduce:
1. Create multiple vms
2. Create a multiattach volume
3. Attach the volume to all vms
4. Shut down all vms and migrate all vms at the same time
5. It is possible to find that a vm migration failed
The nova-compute log is as follows: manager [req-95d6268a- 95eb-4ea2- 98e0-a9e973b8f1 9c cb6c975e503c4b1 ca741f64a42d09d 50 68dd5eeecb434da 0aa5ebcdda19a8d b6 - default default] [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] Setting instance vm_state to ERROR: nova.exception. InvalidInput: Invalid input received: Invalid volume: Volume e269257b- 831e-4be0- a1e6-fbb2aac922 a6 status must be available or in-use or downloading to reserve, but the current status is attaching. (HTTP 400) (Request-ID: req-3515d919- aee2-40f4- 887e-d5abb34a9d 2e) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] Traceback (most recent call last): manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ nova/volume/ cinder. py", line 396, in wrapper manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] res = method(self, ctx, *args, **kwargs) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ nova/volume/ cinder. py", line 432, in wrapper manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] res = method(self, ctx, volume_id, *args, **kwargs) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ nova/volume/ cinder. py", line 807, in attachment_create manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] instance_ uuid=instance_ id) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ oslo_utils/ excutils. py", line 227, in __exit__ manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] self.force_ reraise( ) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ oslo_utils/ excutils. py", line 200, in force_reraise manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] raise self.value manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ nova/volume/ cinder. py", line 795, in attachment_create manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] volume_id, _connector, instance_id) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ cinderclient/ api_versions. py", line 423, in substitution manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] return method.func(obj, *args, **kwargs) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ cinderclient/ v3/attachments. py", line 39, in create manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] retval = self._create( '/attachments' , body, 'attachment') manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ cinderclient/ base.py" , line 300, in _create manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] resp, body = self.api. client. post(url, body=body) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ cinderclient/ client. py", line 217, in post manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] return self._cs_ request( url, 'POST', **kwargs) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ cinderclient/ client. py", line 205, in _cs_request manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] return self.request(url, method, **kwargs) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] File "/usr/local/ lib/python3. 6/site- packages/ cinderclient/ client. py", line 191, in request manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] raise exceptions. from_response( resp, body) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] cinderclient. exceptions. BadRequest: Invalidvolume: Volume e269257b- 831e-4be0- a1e6-fbb2aac922 a6 status must be available or in-use or downloading to reserve, but the current status is attaching. (HTTP 400) (Request-ID: req-3515d919- aee2-40f4- 887e-d5abb34a9d 2e) manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d] During handling of the above exception, another exception occurred: manager [instance: 17fc694e- 284a-43f0- b6c6-c640a02db2 3d]
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.
2022-04-11 16:49:46.685 23871 ERROR nova.compute.