handling nvme hostid/hostnqn files more robustly
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
98f99bc761
commit
73af26298c
|
|
@ -115,7 +115,7 @@ jobs:
|
||||||
SYNOLOGY_PASSWORD: ${{ secrets.SANITY_SYNOLOGY_PASSWORD }}
|
SYNOLOGY_PASSWORD: ${{ secrets.SANITY_SYNOLOGY_PASSWORD }}
|
||||||
SYNOLOGY_VOLUME: ${{ secrets.SANITY_SYNOLOGY_VOLUME }}
|
SYNOLOGY_VOLUME: ${{ secrets.SANITY_SYNOLOGY_VOLUME }}
|
||||||
|
|
||||||
csi-sanity-truenas-scale-24_10:
|
csi-sanity-truenas-scale-25_04:
|
||||||
needs:
|
needs:
|
||||||
- build-npm-linux-amd64
|
- build-npm-linux-amd64
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -123,10 +123,10 @@ jobs:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- truenas/scale/24.10/scale-iscsi.yaml
|
- truenas/scale/25.04/scale-iscsi.yaml
|
||||||
- truenas/scale/24.10/scale-nfs.yaml
|
- truenas/scale/25.04/scale-nfs.yaml
|
||||||
# 80 char limit
|
# 80 char limit
|
||||||
- truenas/scale/24.10/scale-smb.yaml
|
- truenas/scale/25.04/scale-smb.yaml
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- self-hosted
|
||||||
- Linux
|
- Linux
|
||||||
|
|
@ -435,7 +435,7 @@ jobs:
|
||||||
- determine-image-tag
|
- determine-image-tag
|
||||||
- csi-sanity-synology-dsm6
|
- csi-sanity-synology-dsm6
|
||||||
- csi-sanity-synology-dsm7
|
- csi-sanity-synology-dsm7
|
||||||
- csi-sanity-truenas-scale-24_10
|
- csi-sanity-truenas-scale-25_04
|
||||||
- csi-sanity-truenas-core-13_0
|
- csi-sanity-truenas-core-13_0
|
||||||
- csi-sanity-zfs-generic
|
- csi-sanity-zfs-generic
|
||||||
- csi-sanity-objectivefs
|
- csi-sanity-objectivefs
|
||||||
|
|
@ -475,7 +475,7 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- csi-sanity-synology-dsm6
|
- csi-sanity-synology-dsm6
|
||||||
- csi-sanity-synology-dsm7
|
- csi-sanity-synology-dsm7
|
||||||
- csi-sanity-truenas-scale-24_10
|
- csi-sanity-truenas-scale-25_04
|
||||||
- csi-sanity-truenas-core-13_0
|
- csi-sanity-truenas-core-13_0
|
||||||
- csi-sanity-zfs-generic
|
- csi-sanity-zfs-generic
|
||||||
- csi-sanity-objectivefs
|
- csi-sanity-objectivefs
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,9 @@ RUN apt-get update && \
|
||||||
apt-get install -y wget netbase zip bzip2 socat e2fsprogs exfatprogs xfsprogs btrfs-progs fatresize dosfstools ntfs-3g nfs-common cifs-utils fdisk gdisk cloud-guest-utils sudo rsync procps util-linux nvme-cli fuse3 && \
|
apt-get install -y wget netbase zip bzip2 socat e2fsprogs exfatprogs xfsprogs btrfs-progs fatresize dosfstools ntfs-3g nfs-common cifs-utils fdisk gdisk cloud-guest-utils sudo rsync procps util-linux nvme-cli fuse3 && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# TODO: remove nvme unique files
|
RUN \
|
||||||
|
echo '83e7a026-2564-455b-ada6-ddbdaf0bc519' > /etc/nvme/hostid && \
|
||||||
|
echo 'nqn.2014-08.org.nvmexpress:uuid:941e4f03-2cd6-435e-86df-731b1c573d86' > /etc/nvme/hostnqn
|
||||||
|
|
||||||
ARG RCLONE_VERSION=1.69.1
|
ARG RCLONE_VERSION=1.69.1
|
||||||
ADD docker/rclone-installer.sh /usr/local/sbin
|
ADD docker/rclone-installer.sh /usr/local/sbin
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
// polyfills
|
// polyfills
|
||||||
require("../src/utils/polyfills");
|
require("../src/utils/polyfills");
|
||||||
const yaml = require("js-yaml");
|
const cp = require("child_process");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const { grpc } = require("../src/utils/grpc");
|
const { grpc } = require("../src/utils/grpc");
|
||||||
const {
|
const {
|
||||||
|
|
@ -16,6 +16,8 @@ const {
|
||||||
expandenv,
|
expandenv,
|
||||||
} = require("../src/utils/general");
|
} = require("../src/utils/general");
|
||||||
const traverse = require("traverse");
|
const traverse = require("traverse");
|
||||||
|
const uuidv4 = require("uuid").v4;
|
||||||
|
const yaml = require("js-yaml");
|
||||||
|
|
||||||
let driverConfigFile;
|
let driverConfigFile;
|
||||||
let options;
|
let options;
|
||||||
|
|
@ -550,8 +552,27 @@ if (process.env.LOG_GRPC_SESSIONS == "1") {
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
(async function () {
|
(async function () {
|
||||||
try {
|
try {
|
||||||
//nvme gen-hostnqn > /etc/nvme/hostnqn
|
switch (process.platform) {
|
||||||
|
case "linux":
|
||||||
|
const nvme_dir = "/etc/nvme";
|
||||||
|
|
||||||
|
// ensure directory
|
||||||
|
if (!fs.existsSync(nvme_dir)) {
|
||||||
|
fs.mkdirSync(nvme_dir);
|
||||||
|
}
|
||||||
|
|
||||||
//uuidgen > /etc/nvme/hostid
|
//uuidgen > /etc/nvme/hostid
|
||||||
|
if (!fs.existsSync(`${nvme_dir}/hostid`)) {
|
||||||
|
fs.writeFileSync(`${nvme_dir}/hostid`, uuidv4() + "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
//nvme gen-hostnqn > /etc/nvme/hostnqn
|
||||||
|
if (!fs.existsSync(`${nvme_dir}/hostnqn`)) {
|
||||||
|
const nqn = String(cp.execSync(`nvme gen-hostnqn`));
|
||||||
|
fs.writeFileSync(`${nvme_dir}/hostnqn`, nqn);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (bindAddress) {
|
if (bindAddress) {
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue