Skip to content

Commit

Permalink
0006272: Startup logging for specific node securities that can't decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Mar 5, 2024
1 parent e6bec2c commit ffafdd8
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,16 @@ protected Node checkSystemIntegrity(Node node) {
}
}
if (badNodeSecurities.size() > 0) {
List<String> nodeIds = new ArrayList<String>();
for (NodeSecurity nodeSecurity : badNodeSecurities) {
nodeIds.add(nodeSecurity.getNodeId());
}
if (parameterService.is(ParameterConstants.CLUSTER_LOCKING_ENABLED)) {
throw new IllegalStateException("Unable to decrypt " + badNodeSecurities.size()
+ " node security rows. Copy the security/keystore file from a working node in the cluster.");
+ " node security rows. Copy the security/keystore file from a working node in the cluster. Nodes affected: " + nodeIds);
} else if (parameterService.isRegistrationServer()) {
log.error("Found {} bad node securities. Attempting to re-open registration to fix them.", badNodeSecurities.size());
log.error("Found {} bad node securities. Attempting to re-open registration to fix them. Nodes affected: {}", badNodeSecurities.size(),
nodeIds);
String myNodeId = nodeService.findIdentityNodeId();
for (NodeSecurity nodeSecurity : badNodeSecurities) {
if (nodeSecurity.getNodeId().equals(myNodeId)) {
Expand All @@ -749,9 +754,8 @@ protected Node checkSystemIntegrity(Node node) {
}
}
} else {
log.error(
"Found {} bad node securities. Removing identity and attempting re-registration to fix them. You may need to approve the registration request.",
badNodeSecurities.size());
log.error("Found {} bad node securities. Removing identity and attempting re-registration to fix them. " +
"You may need to approve the registration request. Nodes affected: {}", badNodeSecurities.size(), nodeIds);
nodeService.deleteIdentity();
node = null;
}
Expand Down

0 comments on commit ffafdd8

Please sign in to comment.