-
Bug
-
Resolution: Unresolved
-
Normal
-
OADP 1.4.1
-
3
-
False
-
-
False
-
ToDo
-
-
-
0
-
0.000
-
Very Likely
-
0
-
Customer Escalated, Customer Facing
-
None
-
Unset
-
Unknown
-
None
Description of problem:
Create a schedule CR with wrong spec.schedule value. Now patch the schedule CR with correct value. ValidationError field still exists even though the schedule CR phase is enabled.
Version-Release number of selected component (if applicable):
OADP 1.4.1
How reproducible:
Always
Steps to Reproduce:
1. Create a dpa
$ oc get dpa ts-dpa -o yaml apiVersion: oadp.openshift.io/v1alpha1 kind: DataProtectionApplication metadata: creationTimestamp: "2025-01-02T09:44:46Z" generation: 1 name: ts-dpa namespace: openshift-adp resourceVersion: "74120" uid: 04ca853b-6137-4598-b641-7f223c4c6a5f spec: backupLocations: - velero: credential: key: cloud name: cloud-credentials-gcp default: true objectStorage: bucket: oadp1063916k8dq prefix: velero provider: gcp configuration: nodeAgent: enable: true uploaderType: kopia velero: defaultPlugins: - gcp - openshift - csi status: conditions: - lastTransitionTime: "2025-01-02T09:45:38Z" message: Reconcile complete reason: Complete status: "True" type: Reconciled
2. Now create a schedule CR with wrong spec.schedule value. here I'm adding a additional quote at the end of string
$ oc get schedule test-schedule-with-additional-single-quote -o yaml apiVersion: velero.io/v1 kind: Schedule metadata: creationTimestamp: "2025-01-02T10:36:40Z" generation: 2 name: test-schedule-with-additional-single-quote namespace: openshift-adp resourceVersion: "91451" uid: 82910069-cbbb-426c-bbe7-a9d87d0160ab spec: paused: false schedule: 1 0 * * *' skipImmediately: false template: defaultVolumesToRestic: true includedNamespaces: - legit storageLocation: oadp-1 ttl: 72h0m0s status: phase: FailedValidation validationErrors: - 'invalid schedule: Failed to parse int from *'': strconv.Atoi: parsing "*''": invalid syntax'
3. Now edit schedule CR and remove the single quote
$ oc get schedule test-schedule-with-additional-single-quote -o yaml apiVersion: velero.io/v1 kind: Schedule metadata: creationTimestamp: "2025-01-02T10:36:40Z" generation: 4 name: test-schedule-with-additional-single-quote namespace: openshift-adp resourceVersion: "91792" uid: 82910069-cbbb-426c-bbe7-a9d87d0160ab spec: paused: false schedule: 1 0 * * * skipImmediately: false template: defaultVolumesToRestic: true includedNamespaces: - legit storageLocation: oadp-1 ttl: 72h0m0s status: phase: Enabled validationErrors: - 'invalid schedule: Failed to parse int from *'': strconv.Atoi: parsing "*''": invalid syntax'
Actual results:
ValidationErrors field is giving wrong information even though the spec is correct.
Expected results:
ValidationErrors field should fade away once the CR spec is right.
Additional info: