Skip to content

Commit 74a9463

Browse files
authored
update status subresource when CNSRegisterVolume fails (#3704)
1 parent 52479e0 commit 74a9463

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

manifests/supervisorcluster/1.29/cns-csi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ rules:
5858
resources: ["cnsfilevolumeclients"]
5959
verbs: ["get", "list", "update", "create", "delete"]
6060
- apiGroups: ["cns.vmware.com"]
61-
resources: ["cnsregistervolumes", "cnsunregistervolumes", "cnsunregistervolumes/status"]
61+
resources: ["cnsregistervolumes", "cnsregistervolumes/status", "cnsunregistervolumes", "cnsunregistervolumes/status"]
6262
verbs: ["get", "list", "watch", "update", "delete"]
6363
- apiGroups: ["cns.vmware.com"]
6464
resources: ["triggercsifullsyncs"]

manifests/supervisorcluster/1.30/cns-csi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ rules:
5858
resources: ["cnsfilevolumeclients"]
5959
verbs: ["get", "list", "update", "create", "delete"]
6060
- apiGroups: ["cns.vmware.com"]
61-
resources: ["cnsregistervolumes", "cnsunregistervolumes", "cnsunregistervolumes/status"]
61+
resources: ["cnsregistervolumes", "cnsregistervolumes/status", "cnsunregistervolumes", "cnsunregistervolumes/status"]
6262
verbs: ["get", "list", "watch", "update", "delete"]
6363
- apiGroups: ["cns.vmware.com"]
6464
resources: ["triggercsifullsyncs"]

manifests/supervisorcluster/1.31/cns-csi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ rules:
5858
resources: ["cnsfilevolumeclients"]
5959
verbs: ["get", "list", "update", "create", "delete"]
6060
- apiGroups: ["cns.vmware.com"]
61-
resources: ["cnsregistervolumes", "cnsunregistervolumes", "cnsunregistervolumes/status"]
61+
resources: ["cnsregistervolumes", "cnsregistervolumes/status", "cnsunregistervolumes", "cnsunregistervolumes/status"]
6262
verbs: ["get", "list", "watch", "update", "delete"]
6363
- apiGroups: ["cns.vmware.com"]
6464
resources: ["triggercsifullsyncs"]

manifests/supervisorcluster/1.32/cns-csi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ rules:
5858
resources: ["cnsfilevolumeclients"]
5959
verbs: ["get", "list", "update", "create", "delete"]
6060
- apiGroups: ["cns.vmware.com"]
61-
resources: ["cnsregistervolumes", "cnsunregistervolumes", "cnsunregistervolumes/status"]
61+
resources: ["cnsregistervolumes", "cnsregistervolumes/status", "cnsunregistervolumes", "cnsunregistervolumes/status"]
6262
verbs: ["get", "list", "watch", "update", "delete"]
6363
- apiGroups: ["cns.vmware.com"]
6464
resources: ["triggercsifullsyncs"]

pkg/syncer/cnsoperator/controller/cnsregistervolume/cnsregistervolume_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ func setInstanceError(ctx context.Context, r *ReconcileCnsRegisterVolume,
10351035
instance *cnsregistervolumev1alpha1.CnsRegisterVolume, errMsg string) {
10361036
log := logger.GetLogger(ctx)
10371037
instance.Status.Error = errMsg
1038-
err := updateCnsRegisterVolume(ctx, r.client, instance)
1038+
err := k8s.UpdateStatus(ctx, r.client, instance)
10391039
if err != nil {
10401040
log.Errorf("updateCnsRegisterVolume failed. err: %v", err)
10411041
}

0 commit comments

Comments
 (0)