From 5a4996ec056a26ec2e5b43493edad39877820e21 Mon Sep 17 00:00:00 2001 From: Travis Glenn Hansen Date: Tue, 28 Jun 2022 13:05:37 -0600 Subject: [PATCH] v1.7.2 Signed-off-by: Travis Glenn Hansen --- CHANGELOG.md | 15 +++++++++++++++ README.md | 16 ++++++++++++---- src/driver/index.js | 3 ++- src/utils/filesystem.js | 7 +++---- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0d3b85..8aed240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# v1.7.2 + +Released 2022-06-28 + +- support for inode stats +- doc updates +- bump deps + +# v1.7.1 + +Released 2022-06-14 + +- support for the alpha TrueNAS SCALE 22.12 +- Fix invalid class reference + # v1.7.0 Released 2022-06-08 diff --git a/README.md b/README.md index fb06a98..f7e8a43 100644 --- a/README.md +++ b/README.md @@ -415,16 +415,24 @@ need to be set with helm (support added in chart version `0.6.1`): ### Nomad -`democratic-csi` works with Nomad in a functioning but limted capacity. See the [Nomad docs](docs/nomad.md) for details. +`democratic-csi` works with Nomad in a functioning but limted capacity. See the +[Nomad docs](docs/nomad.md) for details. ## Multiple Deployments -You may install multiple deployments of each/any driver. It requires the following: +You may install multiple deployments of each/any driver. It requires the +following: - Use a new helm release name for each deployment -- Make sure you have a unique `csiDriver.name` in the values file +- Make sure you have a unique `csiDriver.name` in the values file (within the + same cluster) - Use unqiue names for your storage classes (per cluster) -- Use a unique parent dataset (ie: don't try to use the same parent across deployments or clusters) +- Use a unique parent dataset (ie: don't try to use the same parent across + deployments or clusters) +- 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 (See [#210][i210]). # Snapshot Support diff --git a/src/driver/index.js b/src/driver/index.js index c84a05a..c3275a6 100644 --- a/src/driver/index.js +++ b/src/driver/index.js @@ -3028,7 +3028,8 @@ class CsiBaseDriver { ]; try { result = await filesystem.getInodeInfo(device_path); - if (result) { + // not all filesystems use inodes, only utilize if total > 0 + if (result && result.inodes_total > 0) { res.usage.push({ available: result.inodes_free, total: result.inodes_total, diff --git a/src/utils/filesystem.js b/src/utils/filesystem.js index 1282a75..96a41b0 100644 --- a/src/utils/filesystem.js +++ b/src/utils/filesystem.js @@ -844,10 +844,9 @@ class Filesystem { return { device: parts[0], mount_path: parts[5], - inodes_total: parts[1], - inodes_used: parts[2], - inodes_used_percentage: parts[4].replace(/[^0-9.]/g, ""), - inodes_free: parts[3], + inodes_total: parseInt(parts[1]), + inodes_used: parseInt(parts[2]), + inodes_free: parseInt(parts[3]), }; } } catch (err) {