-
Notifications
You must be signed in to change notification settings - Fork 18
Implement keyset key fail-fast feature with 7-day timeout #2088
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
Conversation
- Update Main.java to wire keysetkey verticle callback to shutdown handler - Add Consumer import and overloaded createAndDeployRotatingStoreVerticle method - Update KeyManager to accept keyAvailabilityHandler callback - Call handler on successful/failed key retrieval in getMasterKey/getRefreshKey - Add 7-day timeout parameter to OperatorShutdownHandler constructor - Maintains backward compatibility with existing constructors This enables the operator to shut down after 7 days of consecutive keyset key sync failures, allowing Kubernetes to restart and potentially recover.
src/main/java/com/uid2/operator/vertx/OperatorShutdownHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/com/uid2/operator/vertx/OperatorShutdownHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/com/uid2/operator/vertx/OperatorShutdownHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/com/uid2/operator/vertx/OperatorShutdownHandler.java
Outdated
Show resolved
Hide resolved
| public void handleKeysetKeyRefreshResponse(Boolean success) { | ||
| if (success) { | ||
| keysetKeyFailureStartTime.set(null); | ||
| lastKeysetKeyFailureLogTime.set(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can move lastKeysetKeyFailureLogTime encapsulated into logKeysetKeyFailureProgressAtInterval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clearing lastKeysetKeyFailureLogTime in the "success" branch is for if there was a previous failure followed by recovery, the timer for progress logging will reset. This prevents any cached timing from a past failure from causing premature logs after a successful sync.
Keep these value settings here helps tests where we need consistent log timings.
I did simplify logKeysetKeyFailureProgressAtInterval more by passing in elaspsed
Uh oh!
There was an error while loading. Please reload this page.