summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java
index efa04056873..4b7e39f48a4 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java
@@ -3,6 +3,7 @@ package com.yahoo.vespa.config.server.deploy;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
+import com.yahoo.config.FileReference;
import com.yahoo.config.application.api.DeployLogger;
import com.yahoo.config.model.api.ServiceInfo;
import com.yahoo.config.provision.ActivationContext;
@@ -121,11 +122,7 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
Activation activation = applicationRepository.activate(session, applicationId, tenant, params.force());
activation.awaitCompletion(timeoutBudget.timeLeft());
- log.log(Level.INFO, session.logPre() + "Session " + session.getSessionId() + " activated successfully using " +
- provisioner.map(provisioner -> provisioner.getClass().getSimpleName()).orElse("no host provisioner") +
- ". Config generation " + session.getMetaData().getGeneration() +
- activation.sourceSessionId().stream().mapToObj(id -> ". Based on session " + id).findFirst().orElse("") +
- ". File references: " + applicationRepository.getFileReferences(applicationId));
+ logActivatedMessage(applicationId, activation);
if (provisioner.isPresent() && configChangeActions != null)
restartServices(applicationId);
@@ -136,6 +133,18 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
}
}
+ private void logActivatedMessage(ApplicationId applicationId, Activation activation) {
+ Set<FileReference> fileReferences = applicationRepository.getFileReferences(applicationId);
+ String fileReferencesText = fileReferences.size() > 10
+ ? " " + fileReferences.size() + " file references"
+ : "File references: " + fileReferences;
+ log.log(Level.INFO, session.logPre() + "Session " + session.getSessionId() + " activated successfully using " +
+ provisioner.map(provisioner -> provisioner.getClass().getSimpleName()).orElse("no host provisioner") +
+ ". Config generation " + session.getMetaData().getGeneration() +
+ activation.sourceSessionId().stream().mapToObj(id -> ". Based on session " + id).findFirst().orElse("") +
+ ". " + fileReferencesText);
+ }
+
private void restartServices(ApplicationId applicationId) {
RestartActions restartActions = configChangeActions.getRestartActions().useForInternalRestart(internalRedeploy);