STOR-1804: use new snapshot options from ClusterCSIDriver#226
STOR-1804: use new snapshot options from ClusterCSIDriver#226openshift-merge-bot[bot] merged 2 commits intoopenshift:masterfrom
Conversation
|
@RomanBednar: This pull request references STOR-1804 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RomanBednar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5ccf8cd to
69ee81c
Compare
69ee81c to
95e4b05
Compare
|
@RomanBednar: This pull request references STOR-1804 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
95e4b05 to
9c29f66
Compare
40fc22a to
f75f4ec
Compare
|
Re-tested with latest openshift/api PR, looks ok: |
|
/label qe-approved 1. Check the default setting should be `3`.
# Create 4 snapshots and verify the 4th failed to create:
$ oc -n default get volumesnapshots/app-pvc-snapshot-4 -oyaml
...
error:
message: 'Failed to check and update snapshot content: failed to take snapshot of the volume cf20c294-9af7-4722-89fd-b95921b30df0: "rpc error: code = FailedPrecondition desc = the number of snapshots on the source volume cf20c294-9af7-4722-89fd-b95921b30df0 reaches the configured maximum (3)"'
...
2. Change the `global-max-snapshots-per-block-volume = 10` and `granular-max-snapshots-per-block-volume-vsan = 5 `, check the granular-max-snapshots-per-block-volume-vsan should overwrite the max value for vSAN volumes as expected.
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"globalMaxSnapshotsPerBlockVolume": 10}}}}'
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"granularMaxSnapshotsPerBlockVolumeInVSAN": 5}}}}'
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
$ oc -n openshift-cluster-csi-drivers get cm/vsphere-csi-config -o yaml
apiVersion: v1
data:
cloud.conf: |
# Labels with topology values are added dynamically via operator
[Global]
cluster-id = pewang-0408vv-pf8v5
[VirtualCenter "vcenter.devqe.ibmc.devcluster.openshift.com"]
insecure-flag = true
datacenters = DEVQEdatacenter
migration-datastore-url = ds:///vmfs/volumes/vsan:527320283a8c3163-2faa6dc5949a3a28/
[Snapshot]
global-max-snapshots-per-block-volume = 10
granular-max-snapshots-per-block-volume-vsan = 5
kind: ConfigMap
metadata:
creationTimestamp: "2024-04-08T01:27:45Z"
name: vsphere-csi-config
namespace: openshift-cluster-csi-drivers
resourceVersion: "330478"
uid: c6d0dac1-6ece-48d3-a0db-1932c18ff06e
# Create 6 snapshots and verify the 6th failed to create:
$ oc -n mystorage get volumesnapshots/vsan-pvc-snapshot-6 -oyaml
...
status:
boundVolumeSnapshotContentName: snapcontent-ada27b34-f71a-42d6-8e0c-c4a4368f42c4
error:
message: 'Failed to check and update snapshot content: failed to take snapshot of the volume 314d491b-d972-4177-8024-04b41c9306d5: "rpc error: code = FailedPrecondition desc = the number of snapshots on the source volume 314d491b-d972-4177-8024-04b41c9306d5 reaches the configured maximum (5)"'
time: '2024-04-08T03:27:57Z'
readyToUse: false
...
3. Remove the configurations it should be recoverd to be the default value.
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=json -p='[{"op": "remove", "path": "/spec/driverConfig/vSphere"}]'
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
$ oc -n openshift-cluster-csi-drivers get cm/vsphere-csi-config -o yaml
apiVersion: v1
data:
cloud.conf: |
# Labels with topology values are added dynamically via operator
[Global]
cluster-id = pewang-0408vv-pf8v5
[VirtualCenter "vcenter.devqe.ibmc.devcluster.openshift.com"]
insecure-flag = true
datacenters = DEVQEdatacenter
migration-datastore-url = ds:///vmfs/volumes/vsan:527320283a8c3163-2faa6dc5949a3a28/
kind: ConfigMap
metadata:
creationTimestamp: "2024-04-08T01:27:45Z"
name: vsphere-csi-config
namespace: openshift-cluster-csi-drivers
resourceVersion: "333640"
uid: c6d0dac1-6ece-48d3-a0db-1932c18ff06e
# Create 4 snapshots and verify the 4th failed to create:
$ oc -n default get volumesnapshots/app-pvc-snapshot-4 -oyaml
...
error:
message: 'Failed to check and update snapshot content: failed to take snapshot of the volume 314d491b-d972-4177-8024-04b41c9306d5: "rpc error: code = FailedPrecondition desc = the number of snapshots on the source volume 314d491b-d972-4177-8024-04b41c9306d5 reaches the configured maximum (3)"'
time: '2024-04-08T14:20:02Z'
readyToUse: false
...
|
|
@RomanBednar: This pull request references STOR-1804 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
f75f4ec to
13316b5
Compare
13316b5 to
1f2686a
Compare
|
/retest-required |
1 similar comment
|
/retest-required |
1f2686a to
ebbfaf2
Compare
|
/lgtm |
ebbfaf2 to
c96852f
Compare
|
/label px-approved |
|
/retest-required |
1 similar comment
|
/retest-required |
|
/test e2e-vsphere-ovn-upgrade |
2 similar comments
|
/test e2e-vsphere-ovn-upgrade |
|
/test e2e-vsphere-ovn-upgrade |
|
/lgtm |
|
/override ci/prow/e2e-vsphere-ovn-upgrade |
|
@jsafrane: Overrode contexts on behalf of jsafrane: ci/prow/e2e-vsphere-ovn-upgrade DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@RomanBednar: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
[ART PR BUILD NOTIFIER] This PR has been included in build ose-vmware-vsphere-csi-driver-operator-container-v4.16.0-202404191609.p0.gb518a76.assembly.stream.el9 for distgit ose-vmware-vsphere-csi-driver-operator. |
Related PRs:
Basic smoke test:
Check current vSphere config map:
Add global snapshot limit:
Verify operator reflected changes in config map:
Verify cloud.conf mounted to pod is updated correctly:
Remove the newly added option:
Verify the config map is restored:
Try to set all available config options:
Verify all options are set:
Clean up all config options:
Set global snapshot limit to 5:
Create 6 snapshots and verify the 6th failed to create: