diff options
Diffstat (limited to 'glance_store')
-rw-r--r-- | glance_store/_drivers/cinder/base.py | 3 | ||||
-rw-r--r-- | glance_store/tests/unit/cinder/test_base.py | 2 | ||||
-rw-r--r-- | glance_store/tests/unit/cinder/test_cinder_base.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/glance_store/_drivers/cinder/base.py b/glance_store/_drivers/cinder/base.py index 20fb897..26d83f6 100644 --- a/glance_store/_drivers/cinder/base.py +++ b/glance_store/_drivers/cinder/base.py @@ -50,7 +50,8 @@ class BaseBrickConnectorInterface(object): return device def disconnect_volume(self, device): - self.conn.disconnect_volume(self.connection_info, device) + # Bug #2004555: use force so there aren't any leftovers + self.conn.disconnect_volume(self.connection_info, device, force=True) def extend_volume(self): self.conn.extend_volume(self.connection_info) diff --git a/glance_store/tests/unit/cinder/test_base.py b/glance_store/tests/unit/cinder/test_base.py index 488cf1a..7c0add5 100644 --- a/glance_store/tests/unit/cinder/test_base.py +++ b/glance_store/tests/unit/cinder/test_base.py @@ -102,7 +102,7 @@ class TestBaseBrickConnectorInterface(test_base.StoreBaseTest): self.mock_object(self.connector.conn, 'disconnect_volume') self.connector.disconnect_volume(fake_device) self.connector.conn.disconnect_volume.assert_called_once_with( - self.connection_info, fake_device) + self.connection_info, fake_device, force=True) def test_extend_volume(self): self.mock_object(self.connector.conn, 'extend_volume') diff --git a/glance_store/tests/unit/cinder/test_cinder_base.py b/glance_store/tests/unit/cinder/test_cinder_base.py index 922b161..3269de1 100644 --- a/glance_store/tests/unit/cinder/test_cinder_base.py +++ b/glance_store/tests/unit/cinder/test_cinder_base.py @@ -328,7 +328,7 @@ class TestCinderStoreBase(object): fake_connector.connect_volume.assert_called_once_with( mock.ANY) fake_connector.disconnect_volume.assert_called_once_with( - mock.ANY, fake_devinfo) + mock.ANY, fake_devinfo, force=True) fake_conn_obj.assert_called_once_with( mock.ANY, root_helper, conn=mock.ANY, use_multipath=multipath_supported) |