Skip to content

Commit 348a3a1

Browse files
authored
Merge pull request #807 from andyzhangx/fuse2-test
test: add blobfuse2 external tests
2 parents 6d84562 + 3afbf10 commit 348a3a1

File tree

8 files changed

+46
-10
lines changed

8 files changed

+46
-10
lines changed

deploy/example/e2e_usage.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ spec:
9292
csi:
9393
driver: blob.csi.azure.com
9494
readOnly: false
95-
volumeHandle: unique-volumeid # make sure this volumeid is unique in the cluster
95+
# make sure volumeid is unique for every identical storage blob container in the cluster
96+
# character `#` is reserved for internal use and cannot be used in volumehandle
97+
volumeHandle: unique-volumeid
9698
volumeAttributes:
9799
containerName: EXISTING_CONTAINER_NAME
98100
nodeStageSecretRef:

deploy/example/pv-blobfuse-auth.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ spec:
1616
csi:
1717
driver: blob.csi.azure.com
1818
readOnly: false
19-
# make sure this volumeid is unique in the cluster
20-
# `#` is not allowed in self defined volumeHandle
19+
# make sure volumeid is unique for every identical storage blob container in the cluster
20+
# character `#` is reserved for internal use and cannot be used in volumehandle
2121
volumeHandle: unique-volumeid
2222
volumeAttributes:
2323
resourceGroup: EXISTING_RESOURCE_GROUP_NAME

deploy/example/pv-blobfuse-csi-keyvault.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ spec:
1313
csi:
1414
driver: blob.csi.azure.com
1515
readOnly: false
16-
# make sure this volumeid is unique in the cluster
17-
# `#` is not allowed in self defined volumeHandle
16+
# make sure volumeid is unique for every identical storage blob container in the cluster
17+
# character `#` is reserved for internal use and cannot be used in volumehandle
1818
volumeHandle: unique-volumeid
1919
volumeAttributes:
2020
containerName: EXISTING_CONTAINER_NAME

deploy/example/pv-blobfuse-csi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ spec:
1616
csi:
1717
driver: blob.csi.azure.com
1818
readOnly: false
19-
# make sure this volumeid is unique in the cluster
20-
# `#` is not allowed in self defined volumeHandle
19+
# make sure volumeid is unique for every identical storage blob container in the cluster
20+
# character `#` is reserved for internal use and cannot be used in volumehandle
2121
volumeHandle: unique-volumeid
2222
volumeAttributes:
2323
resourceGroup: EXISTING_RESOURCE_GROUP_NAME

deploy/example/pv-blobfuse-nfs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ spec:
1313
csi:
1414
driver: blob.csi.azure.com
1515
readOnly: false
16-
# make sure this volumeid is unique in the cluster
17-
# `#` is not allowed in self defined volumeHandle
16+
# make sure volumeid is unique for every identical storage blob container in the cluster
17+
# character `#` is reserved for internal use and cannot be used in volumehandle
1818
volumeHandle: unique-volumeid
1919
volumeAttributes:
2020
resourceGroup: EXISTING_RESOURCE_GROUP_NAME
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: storage.k8s.io/v1
3+
kind: StorageClass
4+
metadata:
5+
name: blob-fuse
6+
provisioner: blob.csi.azure.com
7+
parameters:
8+
skuName: Premium_LRS # available values: Standard_LRS, Premium_LRS, Standard_GRS, Standard_RAGRS
9+
protocol: fuse2
10+
reclaimPolicy: Delete
11+
volumeBindingMode: Immediate
12+
allowVolumeExpansion: true
13+
mountOptions:
14+
- -o allow_other
15+
- --file-cache-timeout-in-seconds=120
16+
- --use-attr-cache=true
17+
- --cancel-list-on-mount-seconds=10 # prevent billing charges on mounting
18+
- -o attr_timeout=120
19+
- -o entry_timeout=120
20+
- -o negative_timeout=120
21+
- --log-level=LOG_WARNING # LOG_WARNING, LOG_INFO, LOG_DEBUG
22+
- --cache-size-mb=1000 # Default will be 80% of available memory, eviction will happen beyond that.

docs/driver-parameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ pvc-92a4d7f2-f23b-4904-bad4-2cbfcff6e388
6767
6868
Name | Meaning | Available Value | Mandatory | Default value
6969
--- | --- | --- | --- | ---
70+
volumeHandle | a value the driver can use to uniquely identify the storage blob container in the cluster. | A recommended way to produce a unique value is to combine the globally unique storage account name and container name: `{account-name}_{container-name}`. Be aware the character `#` is reserved for internal use and cannot be used in a volume handle. | Yes |
7071
volumeAttributes.resourceGroup | Azure resource group name | existing resource group name | No | if empty, driver will use the same resource group name as current k8s cluster
7172
volumeAttributes.storageAccount | existing storage account name | existing storage account name | Yes |
7273
volumeAttributes.containerName | existing container name | existing container name | Yes |

test/external-e2e/run.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ trap print_logs EXIT
5656
mkdir -p /tmp/csi
5757

5858
if [ ! -z ${EXTERNAL_E2E_TEST_BLOBFUSE} ]; then
59-
echo "begin to run blobfuse tests ...."
59+
echo "begin to run blobfuse v1 tests ...."
6060
cp deploy/example/storageclass-blobfuse.yaml /tmp/csi/storageclass.yaml
6161
# achieve close-to-open cache consistency like in NFSv3
6262
sed -i 's/file-cache-timeout-in-seconds=120/file-cache-timeout-in-seconds=0/g' /tmp/csi/storageclass.yaml
@@ -66,6 +66,17 @@ if [ ! -z ${EXTERNAL_E2E_TEST_BLOBFUSE} ]; then
6666
--kubeconfig=$KUBECONFIG
6767
fi
6868

69+
if [ ! -z ${EXTERNAL_E2E_TEST_BLOBFUSE_v2} ]; then
70+
echo "begin to run blobfuse v2 tests ...."
71+
cp deploy/example/storageclass-blobfuse2.yaml /tmp/csi/storageclass.yaml
72+
# achieve close-to-open cache consistency like in NFSv3
73+
sed -i 's/file-cache-timeout-in-seconds=120/file-cache-timeout-in-seconds=0/g' /tmp/csi/storageclass.yaml
74+
ginkgo -p --progress --v -focus="External.Storage.*$DRIVER.csi.azure.com" \
75+
-skip='\[Disruptive\]|allow exec of files on the volume|unmount after the subpath directory is deleted|should concurrently access the single volume from pods on different node|pod created with an initial fsgroup, volume contents ownership changed via chgrp in first pod, new pod with same fsgroup skips ownership changes to the volume contents|should provision storage with any volume data source|should mount multiple PV pointing to the same storage on the same node' kubernetes/test/bin/e2e.test -- \
76+
-storage.testdriver=$PROJECT_ROOT/test/external-e2e/testdriver-blobfuse.yaml \
77+
--kubeconfig=$KUBECONFIG
78+
fi
79+
6980
if [ ! -z ${EXTERNAL_E2E_TEST_NFS} ]; then
7081
echo "begin to run NFSv3 tests ...."
7182
cp deploy/example/storageclass-blob-nfs.yaml /tmp/csi/storageclass.yaml

0 commit comments

Comments
 (0)