Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow volume snapshot creation from supervisor directly. #2852

Merged

Conversation

akankshapanse
Copy link
Contributor

@akankshapanse akankshapanse commented Apr 12, 2024

NOTE: This is temporary change and will be reverted after storage quota support for snapshots FSS enabled.

What this PR does / why we need it:
This PR allows snapshot creation from supervisor by removing webhook check temporarily for ease of testing.
NOTE: This is temporary change and will be reverted after storage quota support for snapshots FSS enabled.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Testing done:
Before fix:

root@420bc997e27955b098ab2b5241b87781 [ ~ ]# kubectl create -f snap.yaml -n svc-velero-domain-c52
Error from server (Snapshot creation initiated directly from the Supervisor cluster is not supported. Please initiate snapshot creation from the Guest cluster.): error when creating "snap.yaml": admission webhook "validation.csi.vsphere.vmware.com" denied the request: Snapshot creation initiated directly from the Supervisor cluster is not supported. Please initiate snapshot creation from the Guest cluster.
root@420bc997e27955b098ab2b5241b87781 [ ~ ]#

After fix with manually enabling StorageQuotaM2 FSS and restarting webhook pods:

root@420bc997e27955b098ab2b5241b87781 [ ~ ]# kubectl get configmaps -n vmware-system-csi csi-feature-states -o yaml
apiVersion: v1
data:
  async-query-volume: "true"
  block-volume-snapshot: "true"
  cnsmgr-suspend-create-volume: "true"
  csi-sv-feature-states-replication: "true"
  fake-attach: "true"
  file-volume: "true"
  improved-csi-idempotency: "true"
  list-volumes: "true"
  listview-tasks: "true"
  online-volume-extend: "true"
  sibling-replica-bound-pvc-check: "true"
  storage-quota-m2: "true"                         <<< changed manually
  tkgs-ha: "true"
  trigger-csi-fullsync: "false"
  volume-extend: "true"
  volume-health: "true"
kind: ConfigMap
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","data":{"async-query-volume":"true","block-volume-snapshot":"true","cnsmgr-suspend-create-volume":"true","csi-sv-feature-states-replication":"true","fake-attach":"true","file-volume":"true","improved-csi-idempotency":"true","list-volumes":"true","listview-tasks":"true","online-volume-extend":"true","sibling-replica-bound-pvc-check":"true","tkgs-ha":"true","trigger-csi-fullsync":"false","volume-extend":"true","volume-health":"true"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"csi-feature-states","namespace":"vmware-system-csi"}}
  creationTimestamp: "2024-04-11T08:44:52Z"
  name: csi-feature-states
  namespace: vmware-system-csi
  resourceVersion: "12389353"
  uid: 3bc08c5b-c04e-49ae-abe5-b4042f7d9ea2
root@420bc997e27955b098ab2b5241b87781 [ ~ ]#

root@420bc997e27955b098ab2b5241b87781 [ ~ ]# kubectl get pods -n vmware-system-csi
NAME                                    READY   STATUS             RESTARTS     AGE
vsphere-csi-controller-79bf77c5-qdpxx   7/7     Running            0            3m8s
vsphere-csi-controller-79bf77c5-qqnmp   7/7     Running            0            3m17s
vsphere-csi-webhook-5d4c4b9c8b-8rjpz    0/1     CrashLoopBackOff   1 (3s ago)   5s
vsphere-csi-webhook-5d4c4b9c8b-wj9mb    1/1     Running            0            5s          <<< restarted to fetch latest FSS value
root@420bc997e27955b098ab2b5241b87781 [ ~ ]#

root@420bc997e27955b098ab2b5241b87781 [ ~ ]# kubectl create -f snap.yaml -n svc-velero-domain-c52
volumesnapshot.snapshot.storage.k8s.io/example-raw-block-snapshot created
root@420bc997e27955b098ab2b5241b87781 [ ~ ]#

Special notes for your reviewer:

Release note:

Allow volume snapshot creation from supervisor directly.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 12, 2024
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 18, 2024
@akankshapanse akankshapanse changed the title Allow volume snapshot creation from supervisor directly. [WIP] Allow volume snapshot creation from supervisor directly. Apr 18, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 18, 2024
@akankshapanse akankshapanse changed the title [WIP] Allow volume snapshot creation from supervisor directly. Allow volume snapshot creation from supervisor directly. Apr 24, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 24, 2024
@svcbot-qecnsdp
Copy link

Started WCP block pre-checkin pipeline... Build Number: 1393

@svcbot-qecnsdp
Copy link

Build ID: 1393
WCP build status: FAILURE 
Stage before exit: null 

@svcbot-qecnsdp
Copy link

Started WCP block pre-checkin pipeline... Build Number: 1396

@svcbot-qecnsdp
Copy link

Build ID: 1396
WCP build status: FAILURE 
Stage before exit: null 

@akankshapanse
Copy link
Contributor Author

akankshapanse commented Apr 25, 2024

WCP precheck-in pipeline result with StorageQuotaM2 FSS disabled:

PR 2852
Ran 13 of 848 Specs in 2676.707 seconds 
SUCCESS! -- 13 Passed | 0 Failed | 0 Pending | 835 Skipped 
PASS 
Ginkgo ran 1 suite in 45m41.962041288s 
Test Suite Passed 
make: Leaving directory `/home/worker/workspace/csi-wcp-precheckin/Results/1398/vsphere-csi-driver'

@xing-yang xing-yang added this to the Storage Quota for Snapshots milestone Apr 26, 2024
NOTE: This is temporary change and will be reverted after StorageQuotaM2 FSS enabled.
@deepakkinni
Copy link
Contributor

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2024
@xing-yang
Copy link
Contributor

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 30, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akankshapanse, deepakkinni, xing-yang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [deepakkinni,xing-yang]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 028f553 into kubernetes-sigs:master Apr 30, 2024
12 checks passed
@akankshapanse akankshapanse deleted the allow_snap_on_svc branch May 2, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants