commit
4cb667177a
15
CHANGELOG.md
15
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
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -206,9 +206,6 @@ work as soon as kubernetes support is available.
|
|||
# enable the container feature
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName Containers –All
|
||||
|
||||
# create symbolic link due to current limitations in the driver-registrar container
|
||||
New-Item -ItemType SymbolicLink -Path "C:\registration\" -Target "C:\var\lib\kubelet\plugins_registry\"
|
||||
|
||||
# install a HostProcess compatible kubernetes
|
||||
```
|
||||
|
||||
|
|
@ -418,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
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "democratic-csi",
|
||||
"version": "1.7.1",
|
||||
"version": "1.7.2",
|
||||
"description": "kubernetes csi driver framework",
|
||||
"main": "bin/democratic-csi",
|
||||
"scripts": {
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
"dependencies": {
|
||||
"@grpc/grpc-js": "^1.5.7",
|
||||
"@grpc/proto-loader": "^0.6.0",
|
||||
"@kubernetes/client-node": "^0.16.3",
|
||||
"@kubernetes/client-node": "^0.17.0",
|
||||
"async-mutex": "^0.3.1",
|
||||
"axios": "^0.27.2",
|
||||
"bunyan": "^1.8.15",
|
||||
|
|
|
|||
|
|
@ -3026,6 +3026,20 @@ class CsiBaseDriver {
|
|||
unit: "BYTES",
|
||||
},
|
||||
];
|
||||
try {
|
||||
result = await filesystem.getInodeInfo(device_path);
|
||||
// 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,
|
||||
used: result.inodes_used,
|
||||
unit: "INODES",
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
driver.ctx.logger.debug("failed to retrieve inode info", err);
|
||||
}
|
||||
break;
|
||||
case "block":
|
||||
if (!(await filesystem.pathExists(device_path))) {
|
||||
|
|
|
|||
|
|
@ -829,6 +829,31 @@ class Filesystem {
|
|||
return true;
|
||||
}
|
||||
|
||||
async getInodeInfo(path) {
|
||||
const filesystem = this;
|
||||
let args = ["-i"];
|
||||
let result;
|
||||
|
||||
args.push(path);
|
||||
|
||||
try {
|
||||
result = await filesystem.exec("df", args);
|
||||
if (result.code == 0) {
|
||||
result = result.stdout.split("\n")[1].replace(/\s\s+/g, " ");
|
||||
let parts = result.split(" ");
|
||||
return {
|
||||
device: parts[0],
|
||||
mount_path: parts[5],
|
||||
inodes_total: parseInt(parts[1]),
|
||||
inodes_used: parseInt(parts[2]),
|
||||
inodes_free: parseInt(parts[3]),
|
||||
};
|
||||
}
|
||||
} catch (err) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} path
|
||||
|
|
|
|||
Loading…
Reference in New Issue