diff --git a/CHANGELOG.md b/CHANGELOG.md index b211d45..16fa8d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v1.7.6 + +Released 2022-08-06 + +- support fo `talos.dev` clusters +- dep bumps + # v1.7.5 Released 2022-08-02 diff --git a/Dockerfile b/Dockerfile index f5abf73..1f9e868 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 ENV LANG=en_US.utf8 -ENV NODE_VERSION=v16.15.1 +ENV NODE_VERSION=v16.16.0 ENV NODE_ENV=production # install build deps @@ -75,7 +75,7 @@ COPY --from=build /usr/local/lib/nodejs/bin/node /usr/local/bin/node # netbase is required by rpcbind/rpcinfo to work properly # /etc/{services,rpc} are required RUN apt-get update && \ - apt-get install -y netbase socat e2fsprogs exfatprogs xfsprogs btrfs-progs fatresize dosfstools ntfs-3g nfs-common cifs-utils fdisk gdisk cloud-guest-utils sudo rsync && \ + apt-get install -y netbase socat e2fsprogs exfatprogs xfsprogs btrfs-progs fatresize dosfstools ntfs-3g nfs-common cifs-utils fdisk gdisk cloud-guest-utils sudo rsync procps util-linux && \ rm -rf /var/lib/apt/lists/* # controller requirements diff --git a/Dockerfile.Windows b/Dockerfile.Windows index 2d7436c..bd5a337 100644 --- a/Dockerfile.Windows +++ b/Dockerfile.Windows @@ -57,7 +57,7 @@ RUN @( \ gpg --keyserver hkps://keys.openpgp.org --recv-keys $_ ; \ } -ENV NODE_VERSION 16.15.1 +ENV NODE_VERSION 16.16.0 RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; #RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \ diff --git a/README.md b/README.md index 62254a7..dc69e69 100644 --- a/README.md +++ b/README.md @@ -94,9 +94,9 @@ If you are running Kubernetes with rancher/rke please see the following: - https://github.com/rancher/rke/issues/1846 -``` -RHEL / CentOS +#### RHEL / CentOS +``` # Install the following system packages sudo yum install -y lsscsi iscsi-initiator-utils sg3_utils device-mapper-multipath @@ -110,10 +110,11 @@ sudo systemctl start iscsid multipathd # Start and enable iscsi sudo systemctl enable iscsi sudo systemctl start iscsi +``` +#### Ubuntu / Debian -Ubuntu / Debian - +``` # Install the following system packages sudo apt-get install -y open-iscsi lsscsi sg3-utils multipath-tools scsitools @@ -134,6 +135,45 @@ sudo systemctl enable open-iscsi.service sudo service open-iscsi start sudo systemctl status open-iscsi ``` +#### [Talos](https://www.talos.dev/) +To use iscsi storage in kubernetes cluster in talos these steps are needed which are similar to the ones explained in https://www.talos.dev/v1.1/kubernetes-guides/configuration/replicated-local-storage-with-openebs-jiva/#patching-the-jiva-installation + +##### Patch nodes +since talos does not have iscsi support by default, the iscsi extension is needed +create a `patch.yaml` file with +```yaml +- op: add + path: /machine/install/extensions + value: + - image: ghcr.io/siderolabs/iscsi-tools:v0.1.1 +``` +and apply the patch across all of your nodes +```bash +talosctl -e -n patch mc -p @patch.yaml +``` +the extension will not activate until you "upgrade" the nodes, even if there is no update, use the latest version of talos installer. +VERIFY THE TALOS VERSION IN THIS COMMAND BEFORE RUNNING IT AND READ THE [OpenEBS Jiva](https://www.talos.dev/v1.1/kubernetes-guides/configuration/replicated-local-storage-with-openebs-jiva/#patching-the-jiva-installation). +upgrade all of the nodes in the cluster to get the extension +```bash +talosctl -e -n upgrade --image=ghcr.io/siderolabs/installer:v1.1.1 +``` + +in your `values.yaml` file make sure to enable these settings +```yaml + +node: + hostPID: true + driver: + extraEnv: + - name: ISCSIADM_HOST_STRATEGY + value: nsenter + - name: ISCSIADM_HOST_PATH + value: /usr/local/sbin/iscsiadm + iscsiDirHostPath: /usr/local/etc/iscsi + iscsiDirHostPathType: "" +``` +and continue your democratic installation as usuall with other iscsi drivers. + ### freenas-smb @@ -433,7 +473,7 @@ following: - For `iscsi` and `smb` be aware that the names of assets/shares are _global_ and so collisions are possible/probable. Appropriate use of the respective `nameTemplate`, `namePrefix`, and `nameSuffix` configuration options will - mitigate the issue ([#210][i210]). + mitigate the issue (#210). # Snapshot Support diff --git a/docker/iscsiadm b/docker/iscsiadm index 56623d7..c576f00 100755 --- a/docker/iscsiadm +++ b/docker/iscsiadm @@ -1,5 +1,28 @@ #!/bin/bash -# https://engineering.docker.com/2019/07/road-to-containing-iscsi/ +: "${ISCSIADM_HOST_STRATEGY:=chroot}" +: "${ISCSIADM_HOST_PATH:=iscsiadm}" -chroot /host /usr/bin/env -i PATH="/usr/sbin:/usr/bin:/sbin:/bin" iscsiadm "${@:1}" +echoerr() { printf "%s\n" "$*" >&2; } + +case ${ISCSIADM_HOST_STRATEGY} in + chroot) + # https://engineering.docker.com/2019/07/road-to-containing-iscsi/ + chroot /host /usr/bin/env -i PATH="/usr/sbin:/usr/bin:/sbin:/bin" ${ISCSIADM_HOST_PATH} "${@:1}" + ;; + + nsenter) + # https://github.com/siderolabs/extensions/issues/38#issuecomment-1125403043 + iscsid_pid=$(pgrep iscsid) + if [[ "${iscsid_pid}x" == "x" ]]; then + echoerr "failed to find iscsid pid for nsenter" + exit 1 + fi + nsenter --mount="/proc/${iscsid_pid}/ns/mnt" --net="/proc/${iscsid_pid}/ns/net" -- ${ISCSIADM_HOST_PATH} "${@:1}" + ;; + + *) + echoerr "invalid ISCSIADM_HOST_STRATEGY: ${ISCSIADM_HOST_STRATEGY}" + exit 1 + ;; +esac diff --git a/docker/mount b/docker/mount index ac3281b..fcfd59d 100755 --- a/docker/mount +++ b/docker/mount @@ -21,8 +21,8 @@ while getopts "t:" opt; do case "$opt" in t) if [[ "x${USE_HOST_MOUNT_TOOLS}" == "x" ]]; then - [[ "${OPTARG,,}" == "zfs" ]] && USE_HOST_MOUNT_TOOLS=1 - [[ "${OPTARG,,}" == "lustre" ]] && USE_HOST_MOUNT_TOOLS=1 + [[ "${OPTARG,,}" == "zfs" ]] && USE_HOST_MOUNT_TOOLS=1 + [[ "${OPTARG,,}" == "lustre" ]] && USE_HOST_MOUNT_TOOLS=1 [[ "${OPTARG,,}" == "onedata" ]] && USE_HOST_MOUNT_TOOLS=1 #(printf '%s\0' "${container_supported_filesystems[@]}" | grep -Fqxz -- "${OPTARG}") || USE_HOST_MOUNT_TOOLS=1 fi diff --git a/docker/umount b/docker/umount index fe08061..48dd314 100755 --- a/docker/umount +++ b/docker/umount @@ -21,8 +21,8 @@ while getopts "t:" opt; do case "$opt" in t) if [[ "x${USE_HOST_MOUNT_TOOLS}" == "x" ]]; then - [[ "${OPTARG,,}" == "zfs" ]] && USE_HOST_MOUNT_TOOLS=1 - [[ "${OPTARG,,}" == "lustre" ]] && USE_HOST_MOUNT_TOOLS=1 + [[ "${OPTARG,,}" == "zfs" ]] && USE_HOST_MOUNT_TOOLS=1 + [[ "${OPTARG,,}" == "lustre" ]] && USE_HOST_MOUNT_TOOLS=1 [[ "${OPTARG,,}" == "onedata" ]] && USE_HOST_MOUNT_TOOLS=1 #(printf '%s\0' "${container_supported_filesystems[@]}" | grep -Fqxz -- "${OPTARG}") || USE_HOST_MOUNT_TOOLS=1 fi diff --git a/package-lock.json b/package-lock.json index 17779e2..2a1aea9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "democratic-csi", - "version": "1.7.5", + "version": "1.7.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "democratic-csi", - "version": "1.7.5", + "version": "1.7.6", "license": "MIT", "dependencies": { "@grpc/grpc-js": "^1.5.7", @@ -303,9 +303,9 @@ } }, "node_modules/@types/node": { - "version": "18.6.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.3.tgz", - "integrity": "sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg==" + "version": "18.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.4.tgz", + "integrity": "sha512-I4BD3L+6AWiUobfxZ49DlU43gtI+FTHSv9pE2Zekg6KjMpre4ByusaljW3vYSLJrvQ1ck1hUaeVu8HVlY3vzHg==" }, "node_modules/@types/request": { "version": "2.48.8", @@ -1511,9 +1511,9 @@ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dependencies": { "has": "^1.0.3" }, @@ -1738,9 +1738,9 @@ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "node_modules/lru-cache": { - "version": "7.13.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.1.tgz", - "integrity": "sha512-CHqbAq7NFlW3RSnoWXLJBxCWaZVBrfa9UEHId2M3AW8iEBurbqduNexEUCGc3SHc6iCYXNJCDi903LajSVAEPQ==", + "version": "7.13.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.2.tgz", + "integrity": "sha512-VJL3nIpA79TodY/ctmZEfhASgqekbT574/c4j3jn4bKXbSCnTTCH/KltZyvL2GlV+tGSMtsWyem8DCX7qKTMBA==", "engines": { "node": ">=12" } @@ -3037,9 +3037,9 @@ } }, "node_modules/yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "engines": { "node": ">=12" } @@ -3295,9 +3295,9 @@ } }, "@types/node": { - "version": "18.6.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.3.tgz", - "integrity": "sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg==" + "version": "18.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.4.tgz", + "integrity": "sha512-I4BD3L+6AWiUobfxZ49DlU43gtI+FTHSv9pE2Zekg6KjMpre4ByusaljW3vYSLJrvQ1ck1hUaeVu8HVlY3vzHg==" }, "@types/request": { "version": "2.48.8", @@ -4224,9 +4224,9 @@ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "requires": { "has": "^1.0.3" } @@ -4405,9 +4405,9 @@ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "lru-cache": { - "version": "7.13.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.1.tgz", - "integrity": "sha512-CHqbAq7NFlW3RSnoWXLJBxCWaZVBrfa9UEHId2M3AW8iEBurbqduNexEUCGc3SHc6iCYXNJCDi903LajSVAEPQ==" + "version": "7.13.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.2.tgz", + "integrity": "sha512-VJL3nIpA79TodY/ctmZEfhASgqekbT574/c4j3jn4bKXbSCnTTCH/KltZyvL2GlV+tGSMtsWyem8DCX7qKTMBA==" }, "merge-stream": { "version": "2.0.0", @@ -5338,9 +5338,9 @@ } }, "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==" + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" }, "yocto-queue": { "version": "0.1.0", diff --git a/package.json b/package.json index d106f66..80aa563 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "democratic-csi", - "version": "1.7.5", + "version": "1.7.6", "description": "kubernetes csi driver framework", "main": "bin/democratic-csi", "scripts": {