Comment 5 for bug 1587285

Revision history for this message
Rikimaru Honjo (honjo-rikimaru-c6) wrote :

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.

-------------------------------------------------------
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 9783d39..948a02e 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
    def _build_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)
+ import pdb;pdb.set_trace()
                 with self._build_resources(context, instance,
                         requested_networks, security_groups, image_meta,
                         block_device_mapping) as resources:

-------------------------------------------------------

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"!