Ensure we pass mount object also from volumes code

This commit is contained in:
Johannes Zellner
2025-08-04 14:05:57 +02:00
parent f48b1d066e
commit 0ff760fe4a
+2 -2
View File
@@ -165,7 +165,7 @@ async function update(id, mountOptions, auditSource) {
// first try to mount at /mnt/volumes/<volumeId>-validation
const testMount = Object.assign({}, mount, { hostPath: `${hostPath}-validation` });
await mounts.tryAddMount(testMount, { timeout: 10 }); // 10 seconds
await mounts.removeMount(testMount.hostPath);
await mounts.removeMount(testMount);
// update the mount
await mounts.tryAddMount(mount, { timeout: 10 }); // 10 seconds
@@ -204,7 +204,7 @@ async function del(volume, auditSource) {
if (volume.mountType === mounts.MOUNT_TYPE_MOUNTPOINT || volume.mountType === mounts.MOUNT_TYPE_FILESYSTEM) {
safe(services.rebuildService('sftp', auditSource), { debug });
} else {
await safe(mounts.removeMount(volume.hostPath));
await safe(mounts.removeMount(volume));
}
}