Skip to content

Commit

Permalink
fix: remove_archived_pv searches wrong path for PVC info (#937)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Funke <[email protected]>
  • Loading branch information
Timoses committed Nov 29, 2022
1 parent e4afd97 commit df70c7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion csi/remove_archived_pv.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ def get_archived_pvs(storage_name, pvc_name):
""" Return all or specified archived_pvcs based on agrs """

archived_pvs = {}
mntdir = os.path.join(HOSTVOL_MOUNTDIR, storage_name)

mntdir = os.path.join(HOSTVOL_MOUNTDIR, storage_name, "info")
if not os.path.isdir(mntdir):
sys.stderr.write(f"Metadata for storagepool {storage_name} is not found")
return -1

try:
for pvc in yield_pvc_from_mntdir(mntdir):
if pvc is not None:
Expand Down

0 comments on commit df70c7f

Please sign in to comment.