Update rm command

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
support/v0.36
Andrey Berezin 2023-01-18 15:56:01 +03:00 committed by abereziny
parent f6b128e113
commit c55c0fccb0
1 changed files with 3 additions and 1 deletions

View File

@ -124,7 +124,9 @@ class DockerHost(Host):
volume_path = volume_info["Mountpoint"]
shell = self.get_shell()
cmd = f"rm -rf {volume_path}/meta*" if cache_only else f"rm -rf {volume_path}/*"
meta_clean_cmd = f"rm -rf {volume_path}/meta*/*"
data_clean_cmd = f"; rm -rf {volume_path}/data*/*" if not cache_only else ""
cmd = f"{meta_clean_cmd}{data_clean_cmd}"
shell.exec(cmd)
def attach_disk(self, device: str, disk_info: DiskInfo) -> None: