Our current `attachment_delete` methods in the volume API and the
manager are using DB methods directly, which makes the OVOs present in
those methods get out of sync with the latest data, which leads to
notifications having the wrong data when we send them on volume detach.
This patch replaces DB method calls with OVO calls and moves the
notification call to the end of the method, where we have the final
status on the volume.
It also adds the missing detach.start notification when deleting an
attachment in the reserved state.
Closes-Bug: #1916980
Closes-Bug: #1935011
Change-Id: Ie48cf55deacd08e7716201dac00ede8d57e6632f
(cherry picked from commit 68d49445778ef486e3ff656929405ab270a5a65d)
Conflicts: cinder/volume/api.py
Changes: cinder/volume/manager.py
(cherry picked from commit c0197c6f1ad13e3a63615ceb667a53d3bbca2d77)
Reviewed: https:/ /review. opendev. org/c/openstack /cinder/ +/818883 /opendev. org/openstack/ cinder/ commit/ ed06fc7452699d7 6c22b288e1cc8e8 bc2afa1849
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit ed06fc7452699d7 6c22b288e1cc8e8 bc2afa1849
Author: Gorka Eguileor <email address hidden>
Date: Fri Jul 2 15:11:53 2021 +0200
Fix detach notification
Our current `attachment_delete` methods in the volume API and the
manager are using DB methods directly, which makes the OVOs present in
those methods get out of sync with the latest data, which leads to
notifications having the wrong data when we send them on volume detach.
This patch replaces DB method calls with OVO calls and moves the
notification call to the end of the method, where we have the final
status on the volume.
It also adds the missing detach.start notification when deleting an
attachment in the reserved state.
Closes-Bug: #1916980 e7716201dac00ed e8d57e6632f 6e3ff656929405a b270a5a65d)
cinder/ volume/ api.py
cinder/ volume/ manager. py a63615ceb667a53 d3bbca2d77)
Closes-Bug: #1935011
Change-Id: Ie48cf55deacd08
(cherry picked from commit 68d49445778ef48
Conflicts:
Changes:
(cherry picked from commit c0197c6f1ad13e3