Skip to content

Commit

Permalink
VAST Data CSI Plugin - v2.3.1
Browse files Browse the repository at this point in the history
  (from da827962676a3c6560cccc1421eec4881efee10d)
  • Loading branch information
koreno committed Apr 9, 2024
1 parent a083e81 commit 7d039b8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ build_csi:
script: |
set -x
VERSION=$(cat version.txt)
TAGGED=$(grep 'the version of the Vast CSI driver' charts/vastcsi/values.yaml | awk '{print $2}')
if [[ "$TAGGED" != "$VERSION" ]]; then
echo "version.txt has $VERSION, while our helm chart has $TAGGED (check charts/vastcsi/values.yaml)"
exit 5
fi
LATEST=${DOCKER_REGISTRY}/dev/vast-csi:latest
if (docker pull $LATEST) ; then
docker tag $LATEST vast-csi:latest # the cache-source for our subsequent build
Expand Down Expand Up @@ -78,12 +83,11 @@ test_csi:
except: null
parallel:
matrix:
- INSTALL_IMAGE: "4.2"
- INSTALL_IMAGE: "4.3"
- INSTALL_IMAGE: "4.4"
- INSTALL_IMAGE: "4.5"
- INSTALL_IMAGE: "4.6"
- INSTALL_IMAGE: "4.7"
- INSTALL_IMAGE: "5.0"
- INSTALL_IMAGE: "5.1"
- INSTALL_IMAGE: "prev_version"
- INSTALL_IMAGE: "latest"

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## Version 2.3.1
* added volume stats metrics on Node (VCSI-125)

## Version 2.3.0
* added CLONE_VOLUME support (VCSI-83)
* clone volumes from snapshots in READ_WRITE mode (VCSI-103)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VAST Data CSI Driver

The source-code in this repository is for informational purposes only. It is not meant to be compiled or used directly.
If you wish to use our driver with your VAST storage system, please refer to our [official documentation](https://support.vastdata.com/s/topic/0TOV40000000kXVOAY/vast-csi-driver).
If you wish to use our driver with your VAST storage system, please refer to our [official documentation](https://support.vastdata.com/s/topic/0TOV40000000TtFOAU/vast-csi-driver).
2 changes: 1 addition & 1 deletion charts/vastcsi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ snapshotClass:
image:
csiVastPlugin:
repository: vastdataorg/csi
tag: v2.3.0
tag: v2.3.1 # the version of the Vast CSI driver
imagePullPolicy: IfNotPresent
csiAttacher:
repository: k8s.gcr.io/sig-storage/csi-attacher
Expand Down
25 changes: 24 additions & 1 deletion vast_csi/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ class Node(NodeServicer, Instrumented):

CAPABILITIES = [
# types.NodeCapabilityType.STAGE_UNSTAGE_VOLUME,
# types.NodeCapabilityType.GET_VOLUME_STATS,
types.NodeCapabilityType.GET_VOLUME_STATS,
]

def NodeGetCapabilities(self):
Expand Down Expand Up @@ -893,6 +893,29 @@ def NodeUnpublishVolume(self, target_path):
def NodeGetInfo(self):
return types.NodeInfoResp(node_id=CONF.node_id)

def NodeGetVolumeStats(self, volume_id, volume_path):
if not os.path.ismount(volume_path):
raise Abort(NOT_FOUND, f"{volume_path} is not a mountpoint")
# See http://man7.org/linux/man-pages/man2/statfs.2.html for details.
fstats = os.statvfs(volume_path)
return types.VolumeStatsResp(
usage=[
types.VolumeUsage(
unit=types.UsageUnit.BYTES,
available=fstats.f_bavail * fstats.f_bsize,
total=fstats.f_blocks * fstats.f_bsize,
used=(fstats.f_blocks - fstats.f_bfree) * fstats.f_bsize,
),
types.VolumeUsage(
unit=types.UsageUnit.INODES,
available=fstats.f_ffree,
total=fstats.f_files,
used=fstats.f_files - fstats.f_ffree,
)
]
)



################################################################
#
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.3.0
v2.3.1

0 comments on commit 7d039b8

Please sign in to comment.