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

velero server will crash when there is no bsl named default #7359

Closed
wrype opened this issue Jan 26, 2024 · 18 comments
Closed

velero server will crash when there is no bsl named default #7359

wrype opened this issue Jan 26, 2024 · 18 comments
Assignees
Labels
Needs Testing If you've tested your change but would still like a maintainer to try it in a different environment target/1.13.1
Milestone

Comments

@wrype
Copy link

wrype commented Jan 26, 2024

What steps did you take and what happened:

Run velero server with no bsl, then the server will crash with an error: An error occurred: backupstoragelocations.velero.io "default" not found .

What did you expect to happen:

velero server can run with no bsl.

The following information will help us better understand what's going on:

refer code in setDefaultBackupLocation:

if err := client.Get(ctx, types.NamespacedName{Namespace: namespace, Name: defaultBackupLocation}, backupLocation); err != nil {

Anything else you would like to add:

Environment:

in branch main and release-1.13

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@qiuming-best
Copy link
Contributor

@wrype I think it's the server getting an error when startup then exists, but not crash.

Velero server would run following the command velero server xx. if not specifying the option --default-backup-storage-location, the value would be 'default'. then it will hit the errors you mentioned.

So if you don't have one bsl with default name, you should specify it with another name that you have.

@wrype
Copy link
Author

wrype commented Jan 29, 2024

Right that. But velero-server-1.12 can run with no bsl.
I think the new version should keep the same behavior.

@qiuming-best
Copy link
Contributor

@wrype Why do you want the Velero server to run without BSL?
we did make some changes in the default BSL settings. Before v1.13, Velero could set multiple default BSLs we make that there is only one default BSL.

We've changed the default BSL selection logic, I will check the situation when there is no BSL.

@wrype
Copy link
Author

wrype commented Jan 29, 2024

I think this scenario: first I start the velero server with no bsl config, then I configure a bsl when storage is ready.
But in new version, velero server will exist with an error at first time.

@qiuming-best
Copy link
Contributor

This way of setting BSL is in your product environment or just for testing? may it be a less common usage?

@wrype
Copy link
Author

wrype commented Jan 29, 2024

Our use case is deploying velero server (no BSL) on k8s first, then when users have backup requirements, they will buy S3 buckets by themselves. After that we start to configure BSL.

@qiuming-best
Copy link
Contributor

@wrype What's your detailed step of setting BSL?
You will create one BSL When the user buys S3 buckets, then set the BSL as one default.
Or do you create one BSL and specify the BSL whenever doing a backup?

@wrype
Copy link
Author

wrype commented Jan 30, 2024

@wrype What's your detailed step of setting BSL? You will create one BSL When the user buys S3 buckets, then set the BSL as one default. Or do you create one BSL and specify the BSL whenever doing a backup?

When the user buys S3 buckets, I will create one BSL and set one default.

@qiuming-best
Copy link
Contributor

thanks for your information, I'll fix this issue recently.

@mateeyow
Copy link

Getting this error as well, I'm having the same setup as @wrype, it should show error but should not crash the pod.

@qiuming-best
Copy link
Contributor

@mateeyow I've fixed it, and it will be released in V1.13.1

@miriamfrom
Copy link

Great that a solution for this will be in place for v1.13.1. We also had problems with our pod crashing, however, this was not due to a lack of BSLs, but due to us renaming our BSLs with more descriptive names than "default". Unfortunately, the pod still crashes looking for a BSL called "default". Our current workaround is just adding an extra BSL named "default", however this is confusing, as this will not actually be the default BSL.

@qiuming-best
Copy link
Contributor

@miriamfrom you may not need to create one extra BSL named "default", Instead, you can specify the Velero server deployment start parameter with velero server xxx --default-backup-storage-location $your-exist-bsl

@miriamfrom
Copy link

miriamfrom commented Feb 21, 2024

@qiuming-best, thanks for the suggestion. I tried looking into using --default-backup-storage-location, but the documentation said that the use of this value was deprecated, and suggested using the --default flag for velero backup-location set instead. I also think I tested setting the --default-backup-storage-location, but that it did not help with the issue I was facing.

@qiuming-best
Copy link
Contributor

@miriamfrom do you mean that velero server xxx --default-backup-storage-location $your-exist-bsl not work for you?

I've tried with 1.13.0, and it is ok when specifying the default BSL in Velero server:
I only have one BSL with the name 'test'.
I specify the Velero server deployment start parameter with velero server --default-backup-storage-location=test
It works as below:
image

@draghuram
Copy link
Contributor

I just installed 1.13.0 and ran into this issue. I never create BSL as part of the installation because I try to keep installation and configuration as two separate steps. Any idea when 1.13.1 will be released?

@qiuming-best
Copy link
Contributor

@draghuram v1.13.1 will be released shortly, but the release date is not announced.

@qiuming-best
Copy link
Contributor

The fix has been merged, and it will released in v1.13.1.
If having any other related problem please re-open it

@danfengliu danfengliu added Needs Testing If you've tested your change but would still like a maintainer to try it in a different environment and removed Need E2E Test Case labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing If you've tested your change but would still like a maintainer to try it in a different environment target/1.13.1
Projects
None yet
Development

No branches or pull requests

7 participants