fix capacity reporting
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
1de7625dd8
commit
31a1c8f543
|
|
@ -1,3 +1,9 @@
|
||||||
|
# v1.5.2
|
||||||
|
|
||||||
|
Released 2022-02-24
|
||||||
|
|
||||||
|
- proper capacity reporting for `controller-client-common`
|
||||||
|
|
||||||
# v1.5.1
|
# v1.5.1
|
||||||
|
|
||||||
Released 2022-02-23
|
Released 2022-02-23
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "democratic-csi",
|
"name": "democratic-csi",
|
||||||
"version": "1.5.0",
|
"version": "1.5.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -45,9 +45,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@grpc/grpc-js": {
|
"@grpc/grpc-js": {
|
||||||
"version": "1.5.5",
|
"version": "1.5.6",
|
||||||
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.6.tgz",
|
||||||
"integrity": "sha512-FTd27ItHlsSG/7hp62xgI9YnqSwRbHRSVmDVR8DwOoC+6t8JhHRXe2JL0U8N9GLc0jS0HrtEbO/KP5+G0ebjLQ==",
|
"integrity": "sha512-Q9dT3LkFuTnT2HHo8dQnQiFHZIfKHx/e5hDTMzK9uZ+bjZ1RAwgH5oUURVsGxBfsnH34RGeV/+51S6ZFe5KdNw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@grpc/proto-loader": "^0.6.4",
|
"@grpc/proto-loader": "^0.6.4",
|
||||||
"@types/node": ">=12.12.47"
|
"@types/node": ">=12.12.47"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "democratic-csi",
|
"name": "democratic-csi",
|
||||||
"version": "1.5.1",
|
"version": "1.5.2",
|
||||||
"description": "kubernetes csi driver framework",
|
"description": "kubernetes csi driver framework",
|
||||||
"main": "bin/democratic-csi",
|
"main": "bin/democratic-csi",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
"url": "https://github.com/democratic-csi/democratic-csi.git"
|
"url": "https://github.com/democratic-csi/democratic-csi.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.5.5",
|
"@grpc/grpc-js": "^1.5.6",
|
||||||
"@grpc/proto-loader": "^0.6.0",
|
"@grpc/proto-loader": "^0.6.0",
|
||||||
"@kubernetes/client-node": "^0.16.3",
|
"@kubernetes/client-node": "^0.16.3",
|
||||||
"async-mutex": "^0.3.1",
|
"async-mutex": "^0.3.1",
|
||||||
|
|
|
||||||
|
|
@ -311,11 +311,15 @@ class ControllerClientCommonDriver extends CsiBaseDriver {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAvailableSpaceAtPath(path) {
|
async getAvailableSpaceAtPath(path) {
|
||||||
//df --output=avail /mnt/storage/
|
//df --block-size=1 --output=avail /mnt/storage/
|
||||||
// Avail
|
// Avail
|
||||||
//1481334328
|
//1481334328
|
||||||
|
|
||||||
const response = await this.exec("df", ["--output=avail", path]);
|
const response = await this.exec("df", [
|
||||||
|
"--block-size=1",
|
||||||
|
"--output=avail",
|
||||||
|
path,
|
||||||
|
]);
|
||||||
|
|
||||||
return response.stdout.split("\n")[1].trim();
|
return response.stdout.split("\n")[1].trim();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue