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.
Reviewed: https:/ /review. opendev. org/c/openstack /cinder/ +/824976 /opendev. org/openstack/ cinder/ commit/ c0197c6f1ad13e3 a63615ceb667a53 d3bbca2d77
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit c0197c6f1ad13e3 a63615ceb667a53 d3bbca2d77
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)
Closes-Bug: #1935011
Change-Id: Ie48cf55deacd08
(cherry picked from commit 68d49445778ef48