Use force=True for os-brick disconnect during delete
The 'force' parameter of os-brick's disconnect_volume() method allows
callers to ignore flushing errors and ensure that devices are being
removed from the host.
We should use force=True when we are going to delete an instance to
avoid leaving leftover devices connected to the compute host which
could then potentially be reused to map to volumes to an instance that
should not have access to those volumes.
We can use force=True even when disconnecting a volume that will not be
deleted on termination because os-brick will always attempt to flush
and disconnect gracefully before forcefully removing devices.
NOTE(melwitt): The conflicts are because change
Ic314b26695d9681d31a18adcec0794c2ff41fe71 (Lightbits LightOS driver) is
not in Xena.
NOTE(melwitt): The difference from the cherry picked change is because
of the following additional affected volume driver in Wallaby:
* nova/virt/libvirt/volume/net.py
Closes-Bug: #2004555
Change-Id: I3629b84d3255a8fe9d8a7cea8c6131d7c40899e8
(cherry picked from commit db455548a12beac1153ce04eca5e728d7b773901)
(cherry picked from commit efb01985db88d6333897018174649b425feaa1b4)
(cherry picked from commit 8b4b99149a35663fc11d7d163082747b1b210b4d)
(cherry picked from commit 4d8efa2d196f72fdde33136a0b50c4ee8da3c941)
(cherry picked from commit b574901500d936488cdedf9fda90c4d36eeddd97)
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /882869 /opendev. org/openstack/ nova/commit/ 5b4cb92aa8adab2 bd3d7905e0b76ec eab680ab28
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 5b4cb92aa8adab2 bd3d7905e0b76ec eab680ab28
Author: melanie witt <email address hidden>
Date: Wed Feb 15 22:37:40 2023 +0000
Use force=True for os-brick disconnect during delete
The 'force' parameter of os-brick's disconnect_volume() method allows
callers to ignore flushing errors and ensure that devices are being
removed from the host.
We should use force=True when we are going to delete an instance to
avoid leaving leftover devices connected to the compute host which
could then potentially be reused to map to volumes to an instance that
should not have access to those volumes.
We can use force=True even when disconnecting a volume that will not be
deleted on termination because os-brick will always attempt to flush
and disconnect gracefully before forcefully removing devices.
Conflicts:
nova/tests/ unit/virt/ libvirt/ volume/ test_lightos. py
nova/virt/ libvirt/ volume/ lightos. py
NOTE(melwitt): The conflicts are because change d9681d31a18adce c0794c2ff41fe71 (Lightbits LightOS driver) is
Ic314b26695
not in Xena.
NOTE(melwitt): The difference from the cherry picked change is because libvirt/ volume/ net.py
of the following additional affected volume driver in Wallaby:
* nova/virt/
Closes-Bug: #2004555
Change-Id: I3629b84d3255a8 fe9d8a7cea8c613 1d7c40899e8 1153ce04eca5e72 8d7b773901) 33897018174649b 425feaa1b4) fc11d7d16308274 7b1b210b4d) dde33136a0b50c4 ee8da3c941) 88cdedf9fda90c4 d36eeddd97)
(cherry picked from commit db455548a12beac
(cherry picked from commit efb01985db88d63
(cherry picked from commit 8b4b99149a35663
(cherry picked from commit 4d8efa2d196f72f
(cherry picked from commit b574901500d9364