volumes: reload sftp on update

when diskPath changes, docker is busy holding on to the previous mount!
I guess this is because this is all somehow inode based.
This commit is contained in:
Girish Ramakrishnan
2021-06-21 11:53:25 -07:00
parent c16a7c1f45
commit f433146484
+3
View File
@@ -122,6 +122,9 @@ async function update(volume, mountType, mountOptions) {
const result = await database.query('UPDATE volumes SET mountOptionsJson=? WHERE id=?', [ JSON.stringify(mountOptions), volume.id ]);
if (result.affectedRows !== 1) throw new BoxError(BoxError.NOT_FOUND, 'Volume not found');
// when diskPath or remoteDir is changed, we have to "rebind" the docker volumes
services.rebuildService('sftp', NOOP_CALLBACK);
}
async function getStatus(volume) {