Merge pull request #396 from democratic-csi/next

minor fixes
This commit is contained in:
Travis Glenn Hansen 2024-05-06 13:01:12 -06:00 committed by GitHub
commit 23e6ecb1fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
Released 2024-03-26

View File

@ -109,9 +109,6 @@ RUN chmod +x /usr/local/sbin/iscsiadm
ADD docker/multipath /usr/local/sbin
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
ADD docker/mount /usr/local/bin/mount
RUN chmod +x /usr/local/bin/mount

View File

@ -3,6 +3,11 @@
set -e
set -x
if [[ -z "${OBJECTIVEFS_DOWNLOAD_ID}" ]]; then
echo 'missing OBJECTIVEFS_DOWNLOAD_ID, moving on'
exit 0
fi
PLATFORM_TYPE=${1}
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) {
throw new GrpcError(
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) {
throw new GrpcError(
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 ^
*
*/
if (process.env.DEMOCRATIC_CSI_IS_CONTAINER == "true") {
// use the built-in wrapper script that works with sudo
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`,
]);
}
command = execClient.buildCommand("sh", [
"-c",
`"echo 1 > /sys/kernel/scst_tgt/devices/${kName}/resync_size"`,
]);
reload = true;
} else {
switch (apiVersion) {

View File

@ -183,10 +183,19 @@ class ISCSI {
let parsedPortalHostIP = "";
if (parsedPortal.host) {
// 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 []
parsedPortalHostIP =
(await hostname_lookup(parsedPortal.host)) || "";
try {
parsedPortalHostIP =
(await hostname_lookup(parsedPortal.host)) || "";
} catch (err) {
console.log(
`failed to lookup hostname: host - ${parsedPortal.host}, error - ${err}`
);
}
}
}