summaryrefslogtreecommitdiffstats
path: root/node-admin/src
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2020-04-24 20:51:57 +0200
committergjoranv <gv@verizonmedia.com>2020-04-25 02:24:38 +0200
commitd588f01d40105a13129b8e007a7f65231a6e1ca5 (patch)
treeb7e3eb52aab55a9849d300debb9c5daf93d29d32 /node-admin/src
parent09b3ac7d50ba91f801a9d7cbd719a3cbf403932c (diff)
Map remaining DEBUG/SPAM/ERROR/FATAL -> Level.FINE/FINEST/SEVERE
Diffstat (limited to 'node-admin/src')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/acl/AclMaintainer.java4
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java10
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java6
3 files changed, 10 insertions, 10 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/acl/AclMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/acl/AclMaintainer.java
index c0b4ecb1a36..0b5ddc6a943 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/acl/AclMaintainer.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/acl/AclMaintainer.java
@@ -99,11 +99,11 @@ public class AclMaintainer {
dockerOperations.executeCommandInNetworkNamespace(context, ipVersion.iptablesRestore(), fileHandler.absolutePath());
} catch (Exception e) {
if (flush) {
- context.log(logger, LogLevel.ERROR, "Exception occurred while syncing iptable " + table + ", attempting rollback", e);
+ context.log(logger, Level.SEVERE, "Exception occurred while syncing iptable " + table + ", attempting rollback", e);
try {
dockerOperations.executeCommandInNetworkNamespace(context, ipVersion.iptablesCmd(), "-F", "-t", table);
} catch (Exception ne) {
- context.log(logger, LogLevel.ERROR, "Rollback of table " + table + " failed, giving up", ne);
+ context.log(logger, Level.SEVERE, "Rollback of table " + table + " failed, giving up", ne);
}
} else {
context.log(logger, LogLevel.WARNING, "Unable to sync iptables for " + table, e);
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java
index 3cb74aef5a7..860cc8468e6 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/identity/AthenzCredentialsMaintainer.java
@@ -109,7 +109,7 @@ public class AthenzCredentialsMaintainer implements CredentialsMaintainer {
public boolean converge(NodeAgentContext context) {
try {
- context.log(logger, LogLevel.DEBUG, "Checking certificate");
+ context.log(logger, Level.FINE, "Checking certificate");
Path containerSiaDirectory = context.pathOnHostFromPathInNode(CONTAINER_SIA_DIRECTORY);
Path privateKeyFile = SiaUtils.getPrivateKeyFile(containerSiaDirectory, context.identity());
Path certificateFile = SiaUtils.getCertificateFile(containerSiaDirectory, context.identity());
@@ -146,7 +146,7 @@ public class AthenzCredentialsMaintainer implements CredentialsMaintainer {
return true;
}
}
- context.log(logger, LogLevel.DEBUG, "Certificate is still valid");
+ context.log(logger, Level.FINE, "Certificate is still valid");
return false;
} catch (IOException e) {
throw new UncheckedIOException(e);
@@ -169,7 +169,7 @@ public class AthenzCredentialsMaintainer implements CredentialsMaintainer {
Instant expiry = certificate.getNotAfter().toInstant();
return Duration.between(now, expiry);
} catch (IOException e) {
- context.log(logger, LogLevel.ERROR, "Unable to read certificate at " + certificateFile, e);
+ context.log(logger, Level.SEVERE, "Unable to read certificate at " + certificateFile, e);
return Duration.ZERO;
}
}
@@ -236,14 +236,14 @@ public class AthenzCredentialsMaintainer implements CredentialsMaintainer {
context.log(logger, "Instance successfully refreshed and credentials written to file");
} catch (ZtsClientException e) {
if (e.getErrorCode() == 403 && e.getDescription().startsWith("Certificate revoked")) {
- context.log(logger, LogLevel.ERROR, "Certificate cannot be refreshed as it is revoked by ZTS - re-registering the instance now", e);
+ context.log(logger, Level.SEVERE, "Certificate cannot be refreshed as it is revoked by ZTS - re-registering the instance now", e);
registerIdentity(context, privateKeyFile, certificateFile, identityDocumentFile);
} else {
throw e;
}
}
} catch (Exception e) {
- context.log(logger, LogLevel.ERROR, "Certificate refresh failed: " + e.getMessage(), e);
+ context.log(logger, Level.SEVERE, "Certificate refresh failed: " + e.getMessage(), e);
}
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
index d473b3dcf40..bc532a84b64 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
@@ -164,7 +164,7 @@ public class NodeAgentImpl implements NodeAgent {
void resumeNodeIfNeeded(NodeAgentContext context) {
if (!hasResumedNode) {
- context.log(logger, LogLevel.DEBUG, "Starting optional node program resume command");
+ context.log(logger, Level.FINE, "Starting optional node program resume command");
dockerOperations.resumeNode(context);
hasResumedNode = true;
}
@@ -404,10 +404,10 @@ public class NodeAgentImpl implements NodeAgent {
context.log(logger, LogLevel.WARNING, "Container unexpectedly gone, resetting containerState to " + containerState);
} catch (DockerException e) {
numberOfUnhandledException++;
- context.log(logger, LogLevel.ERROR, "Caught a DockerException", e);
+ context.log(logger, Level.SEVERE, "Caught a DockerException", e);
} catch (Throwable e) {
numberOfUnhandledException++;
- context.log(logger, LogLevel.ERROR, "Unhandled exception, ignoring", e);
+ context.log(logger, Level.SEVERE, "Unhandled exception, ignoring", e);
}
}