Skip to content

Commit

Permalink
fix(LargeBlock): removing pv after deletion
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Thenot <[email protected]>
  • Loading branch information
Nambrok committed Apr 4, 2024
1 parent ee5e639 commit dcc1e44
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/LargeBlockSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def attach(self, sr_uuid):
super(LargeBlockSR, self).attach(sr_uuid)

def detach(self, sr_uuid):
vg_device = self._get_device()

self.dconf["device"] = ",".join(vg_device)
if not self.is_deleting:
vg_device = self._get_device()
self.dconf["device"] = ",".join(vg_device)
super(LargeBlockSR, self).detach(sr_uuid)
if not self.is_deleting:
self._destroy_emulated_device()
Expand Down Expand Up @@ -106,6 +106,8 @@ def delete(self, sr_uuid):
finally:
self._destroy_emulated_device(base_devices)
self.is_deleting = False
for dev in base_devices:
util.pread2(["pvremove", os.path.realpath(dev)])

@deviceCheck
def probe(self):
Expand Down

0 comments on commit dcc1e44

Please sign in to comment.