1616public class OperatorShutdownHandler {
1717 private static final Logger LOGGER = LoggerFactory .getLogger (OperatorShutdownHandler .class );
1818 private static final int SALT_FAILURE_LOG_INTERVAL_MINUTES = 10 ;
19- private static final int KEYSET_KEY_FAILURE_LOG_INTERVAL_MINUTES = 10 ;
2019 private final Duration attestShutdownWaitTime ;
2120 private final Duration saltShutdownWaitTime ;
2221 private final Duration keysetKeyShutdownWaitTime ;
2322 private final AtomicReference <Instant > attestFailureStartTime = new AtomicReference <>(null );
2423 private final AtomicReference <Instant > saltFailureStartTime = new AtomicReference <>(null );
2524 private final AtomicReference <Instant > keysetKeyFailureStartTime = new AtomicReference <>(null );
2625 private final AtomicReference <Instant > lastSaltFailureLogTime = new AtomicReference <>(null );
27- private final AtomicReference <Instant > lastKeysetKeyFailureLogTime = new AtomicReference <>(null );
2826 private final Clock clock ;
2927 private final ShutdownService shutdownService ;
3028
@@ -65,7 +63,6 @@ public void handleKeysetKeyRefreshResponse(Boolean success) {
6563 keysetKeyFailureStartTime .set (null );
6664 LOGGER .debug ("keyset keys sync successful" );
6765 } else {
68- logKeysetKeyFailureAtInterval ();
6966 Instant t = keysetKeyFailureStartTime .get ();
7067 if (t == null ) {
7168 keysetKeyFailureStartTime .set (clock .instant ());
@@ -84,14 +81,6 @@ public void handleKeysetKeyRefreshResponse(Boolean success) {
8481 }
8582 }
8683
87- public void logKeysetKeyFailureAtInterval () {
88- Instant t = lastKeysetKeyFailureLogTime .get ();
89- if (t == null || clock .instant ().isAfter (t .plus (KEYSET_KEY_FAILURE_LOG_INTERVAL_MINUTES , ChronoUnit .MINUTES ))) {
90- LOGGER .error ("keyset keys sync failing" );
91- lastKeysetKeyFailureLogTime .set (Instant .now ());
92- }
93- }
94-
9584 public void handleAttestResponse (Pair <AttestationResponseCode , String > response ) {
9685 if (response .left () == AttestationResponseCode .AttestationFailure ) {
9786 LOGGER .error ("core attestation failed with AttestationFailure, shutting down operator, core response: {}" , response .right ());
0 commit comments