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

Since Velero v1.12.0 and newer, backing up a non-existing namespace is now reporting as "Completed" instead of "Failure" this affects our failed alerts #7431

Closed
egondalia opened this issue Feb 15, 2024 · 4 comments · Fixed by #7569
Assignees
Labels
in-test-plan Need E2E Test Case Needs triage We need discussion to understand problem and decide the priority
Milestone

Comments

@egondalia
Copy link

egondalia commented Feb 15, 2024

Velero Version 1.11.1 and older output STATUS worked ok, either a Failed or PartiallyFailed running below: (see results below)

  1. Velero Versions =< 1.11.1 - Create backup of a non-existing NameSpace (status fails ok)

velero backup create mybackup1-11.1-and-older --include-namespaces 'nonexisting1ns' --include-resources '*' --include-cluster-resources=true

Results

velero get backup
NAME                                             STATUS                ERR   WARN   CREATED                         
mybackup1-11.1-and-older                         **PartiallyFailed**   1     0          2024-02-14 09:44:05 +0000 UTC   

###########################################################################################

Running the same command on Velero Version(s) greater than 1.12.0 (status now shows "Completed" but should show as failure because the namespace does not exist)

2 Velero Version above > 1.11.1 - Backup of a non-existing NameSpace (shows Completed should state failure BUG)

velero backup create mybackup1-12-0-and-above --include-namespaces 'nonexisting1ns'' --include-resources '*' --include-cluster-resources=true
Results

(Note the 2nd job should states a failure but shows up Completed, the Namespace does not exist but still completes)

velero get backup
NAME                                              STATUS            ERR   WARN   CREATED                         
mybackup1-11.1-and-older                      PartiallyFailed       1     0          2024-02-14 09:44:05 +0000 UTC   
mybackup1-12-0-and-above                       **Completed**         0     0          2024-02-14 10:03:51 +0000 UTC   

What did you expect to happen:
The second job should also have failed or reported as PartiallyFailed like previous versions of Velero did, any version above 1.11.1 is now outputs the Status as Completed instead of failed (note: The Namespace I am backing up does not exist so should continue to fail on newer version)

@egondalia egondalia changed the title Since Velero v1.11.1 backing up a non-existing namespace is reporting as "Completed" instead of a "Failure" this affects our failed alerts Since Velero v1.12.0 and newer, backing up a non-existing namespace is now reporting as "Completed" instead of "Failure" this affects our failed alerts Feb 15, 2024
@ywk253100 ywk253100 added the Needs triage We need discussion to understand problem and decide the priority label Feb 16, 2024
@ywk253100 ywk253100 self-assigned this Feb 19, 2024
@ywk253100
Copy link
Contributor

The change was introduced by #6320

@egondalia
Copy link
Author

egondalia commented Feb 19, 2024

Can you please explain how #6320 is related to this the issue. Our issue is that previously a Backup would 'fail' if we created a backup job on a non-existing namespace but since 1.12.0 if we run a backup on a non-existing namespace it reports as 'Completed' instead of a 'fail' or 'partial fail'.

So if someone had removed a namespace but had a existing scheduled job to backup this namespace up, it would still continue to state 'completed' even though the namespace no longer exists. (since 1.12.0 we no longer get a failed alert via our prometheus)

@ywk253100
Copy link
Contributor

#6320 removed the logic to check the existence of namespaces

@reasonerjt reasonerjt added this to the v1.14 milestone Mar 6, 2024
ywk253100 added a commit to ywk253100/velero that referenced this issue Mar 27, 2024
…spaces" option

Check the existence of the namespaces provided in the "--include-namespaces" opt
ion and reports validation error if not found

Fixes vmware-tanzu#7431

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
ywk253100 added a commit to ywk253100/velero that referenced this issue Mar 27, 2024
…spaces" option

Check the existence of the namespaces provided in the "--include-namespaces" opt
ion and reports validation error if not found

Fixes vmware-tanzu#7431

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
ywk253100 added a commit to ywk253100/velero that referenced this issue Mar 27, 2024
…spaces" option

Check the existence of the namespaces provided in the "--include-namespaces" opt
ion and reports validation error if not found

Fixes vmware-tanzu#7431

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
ywk253100 added a commit to ywk253100/velero that referenced this issue Mar 27, 2024
…spaces" option

Check the existence of the namespaces provided in the "--include-namespaces" opt
ion and reports validation error if not found

Fixes vmware-tanzu#7431

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
@ywk253100
Copy link
Contributor

Create a PR to fix this issue: #7569
After the PR merged, the backup will report a validation error if the specified namespaces don't exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-test-plan Need E2E Test Case Needs triage We need discussion to understand problem and decide the priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants