Ensure we pass mount object also from volumes code
This commit is contained in:
+2
-2
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user