diff options
author | whoami-rajat <rajatdhasmana@gmail.com> | 2021-11-26 04:35:00 -0500 |
---|---|---|
committer | Rajat Dhasmana <rajatdhasmana@gmail.com> | 2022-01-03 02:38:14 -0500 |
commit | e1ced9ea312d386416c486176fd5feed102702c3 (patch) | |
tree | 0a65b13891a27fe614357675b9d12f07ceed2b3d /glance_store/tests | |
parent | 395f792358d18b858b9c280e0896fb4d4bc3a38f (diff) | |
download | glance_store-e1ced9ea312d386416c486176fd5feed102702c3.tar.gz |
Correct attachment_complete call
Cinder's attachment_complete API is called to mark the volume from
"attaching" state to "in-use" state stating that the volume is
ready to use.
In the current code, attachment_complete is called before the
brick connection is complete. This should be done after the
connection to brick is successful and we have a volume path
to write the image into. This patch corrects the behavior.
The wrong sequence of execution won't have any issues functionally
since we open the volume after all steps are completed but flow
wise it is incorrect.
This change won't have any end user impact.
Change-Id: Ia9652a4ff6d7efbabb58511f0ce93a87b3a4dfa8
Diffstat (limited to 'glance_store/tests')
-rw-r--r-- | glance_store/tests/unit/test_cinder_store.py | 2 | ||||
-rw-r--r-- | glance_store/tests/unit/test_multistore_cinder.py | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/glance_store/tests/unit/test_cinder_store.py b/glance_store/tests/unit/test_cinder_store.py index 437cfa0..9283312 100644 --- a/glance_store/tests/unit/test_cinder_store.py +++ b/glance_store/tests/unit/test_cinder_store.py @@ -279,8 +279,6 @@ class TestCinderStore(base.StoreBaseTest, attach_update.assert_called_once_with( fake_client, fake_attachment_id, fake_conn_info, mountpoint='glance_store') - attach_complete.assert_called_once_with( - fake_client, fake_attachment_id) attach_delete.assert_called_once_with( fake_client, fake_attachment_id) diff --git a/glance_store/tests/unit/test_multistore_cinder.py b/glance_store/tests/unit/test_multistore_cinder.py index 167b379..a57e198 100644 --- a/glance_store/tests/unit/test_multistore_cinder.py +++ b/glance_store/tests/unit/test_multistore_cinder.py @@ -312,8 +312,6 @@ class TestMultiCinderStore(base.MultiStoreBaseTest, attach_update.assert_called_once_with( fake_client, fake_attachment_id, fake_conn_info, mountpoint='glance_store') - attach_complete.assert_called_once_with( - fake_client, fake_attachment_id) attach_delete.assert_called_once_with( fake_client, fake_attachment_id) |