-
Notifications
You must be signed in to change notification settings - Fork 7
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
Failed NAB reconciles again after DPA update #141
Comments
LOGS:
|
Description:
When I created a NAB CR in a non-admin namespace, with some enforcedBackupSpec value mismatch to what is set already in DPA by admin (for example snapshotMoveData), NAB validation fails at first, But on updating the DPA enforcedBackupSpec value to match the value with the NAB backup spec, It reconciles and start running again.
Steps to reproduce:
DPA:
`apiVersion: v1
items:
kind: DataProtectionApplication
metadata:
creationTimestamp: "2025-01-22T11:52:33Z"
generation: 15
name: ts-dpa
namespace: openshift-adp
resourceVersion: "306326"
uid: f8d32ddf-c943-4bc5-a6a9-5b4b75454723
spec:
backupLocations:
credential:
key: cloud
name: cloud-credentials-gcp
default: true
objectStorage:
bucket: oadp108491vsrf7
prefix: velero
provider: gcp
configuration:
nodeAgent:
enable: true
uploaderType: kopia
velero:
defaultPlugins:
nonAdmin:
enable: true
enforceBackupSpec:
snapshotMoveData: true
unsupportedOverrides:
tech-preview-ack: "true"
status:
conditions:
message: Reconcile complete
reason: Complete
status: "True"
type: Reconciled
`
`$ oc get nab backuptest1 -o yaml
apiVersion: oadp.openshift.io/v1alpha1
kind: NonAdminBackup
metadata:
creationTimestamp: "2025-01-22T15:23:12Z"
finalizers:
generation: 1
labels:
app.kubernetes.io/created-by: oadp-operator
app.kubernetes.io/instance: nonadminbackup-sample
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: nonadminbackup
app.kubernetes.io/part-of: oadp-operator
name: backuptest1
namespace: sns-3
resourceVersion: "307039"
uid: 2dad0964-f8a3-4f6d-b30d-beac62ccc363
spec:
backupSpec:
defaultVolumesToFsBackup: true
metadata: {}
snapshotMoveData: false
status:
conditions:
message: NonAdminBackup spec.backupSpec.snapshotMoveData field value is enforced
by admin user, can not override it
reason: InvalidBackupSpec
status: "False"
type: Accepted
phase: BackingOff
`
Actual Results
Same NonAdminBackup CR starts running again:
`$ oc get nab backuptest1 -o yaml
apiVersion: oadp.openshift.io/v1alpha1
kind: NonAdminBackup
metadata:
creationTimestamp: "2025-01-22T15:23:12Z"
finalizers:
generation: 1
labels:
app.kubernetes.io/created-by: oadp-operator
app.kubernetes.io/instance: nonadminbackup-sample
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: nonadminbackup
app.kubernetes.io/part-of: oadp-operator
name: backuptest1
namespace: sns-3
resourceVersion: "307490"
uid: 2dad0964-f8a3-4f6d-b30d-beac62ccc363
spec:
backupSpec:
defaultVolumesToFsBackup: true
metadata: {}
snapshotMoveData: false
status:
conditions:
message: backup accepted
reason: BackupAccepted
status: "True"
type: Accepted
message: Created Velero Backup object
reason: BackupScheduled
status: "True"
type: Queued
phase: Created
queueInfo:
estimatedQueuePosition: 1
veleroBackup:
nacuuid: sns-3-backuptest1-148d6cd5-3aa9-4a2b-b777-b82dc754178b
name: sns-3-backuptest1-148d6cd5-3aa9-4a2b-b777-b82dc754178b
namespace: openshift-adp
status:
expiration: "2025-02-21T15:24:07Z"
formatVersion: 1.1.0
phase: InProgress
progress:
totalItems: 150
startTimestamp: "2025-01-22T15:24:07Z"
version: 1
`
and it completes succssfully
`status:
conditions:
message: backup accepted
reason: BackupAccepted
status: "True"
type: Accepted
message: Created Velero Backup object
reason: BackupScheduled
status: "True"
type: Queued
phase: Created
queueInfo:
estimatedQueuePosition: 0
veleroBackup:
nacuuid: sns-3-backuptest1-148d6cd5-3aa9-4a2b-b777-b82dc754178b
name: sns-3-backuptest1-148d6cd5-3aa9-4a2b-b777-b82dc754178b
namespace: openshift-adp
status:
completionTimestamp: "2025-01-22T15:24:19Z"
expiration: "2025-02-21T15:24:07Z"
formatVersion: 1.1.0
hookStatus: {}
phase: Completed
progress:
itemsBackedUp: 153
totalItems: 153
startTimestamp: "2025-01-22T15:24:07Z"
version: 1
`
Expected Results:
Once a NAB is marked as FAILED, It should remain in Failed state.
The text was updated successfully, but these errors were encountered: