From 86082eb137e40465aca484435535f46532223438 Mon Sep 17 00:00:00 2001 From: Lyndon-Li Date: Mon, 9 Dec 2024 16:03:02 +0800 Subject: [PATCH] move the accepted info from annotations to DU/DD CR Signed-off-by: Lyndon-Li --- changelogs/unreleased/8498-Lyndon-Li | 1 + .../bases/velero.io_datadownloads.yaml | 10 ++++++++++ .../v2alpha1/bases/velero.io_datauploads.yaml | 10 ++++++++++ config/crd/v2alpha1/crds/crds.go | 4 ++-- .../velero/v2alpha1/data_download_types.go | 10 ++++++++++ pkg/apis/velero/v2alpha1/data_upload_types.go | 9 +++++++++ .../velero/v2alpha1/zz_generated.deepcopy.go | 8 ++++++++ pkg/builder/data_download_builder.go | 12 ++++++++++++ pkg/builder/data_upload_builder.go | 12 ++++++++++++ pkg/controller/data_download_controller.go | 17 +++++------------ .../data_download_controller_test.go | 16 ++++++---------- pkg/controller/data_upload_controller.go | 19 +++++-------------- pkg/controller/data_upload_controller_test.go | 8 ++++---- 13 files changed, 94 insertions(+), 42 deletions(-) create mode 100644 changelogs/unreleased/8498-Lyndon-Li diff --git a/changelogs/unreleased/8498-Lyndon-Li b/changelogs/unreleased/8498-Lyndon-Li new file mode 100644 index 0000000000..51c19a8484 --- /dev/null +++ b/changelogs/unreleased/8498-Lyndon-Li @@ -0,0 +1 @@ +Related to issue #8485, move the acceptedByNode and acceptedTimestamp to Status of DU/DD CRD \ No newline at end of file diff --git a/config/crd/v2alpha1/bases/velero.io_datadownloads.yaml b/config/crd/v2alpha1/bases/velero.io_datadownloads.yaml index a3f994dc61..c322a23859 100644 --- a/config/crd/v2alpha1/bases/velero.io_datadownloads.yaml +++ b/config/crd/v2alpha1/bases/velero.io_datadownloads.yaml @@ -136,6 +136,16 @@ spec: status: description: DataDownloadStatus is the current status of a DataDownload. properties: + acceptedByNode: + description: Node is name of the node where the DataUpload is prepared. + type: string + acceptedTimestamp: + description: |- + AcceptedTimestamp records the time the DataUpload is to be prepared. + The server's time is used for AcceptedTimestamp + format: date-time + nullable: true + type: string completionTimestamp: description: |- CompletionTimestamp records the time a restore was completed. diff --git a/config/crd/v2alpha1/bases/velero.io_datauploads.yaml b/config/crd/v2alpha1/bases/velero.io_datauploads.yaml index 3502eeac74..005b11e5ff 100644 --- a/config/crd/v2alpha1/bases/velero.io_datauploads.yaml +++ b/config/crd/v2alpha1/bases/velero.io_datauploads.yaml @@ -143,6 +143,16 @@ spec: status: description: DataUploadStatus is the current status of a DataUpload. properties: + acceptedByNode: + description: Node is name of the node where the DataUpload is prepared. + type: string + acceptedTimestamp: + description: |- + AcceptedTimestamp records the time the DataUpload is to be prepared. + The server's time is used for AcceptedTimestamp + format: date-time + nullable: true + type: string completionTimestamp: description: |- CompletionTimestamp records the time a backup was completed. diff --git a/config/crd/v2alpha1/crds/crds.go b/config/crd/v2alpha1/crds/crds.go index ed8f604a10..d67770b45a 100644 --- a/config/crd/v2alpha1/crds/crds.go +++ b/config/crd/v2alpha1/crds/crds.go @@ -29,8 +29,8 @@ import ( ) var rawCRDs = [][]byte{ - []byte("\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xbcYKs\xe3\xb8\x11\xbe\xfbWtM\x0es\x19\xca;\xc9V*\xa5ی\x9cT\xb9\xb2\xe3\xa8\xd6.\xdfA\xa2Ea\a\x04\x10<\xe48\x8f\xff\x9ej\x80\xa4@\x12\xb2,m\xb2\xbc\th|\xf8\xfa\x81\xee\x06TU\xd5\r3\xe2\x19\xad\x13Z\xad\x81\x19\x81\xff\xf0\xa8\xe8\x97[}\xff\x93[\t}{\xf8|\xf3](\xbe\x86Mp^w?\xa3\xd3\xc16x\x87;\xa1\x84\x17Z\xddt\xe8\x19g\x9e\xado\x00\x98R\xda3\x1av\xf4\x13\xa0\xd1\xca[-%ڪE\xb5\xfa\x1ej\xac\x83\x90\x1cm\x04\x1f\xb6>\xfc\xb0\xfa\xfc\xe3\xea\x87\x1b\x00\xc5:\\\x03\xe1q\xfd\xa2\xa4fܭ\x0e(\xd1\xea\x95\xd07\xce`C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56\xa0p&\x87\x89\xaf\xe9\xb9LaM`@\x10\xe4_?\x96\xe3\xf7\xce\xfb\xfe\xf9\x94\xd9\xf8\x04S\xd4LV\x98+q\x94\xa4\xc0\xe8\x03\xeb\xf5I\xc9P\xa0\xdf2\x1f\xc9z\xd5d\xd0s^&\xb4c\x13-\x1dq\x9b\xfeMl\x01\xff\xfe\xef\xdd\xff\x02\x00\x00\xff\xff*b\xfd\xb1\xf5\"\x00\x00"), } var CRDs = crds() diff --git a/pkg/apis/velero/v2alpha1/data_download_types.go b/pkg/apis/velero/v2alpha1/data_download_types.go index 17fe40a263..3a700661a0 100644 --- a/pkg/apis/velero/v2alpha1/data_download_types.go +++ b/pkg/apis/velero/v2alpha1/data_download_types.go @@ -115,6 +115,16 @@ type DataDownloadStatus struct { // Node is name of the node where the DataDownload is processed. // +optional Node string `json:"node,omitempty"` + + // Node is name of the node where the DataUpload is prepared. + // +optional + AcceptedByNode string `json:"acceptedByNode,omitempty"` + + // AcceptedTimestamp records the time the DataUpload is to be prepared. + // The server's time is used for AcceptedTimestamp + // +optional + // +nullable + AcceptedTimestamp *metav1.Time `json:"acceptedTimestamp,omitempty"` } // TODO(2.0) After converting all resources to use the runtime-controller client, the genclient and k8s:deepcopy markers will no longer be needed and should be removed. diff --git a/pkg/apis/velero/v2alpha1/data_upload_types.go b/pkg/apis/velero/v2alpha1/data_upload_types.go index 347bf2dd1a..546caa05e9 100644 --- a/pkg/apis/velero/v2alpha1/data_upload_types.go +++ b/pkg/apis/velero/v2alpha1/data_upload_types.go @@ -144,6 +144,15 @@ type DataUploadStatus struct { // Node is name of the node where the DataUpload is processed. // +optional Node string `json:"node,omitempty"` + // Node is name of the node where the DataUpload is prepared. + // +optional + AcceptedByNode string `json:"acceptedByNode,omitempty"` + + // AcceptedTimestamp records the time the DataUpload is to be prepared. + // The server's time is used for AcceptedTimestamp + // +optional + // +nullable + AcceptedTimestamp *metav1.Time `json:"acceptedTimestamp,omitempty"` } // TODO(2.0) After converting all resources to use the runttime-controller client, diff --git a/pkg/apis/velero/v2alpha1/zz_generated.deepcopy.go b/pkg/apis/velero/v2alpha1/zz_generated.deepcopy.go index a543ac7052..b86c573d30 100644 --- a/pkg/apis/velero/v2alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/velero/v2alpha1/zz_generated.deepcopy.go @@ -118,6 +118,10 @@ func (in *DataDownloadStatus) DeepCopyInto(out *DataDownloadStatus) { *out = (*in).DeepCopy() } out.Progress = in.Progress + if in.AcceptedTimestamp != nil { + in, out := &in.AcceptedTimestamp, &out.AcceptedTimestamp + *out = (*in).DeepCopy() + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDownloadStatus. @@ -266,6 +270,10 @@ func (in *DataUploadStatus) DeepCopyInto(out *DataUploadStatus) { *out = (*in).DeepCopy() } out.Progress = in.Progress + if in.AcceptedTimestamp != nil { + in, out := &in.AcceptedTimestamp, &out.AcceptedTimestamp + *out = (*in).DeepCopy() + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataUploadStatus. diff --git a/pkg/builder/data_download_builder.go b/pkg/builder/data_download_builder.go index b38f20dc86..9364022bd5 100644 --- a/pkg/builder/data_download_builder.go +++ b/pkg/builder/data_download_builder.go @@ -147,3 +147,15 @@ func (d *DataDownloadBuilder) Node(node string) *DataDownloadBuilder { d.object.Status.Node = node return d } + +// AcceptedByNode sets the DataDownload's AcceptedByNode. +func (d *DataDownloadBuilder) AcceptedByNode(node string) *DataDownloadBuilder { + d.object.Status.AcceptedByNode = node + return d +} + +// AcceptedTimestamp sets the DataDownload's AcceptedTimestamp. +func (d *DataDownloadBuilder) AcceptedTimestamp(acceptedTimestamp *metav1.Time) *DataDownloadBuilder { + d.object.Status.AcceptedTimestamp = acceptedTimestamp + return d +} diff --git a/pkg/builder/data_upload_builder.go b/pkg/builder/data_upload_builder.go index fd737452aa..b4fa72e438 100644 --- a/pkg/builder/data_upload_builder.go +++ b/pkg/builder/data_upload_builder.go @@ -150,3 +150,15 @@ func (d *DataUploadBuilder) Node(node string) *DataUploadBuilder { d.object.Status.Node = node return d } + +// AcceptedByNode sets the DataUpload's AcceptedByNode. +func (d *DataUploadBuilder) AcceptedByNode(node string) *DataUploadBuilder { + d.object.Status.AcceptedByNode = node + return d +} + +// AcceptedTimestamp sets the DataUpload's AcceptedTimestamp. +func (d *DataUploadBuilder) AcceptedTimestamp(acceptedTimestamp *metav1.Time) *DataUploadBuilder { + d.object.Status.AcceptedTimestamp = acceptedTimestamp + return d +} diff --git a/pkg/controller/data_download_controller.go b/pkg/controller/data_download_controller.go index 39973fbc5f..b2660f93c5 100644 --- a/pkg/controller/data_download_controller.go +++ b/pkg/controller/data_download_controller.go @@ -223,11 +223,9 @@ func (r *DataDownloadReconciler) Reconcile(ctx context.Context, req ctrl.Request } else if peekErr := r.restoreExposer.PeekExposed(ctx, getDataDownloadOwnerObject(dd)); peekErr != nil { r.tryCancelAcceptedDataDownload(ctx, dd, fmt.Sprintf("found a dataupload %s/%s with expose error: %s. mark it as cancel", dd.Namespace, dd.Name, peekErr)) log.Errorf("Cancel dd %s/%s because of expose error %s", dd.Namespace, dd.Name, peekErr) - } else if at, found := dd.Annotations[acceptTimeAnnoKey]; found { - if t, err := time.Parse(time.RFC3339, at); err == nil { - if time.Since(t) >= r.preparingTimeout { - r.onPrepareTimeout(ctx, dd) - } + } else if dd.Status.AcceptedTimestamp != nil { + if time.Since(dd.Status.AcceptedTimestamp.Time) >= r.preparingTimeout { + r.onPrepareTimeout(ctx, dd) } } @@ -636,13 +634,8 @@ func (r *DataDownloadReconciler) acceptDataDownload(ctx context.Context, dd *vel updateFunc := func(datadownload *velerov2alpha1api.DataDownload) { datadownload.Status.Phase = velerov2alpha1api.DataDownloadPhaseAccepted - annotations := datadownload.GetAnnotations() - if annotations == nil { - annotations = make(map[string]string) - } - annotations[acceptNodeAnnoKey] = r.nodeName - annotations[acceptTimeAnnoKey] = r.Clock.Now().Format(time.RFC3339) - datadownload.SetAnnotations(annotations) + datadownload.Status.AcceptedByNode = r.nodeName + datadownload.Status.AcceptedTimestamp = &metav1.Time{Time: r.Clock.Now()} } succeeded, err := r.exclusiveUpdateDataDownload(ctx, updated, updateFunc) diff --git a/pkg/controller/data_download_controller_test.go b/pkg/controller/data_download_controller_test.go index f7d35ff661..dc9c201967 100644 --- a/pkg/controller/data_download_controller_test.go +++ b/pkg/controller/data_download_controller_test.go @@ -349,7 +349,7 @@ func TestDataDownloadReconcile(t *testing.T) { }, { name: "prepare timeout", - dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).Annotations(map[string]string{acceptTimeAnnoKey: (time.Now().Add(-time.Minute * 5)).Format(time.RFC3339)}).Result(), + dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).AcceptedTimestamp(&metav1.Time{Time: time.Now().Add(-time.Minute * 5)}).Result(), expected: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseFailed).Result(), }, { @@ -1003,23 +1003,19 @@ func TestAttemptDataDownloadResume(t *testing.T) { }, { name: "accepted DataDownload in the current node", - dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).Annotations(map[string]string{acceptNodeAnnoKey: "node-1"}).Result(), + dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).AcceptedByNode("node-1").Result(), cancelledDataDownloads: []string{dataDownloadName}, acceptedDataDownloads: []string{dataDownloadName}, }, { - name: "accepted DataDownload with dd label but is canceled", - dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).Cancel(true).Annotations(map[string]string{ - acceptNodeAnnoKey: "node-1", - }).Result(), + name: "accepted DataDownload with dd label but is canceled", + dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).Cancel(true).AcceptedByNode("node-1").Result(), acceptedDataDownloads: []string{dataDownloadName}, cancelledDataDownloads: []string{dataDownloadName}, }, { - name: "accepted DataDownload with dd label but cancel fail", - dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).Annotations(map[string]string{ - acceptNodeAnnoKey: "node-1", - }).Result(), + name: "accepted DataDownload with dd label but cancel fail", + dd: dataDownloadBuilder().Phase(velerov2alpha1api.DataDownloadPhaseAccepted).AcceptedByNode("node-1").Result(), needErrs: []bool{false, false, true, false, false, false}, acceptedDataDownloads: []string{dataDownloadName}, }, diff --git a/pkg/controller/data_upload_controller.go b/pkg/controller/data_upload_controller.go index ecf23ced8e..5ea768bd1b 100644 --- a/pkg/controller/data_upload_controller.go +++ b/pkg/controller/data_upload_controller.go @@ -55,8 +55,6 @@ import ( const ( dataUploadDownloadRequestor = "snapshot-data-upload-download" - acceptNodeAnnoKey = "velero.io/accepted-by" - acceptTimeAnnoKey = "velero.io/accepted-at" DataUploadDownloadFinalizer = "velero.io/data-upload-download-finalizer" preparingMonitorFrequency = time.Minute ) @@ -256,11 +254,9 @@ func (r *DataUploadReconciler) Reconcile(ctx context.Context, req ctrl.Request) } else if peekErr := ep.PeekExposed(ctx, getOwnerObject(du)); peekErr != nil { r.tryCancelAcceptedDataUpload(ctx, du, fmt.Sprintf("found a dataupload %s/%s with expose error: %s. mark it as cancel", du.Namespace, du.Name, peekErr)) log.Errorf("Cancel du %s/%s because of expose error %s", du.Namespace, du.Name, peekErr) - } else if at, found := du.Annotations[acceptTimeAnnoKey]; found { - if t, err := time.Parse(time.RFC3339, at); err == nil { - if time.Since(t) >= r.preparingTimeout { - r.onPrepareTimeout(ctx, du) - } + } else if du.Status.AcceptedTimestamp != nil { + if time.Since(du.Status.AcceptedTimestamp.Time) >= r.preparingTimeout { + r.onPrepareTimeout(ctx, du) } } @@ -704,13 +700,8 @@ func (r *DataUploadReconciler) acceptDataUpload(ctx context.Context, du *velerov updateFunc := func(dataUpload *velerov2alpha1api.DataUpload) { dataUpload.Status.Phase = velerov2alpha1api.DataUploadPhaseAccepted - annotations := dataUpload.GetAnnotations() - if annotations == nil { - annotations = make(map[string]string) - } - annotations[acceptNodeAnnoKey] = r.nodeName - annotations[acceptTimeAnnoKey] = r.Clock.Now().Format(time.RFC3339) - dataUpload.SetAnnotations(annotations) + dataUpload.Status.AcceptedByNode = r.nodeName + dataUpload.Status.AcceptedTimestamp = &metav1.Time{Time: r.Clock.Now()} } succeeded, err := r.exclusiveUpdateDataUpload(ctx, updated, updateFunc) diff --git a/pkg/controller/data_upload_controller_test.go b/pkg/controller/data_upload_controller_test.go index c6cdfa0915..3b8c15a137 100644 --- a/pkg/controller/data_upload_controller_test.go +++ b/pkg/controller/data_upload_controller_test.go @@ -475,7 +475,7 @@ func TestReconcile(t *testing.T) { }, { name: "prepare timeout", - du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).SnapshotType(fakeSnapshotType).Annotations(map[string]string{acceptTimeAnnoKey: (time.Now().Add(-time.Minute * 5)).Format(time.RFC3339)}).Result(), + du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).SnapshotType(fakeSnapshotType).AcceptedTimestamp(&metav1.Time{Time: time.Now().Add(-time.Minute * 5)}).Result(), expected: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseFailed).Result(), }, { @@ -1071,19 +1071,19 @@ func TestAttemptDataUploadResume(t *testing.T) { }, { name: "accepted DataUpload in the current node", - du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).Annotations(map[string]string{acceptNodeAnnoKey: "node-1"}).Result(), + du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).AcceptedByNode("node-1").Result(), cancelledDataUploads: []string{dataUploadName}, acceptedDataUploads: []string{dataUploadName}, }, { name: "accepted DataUpload in the current node but canceled", - du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).Annotations(map[string]string{acceptNodeAnnoKey: "node-1"}).Cancel(true).Result(), + du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).AcceptedByNode("node-1").Cancel(true).Result(), cancelledDataUploads: []string{dataUploadName}, acceptedDataUploads: []string{dataUploadName}, }, { name: "accepted DataUpload in the current node but update error", - du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).Annotations(map[string]string{acceptNodeAnnoKey: "node-1"}).Result(), + du: dataUploadBuilder().Phase(velerov2alpha1api.DataUploadPhaseAccepted).AcceptedByNode("node-1").Result(), needErrs: []bool{false, false, true, false, false, false}, acceptedDataUploads: []string{dataUploadName}, },