Skip to content

Commit 1815f7c

Browse files
authored
KeyManager: Fix a misleading warning (#3773)
When all the senders drop on the key requester channel, there is no way for `KeyManager` to recover. This is an abnormal situation because there is a sender held onto by bootstrap agent at all times and so this should never happen. However, we have seen this error when omicron was not packaged correctly and `BootstrapAgent::new` exits with an error before it is constructed. The tokio task for the `KeyManager` continued to run and report the following repeatedly: ``` WARN SledAgent (KeyManager): Failed to receive from a storage key requester ``` Instead of that repetitive, misleading error, we become more precise and exit the `KeyManager` tokio task.
1 parent 66c0565 commit 1815f7c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

key-manager/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,12 @@ impl<S: SecretRetriever> KeyManager<S> {
209209
} else {
210210
warn!(
211211
self.log,
212-
"Failed to receive from a storage key requester",
212+
concat!(
213+
"KeyManager shutting down: ",
214+
"all storage key requesters dropped.",
215+
)
213216
);
217+
return;
214218
}
215219
}
216220
}

0 commit comments

Comments
 (0)