optionally use new startup script
@@ -73,6 +73,7 @@ public abstract class Container extends AbstractService implements
private final boolean retired;
/** The unique index of this node */
private final int index;
+ private final boolean useOldStartupScript;
private final boolean dumpHeapOnShutdownTimeout;
private final double shutdownTimeoutS;
@@ -91,6 +92,7 @@ public abstract class Container extends AbstractService implements
this.parent = parent;
this.retired = retired;
this.index = index;
+ useOldStartupScript = deployState.featureFlags().useOldJdiscContainerStartup();
dumpHeapOnShutdownTimeout = deployState.featureFlags().containerDumpHeapOnShutdownTimeout();
shutdownTimeoutS = deployState.featureFlags().containerShutdownTimeout();
this.defaultHttpServer = new JettyHttpServer("DefaultHttpServer", containerClusterOrNull(parent), deployState);
@@ -299,8 +301,11 @@ public abstract class Container extends AbstractService implements
}
public Optional<String> getStartupCommand() {
+ if (useOldStartupScript) {
return Optional.of("PRELOAD=" + getPreLoad() + " exec vespa-start-container-daemon " + getJvmOptions() + " ");
}
+ return Optional.of("PRELOAD=" + getPreLoad() + " exec ${VESPA_HOME}/libexec/vespa/script-utils vespa-start-container-daemon " + getJvmOptions() + " ");
+ }
@Override
public void getConfig(QrConfig.Builder builder) {
