Skip to content

fix(owner-onboarding-server): Re-run TO0 before it expires #207

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

7flying
Copy link
Contributor

@7flying 7flying commented Feb 10, 2022

Fixes #193

  • We re-run TO0 before it expires based on a window.
  • registration_time + re_registration_window are now configured on the .yml.
    • The sample owner-onboarding-server.yml has been updated with these new parameters.
    • We have default values for the registration_time + re_registration_window.

@@ -244,6 +305,7 @@ async fn perform_maintenance(udt: OwnerServiceUDT) -> std::result::Result<(), &'

#[allow(unused_must_use)]
let (ov_res, ses_res, rtr_res) = tokio::join!(ov_maint, ses_maint, rtr_maint);
let win_res = check_registration_window(udt.clone()).await;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this here would mean that this only gets executed after the maintenance or serving job has stopped. This code should probably be executed in the perform_maintenance method, and have that take the window into account.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what you mean by 'after the job has stopped'. The check_registration_window is called inside the perform_maintenance method, as you ask. It simply waits until possible OV registration plus session maintenance has been made.
The window is taken into account inside the check_registration_window when we query fdo_store.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, this was me mis-remembering how many join! calls there were in the code: I thought the only one was in the fn main().

@@ -141,10 +157,58 @@ async fn report_to_rendezvous(udt: OwnerServiceUDT) -> Result<()> {
Ok(())
}

async fn check_registration_window(udt: OwnerServiceUDT) -> Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've discussed that this got pulled out separately because the query mechanism doesn't quite do what we'd want.
I'm going to look at improving and/or documenting that, and then get back to this shortly.

@7flying 7flying changed the title bug(owner-onboarding-server): Re-run TO0 before it expires fix(owner-onboarding-server): Re-run TO0 before it expires Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Owner Onboarding Server: make sure to re-run TO0 before it is actually expired
2 participants