From dcabd6159abcdccd99e55495ec005926465007a8 Mon Sep 17 00:00:00 2001 From: MotoKen Date: Fri, 5 Oct 2012 14:34:32 +0800 Subject: Fix reserve_block_device_name while attach volume The block device name will not be reserved in current implementation due to missing volume_id in block_device_mapping. This will cause block_device.instance_block_mapping does not return the ebs device which should be reserved. This patch adds the volume_id to block_device_mapping while reserving block device name and changes the rpcapi to send the volume_id. Fixes bug 1062033 Change-Id: I8f08b568619fefa99850de0bee7d605749d53b0a --- nova/tests/compute/test_rpcapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py index b0fc9c7c8..c5a5768c5 100644 --- a/nova/tests/compute/test_rpcapi.py +++ b/nova/tests/compute/test_rpcapi.py @@ -228,7 +228,8 @@ class ComputeRpcAPITestCase(test.TestCase): def test_reserve_block_device_name(self): self._test_compute_api('reserve_block_device_name', 'call', - instance=self.fake_instance, device='device') + instance=self.fake_instance, device='device', volume_id='id', + version='2.3') def refresh_provider_fw_rules(self): self._test_compute_api('refresh_provider_fw_rules', 'cast', -- cgit