Skip to content

Commit

Permalink
add debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevcich committed Nov 20, 2024
1 parent f918d8f commit 1cdf1e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/blockdevice/lvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,16 @@ func (l *Lvm) Destroy(ctx context.Context) (bool, error) {
}

// Ensure VG has no LVs before removing
l.Log.Info("BLAKE - getting lvs")
lvs, err := lvm.LvsListVolumes(ctx, l.VolumeGroup.Log)
if err != nil {
return false, err
}
l.Log.Info("BLAKE - got lvs", "lvs", lvs)
for _, lv := range lvs {
l.Log.Info("BLAKE - for each lv", "lv", lv, "lv.VGname", lv.VGName, "l.VolumeGroup.Name", l.VolumeGroup.Name)
if lv.VGName == l.VolumeGroup.Name {
l.Log.Info("BLAKE - lv in VG, returning false")
return false, nil
}
}
Expand Down

0 comments on commit 1cdf1e7

Please sign in to comment.