minor fixes

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen 2024-05-06 11:07:10 -06:00
parent a6dec24a70
commit 38bee217dd
7 changed files with 31 additions and 25 deletions

View File

@ -1,3 +1,11 @@
# v1.9.1
Released 2024-05-06
- fix iscsi hostname lookup regression (#393)
- fix resize issue (#390)
- fix Probe issue (#385)
# v1.9.0 # v1.9.0
Released 2024-03-26 Released 2024-03-26

View File

@ -109,9 +109,6 @@ RUN chmod +x /usr/local/sbin/iscsiadm
ADD docker/multipath /usr/local/sbin ADD docker/multipath /usr/local/sbin
RUN chmod +x /usr/local/sbin/multipath RUN chmod +x /usr/local/sbin/multipath
ADD docker/simple-file-writer /usr/local/bin
RUN chmod +x /usr/local/bin/simple-file-writer
## USE_HOST_MOUNT_TOOLS=1 ## USE_HOST_MOUNT_TOOLS=1
ADD docker/mount /usr/local/bin/mount ADD docker/mount /usr/local/bin/mount
RUN chmod +x /usr/local/bin/mount RUN chmod +x /usr/local/bin/mount

View File

@ -3,6 +3,11 @@
set -e set -e
set -x set -x
if [[ -z "${OBJECTIVEFS_DOWNLOAD_ID}" ]]; then
echo 'missing OBJECTIVEFS_DOWNLOAD_ID, moving on'
exit 0
fi
PLATFORM_TYPE=${1} PLATFORM_TYPE=${1}
if [[ "${PLATFORM_TYPE}" == "build" ]]; then if [[ "${PLATFORM_TYPE}" == "build" ]]; then

View File

@ -1,3 +0,0 @@
#!/bin/bash
echo ${1} > ${2}

View File

@ -2201,7 +2201,7 @@ class FreeNASApiDriver extends CsiBaseDriver {
} catch (err) { } catch (err) {
throw new GrpcError( throw new GrpcError(
grpc.status.FAILED_PRECONDITION, grpc.status.FAILED_PRECONDITION,
`TrueNAS api is unavailable: ${err.getMessage()}` `TrueNAS api is unavailable: ${String(err)}`
); );
} }

View File

@ -46,7 +46,7 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
} catch (err) { } catch (err) {
throw new GrpcError( throw new GrpcError(
grpc.status.FAILED_PRECONDITION, grpc.status.FAILED_PRECONDITION,
`TrueNAS api is unavailable: ${err.getMessage()}` `TrueNAS api is unavailable: ${String(err)}`
); );
} }
@ -2051,20 +2051,10 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
* works on SCALE only ^ * works on SCALE only ^
* *
*/ */
command = execClient.buildCommand("sh", [
if (process.env.DEMOCRATIC_CSI_IS_CONTAINER == "true") { "-c",
// use the built-in wrapper script that works with sudo `"echo 1 > /sys/kernel/scst_tgt/devices/${kName}/resync_size"`,
command = execClient.buildCommand("simple-file-writer", [ ]);
"1",
`/sys/kernel/scst_tgt/devices/${kName}/resync_size`,
]);
} else {
// TODO: syntax fails with sudo
command = execClient.buildCommand("sh", [
"-c",
`echo 1 > /sys/kernel/scst_tgt/devices/${kName}/resync_size`,
]);
}
reload = true; reload = true;
} else { } else {
switch (apiVersion) { switch (apiVersion) {

View File

@ -183,10 +183,19 @@ class ISCSI {
let parsedPortalHostIP = ""; let parsedPortalHostIP = "";
if (parsedPortal.host) { if (parsedPortal.host) {
// if host is not an ip address // if host is not an ip address
if (net.isIP(parsedPortal.host) == 0) { let parsedPortalHost = parsedPortal.host
.replaceAll("[", "")
.replaceAll("]", "");
if (net.isIP(parsedPortalHost) == 0) {
// ipv6 response is without [] // ipv6 response is without []
parsedPortalHostIP = try {
(await hostname_lookup(parsedPortal.host)) || ""; parsedPortalHostIP =
(await hostname_lookup(parsedPortal.host)) || "";
} catch (err) {
console.log(
`failed to lookup hostname: host - ${parsedPortal.host}, error - ${err}`
);
}
} }
} }