3. Launch "VM-A" without volume.
Please wait until "VM-A"'s status is changed to "ACTIVE".
4. Launch "VM-B" with "volume-A".
(Please specify "block-device-mapping" option.)
5. Kill nova-compute process while that is stopped by break-point.
(Use "kill" command. This is instead of unexpected disaster.)
After killing, please restart nova-compute.
6. "VM-B"'s status is changed to "ERROR" from "BUILD" as a result.
"Volume-A"'s status is still "available".
7. Attach "volume-A" to "VM-A" by volume-attach API.
8. Volume-attach API is completed.
"volume-A"'s status is changed to "in-use" from "available".
9. Delete "VM-B".
10. Deleting "VM-B" is completed.
And "volume-A"'s status is changed to "available" from "in-use"!
Even "volume-A" is still attached to "VM-A"!
I wrote another reproduce steps.
This is easier than above procedures.
1. Create a volume named "volume-A".
2. Add following break-point to nova-compute.
And, Please restart nova-compute.
------- ------- ------- ------- ------- ------- ------- ------ compute/ manager. py b/nova/ compute/ manager. py compute/ manager. py compute/ manager. py and_run_ instance( self, context, instance, image, injected_files,
admin_ password, requested_networks, security_groups,
block_ device_ mapping, node, limits, filter_properties):
self. _validate_ instance_ group_policy( context, instance,
filter_ properties)
image_ meta = objects. ImageMeta. from_dict( image)
with self._build_ resources( context, instance,
requested_ networks, security_groups, image_meta,
block_ device_ mapping) as resources:
diff --git a/nova/
index 9783d39..948a02e 100644
--- a/nova/
+++ b/nova/
def _build_
[...]
+ import pdb;pdb.set_trace()
------- ------- ------- ------- ------- ------- ------- ------
3. Launch "VM-A" without volume.
Please wait until "VM-A"'s status is changed to "ACTIVE".
4. Launch "VM-B" with "volume-A". device- mapping" option.)
(Please specify "block-
5. Kill nova-compute process while that is stopped by break-point.
(Use "kill" command. This is instead of unexpected disaster.)
After killing, please restart nova-compute.
6. "VM-B"'s status is changed to "ERROR" from "BUILD" as a result.
"Volume-A"'s status is still "available".
7. Attach "volume-A" to "VM-A" by volume-attach API.
8. Volume-attach API is completed.
"volume-A"'s status is changed to "in-use" from "available".
9. Delete "VM-B".
10. Deleting "VM-B" is completed.
And "volume-A"'s status is changed to "available" from "in-use"!
Even "volume-A" is still attached to "VM-A"!