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

Have the BSL controller continuously update the server status based on the state of the BSLs #2488

Open
carlisia opened this issue May 1, 2020 · 5 comments · May be fixed by #4270
Open
Assignees
Labels
Area/CLI related to the command-line interface Reviewed Q2 2021

Comments

@carlisia
Copy link
Contributor

carlisia commented May 1, 2020

BSL controller behavior:

set server status as ready

  • all BSLs are available, AND
  • BSL specified as default exists

set server status as partially ready

  • multiple BSLs, any one of them is unavailable, but at least one other is available
  • multiple BSLs, all available, but no BSL matches the specified default

set server status as waiting

  • no BSL, OR
  • existing BSLs, all pending
@carlisia carlisia self-assigned this May 1, 2020
@carlisia carlisia added the Area/CLI related to the command-line interface label May 4, 2020
@skriss skriss added this to the v1.5 milestone May 28, 2020
@carlisia carlisia removed their assignment Jul 28, 2020
@carlisia carlisia modified the milestones: v1.5, v1.6 Jul 28, 2020
@ashish-amarnath
Copy link
Member

@carlisia did #2674 address this?
If it did, can we close this issue?

@carlisia
Copy link
Contributor Author

No, these are different things.

@nrb nrb modified the milestones: v1.6.0, v1.7.0 Feb 3, 2021
@zubron zubron modified the milestones: v1.7.0, v1.8.0 Jul 30, 2021
@codegold79
Copy link
Contributor

I'll work on this issue.

@codegold79
Copy link
Contributor

codegold79 commented Oct 8, 2021

Assumptions

  • In the description, in the last bullet, a pending status is mentioned. However, I cannot find such a BackupStorageLocationPhase. The Pending status will need to be created.
  • This issue is about updating the ServerStatusRequest resource based on BSL status.
  • The ServerStatusRequest resource is updated by the server status request controller and not the BSL controller, as the title of this issue seems to indicate. This is one reason why the BSL cannot update the SSR continuously per the issue request.
  • Continuous updating of the SSR is not necessary. The latest BSL status can be picked up whenever a SSR is newly created.
  • SSRs do not have "Ready", "Partially Ready", nor "Waiting" statuses. These will need to be created in server_status_request_types.go.
  • The only way to look at the server status using the Velero client is by the velero version command.

Planned Solution

  • Within the backup_storage_location_types.go file, add a BackupStorageLocationPhase called Pending. All new BSL objects will have the phase set as Pending and will stay as such until updated by the BSL controller.
  • Within the server_status_request_types.go file,
    • add a field Server to the ServerStatusRequestStatus struct
    • the new Server field can have the statuses Ready, Partially Ready, and Waiting.
  • Whenever a ServerStatusRequest resource is created by the user, the ServerStatusRequestReconciler will look through the BackupStorageLocation list. The status (Available/Unavailable/Pending) and whether or not a default exists for each BSL can be looked up by SSR controller. SSR controller will update the SSR status server field (Ready/Partially Ready/Waiting) accordingly.
  • The output of the new server status details can be triggered by using velero version and I expect it to look something like
    $ velero version
    Client:
         Version: v1.6.1
         Git commit: -
    Server:
        Version: test-1008
        Status: Partially Ready

@zubron and @dsu-igeek, what do you think of my plan above? Given my assumptions, what this issue requests seems awkward to me. Do you have different assumptions or a different plan?

@codegold79
Copy link
Contributor

After getting some good feedback for my initial design proposal at the Oct. 19, 2021 Velero Community meeting, I have created a design doc PR that incorporates many changes that deviate from what is posted in previous comments above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CLI related to the command-line interface Reviewed Q2 2021
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants