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

Save status priority to charm state #15

Open
samuelallan72 opened this issue Aug 15, 2022 · 0 comments
Open

Save status priority to charm state #15

samuelallan72 opened this issue Aug 15, 2022 · 0 comments

Comments

@samuelallan72
Copy link

Priority for a state is lost across charm hook invocations in the following flow of events:

  1. hook is invoked, StatusPool() is set up, statuses are dynamically added with manual priorities
  2. statuses are set, and saved to charm state
  3. hook is invoked again, StatusPool() is set up.
  4. the status pool loads the saved statuses, with automatic sequencial prioritie
  5. at this point, the custom priorities are lost, and will be ordered differently

We can fix this by saving the priority to the charm state, and restoring the priority when restoring.

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 a pull request may close this issue.

1 participant