Don't upgrade mount table in standby mode#2467
Conversation
b7f1e1a to
8fbd2c7
Compare
Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com>
8fbd2c7 to
64f5637
Compare
Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com>
|
As a follow-up we could look at the behavior of invalidation, though that really only applies when live-upgrading from a pre-transactional raft cluster to a transactional + read-scalability-enabled one. So that is en extreme edge case I'm not sure is worth solving if it happens to cause problems. |
wslabosz-reply
left a comment
There was a problem hiding this comment.
hopefully we can remove this prop passing in future, LGTM
(also reminds me about namespace.RootContext(nil) -> namespace.RootContext(t.Context()) refactor need)
We could just try persisting and ignore read only errors, not sure if this is really better. |
* Don't upgrade mount table in standby mode Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com> * Make linter happy Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com> --------- Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com>: Backport of openbao#2467 (clean cherry-pick) Signed-off-by: Philipp Stehle <philipp.stehle@secretz.io>
* Don't upgrade mount table in standby mode Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com> * Make linter happy Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com> --------- Signed-off-by: Jonas Köhnen <jonas.koehnen@sap.com>
Description
Skip writing the results of a legacy mount table upgrade to disk if we're loading mounts as standby.
Rationale
Standby nodes would attempt a legacy mount table upgrade e.g. when upgrading from an old, pre-transactional raft state or when migrating storage from a non-transactional backend. This would cause unseal failures even in single-node, freshly migrated clusters as nodes always unseal as standby first before pivoting to an active-node unseal.
Is there a cleaner way to achieve this?
core.Standby()is false at all times while unsealing and is only set to true afterwards, and I didn't want to break that guarantee for this change.Resolves: #2466
Acknowledgements
(GitHub Copilot, Cursor, Claude Code, &c) in authoring these changes.
DCO ownership statement
and this change did not use post-BUSL-licensed code from HashiCorp.
Existing MPL-licensed code is still allowed, subject to attribution.
Code authored by yourself and submitted to HashiCorp for inclusion is
also allowed.