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

Don't touch ActiveTime in preSeal/postUnseal #24549

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

ncabatoff
Copy link
Collaborator

If a consumer of the sys/leader api relies on ActiveTime, they can be misled by our current behaviour, whereby ActiveTime gets set to "now" during postUnseal and to the zero time during preSeal. We sometimes preSeal/postUnseal while remaining the active node. Instead, only set these when we actually change active role.

… misled by our current behaviour, whereby ActiveTime gets set to "now" during postUnseal and to the zero time during preSeal. We sometimes preSeal/postUnseal while remaining the active node. Instead, only set these when we actually change active role.
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Dec 14, 2023
Copy link

CI Results:
All Go tests succeeded! ✅

Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@raskchanky raskchanky left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

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

LGTM. I can't think of any case where we'd rely specifically on the old behavior here and I suspect this restores the intended behaviour (certainly the expected behavior) which was presumably broken when we introduced ways to seal and unseal without standing down which I guess only applied to Integrated Storage?

Thanks for noticing the issue!

… misled by our current behaviour, whereby ActiveTime gets set to "now" during postUnseal and to the zero time during preSeal. We sometimes preSeal/postUnseal while remaining the active node. Instead, only set these when we actually change active role.
@ncabatoff
Copy link
Collaborator Author

LGTM. I can't think of any case where we'd rely specifically on the old behavior here and I suspect this restores the intended behaviour (certainly the expected behavior) which was presumably broken when we introduced ways to seal and unseal without standing down which I guess only applied to Integrated Storage?

Thanks for noticing the issue!

No, I think the preSeal/postUnseal-while-remaining-active behaviour goes back at least as far as replication - i.e. not IS-specific. But yeah, I think this is a strict improvement over the current behaviour.

@ncabatoff ncabatoff enabled auto-merge (squash) December 15, 2023 13:47
@ncabatoff ncabatoff merged commit 763095f into main Dec 15, 2023
108 checks passed
@ncabatoff ncabatoff deleted the avoid-setting-activetime-in-preseal branch December 15, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants