fix for scale with ssh driver

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen 2025-05-30 07:59:09 -06:00
parent 73af26298c
commit edfdf86f2d
1 changed files with 16 additions and 4 deletions

View File

@ -120,6 +120,15 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
chroot: "/usr/sbin/chroot", chroot: "/usr/sbin/chroot",
}; };
} }
if (isScale && Number(majorMinor) >= 25) {
options.paths = {
zfs: "/usr/sbin/zfs",
zpool: "/usr/sbin/zpool",
sudo: "/usr/bin/sudo",
chroot: "/usr/sbin/chroot",
};
}
} }
} }
@ -142,10 +151,13 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
} }
async getTrueNASHttpApiClient() { async getTrueNASHttpApiClient() {
return this.ctx.registry.getAsync(`${__REGISTRY_NS__}:api_client`, async () => { return this.ctx.registry.getAsync(
const httpClient = await this.getHttpClient(); `${__REGISTRY_NS__}:api_client`,
return new TrueNASApiClient(httpClient, this.ctx.cache); async () => {
}); const httpClient = await this.getHttpClient();
return new TrueNASApiClient(httpClient, this.ctx.cache);
}
);
} }
getDriverShareType() { getDriverShareType() {