From 064155d371e7408ec6c7580a1408402d720c6b15 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 6 Sep 2016 12:03:32 +0200 Subject: HONEYCOMB-78: enable HC restart Includes: - restart script for honeycomb - HONEYCOMBC-78 fix: jVPPRegistry.close() is not invoked in case of VPP restart. That prevents subsequent attempts to establish connection from failing (we cannot invoke vl_client_disconnect_from_vlib before connect_to_vpe on fresh vpp instance). Change-Id: Icf4d6a6a40605ed34d307a0f1405b8804ba5df53 Signed-off-by: Marek Gradzki --- common/minimal-distribution-parent/pom.xml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'common/minimal-distribution-parent/pom.xml') diff --git a/common/minimal-distribution-parent/pom.xml b/common/minimal-distribution-parent/pom.xml index cdaf92582..373b642c7 100644 --- a/common/minimal-distribution-parent/pom.xml +++ b/common/minimal-distribution-parent/pom.xml @@ -25,7 +25,21 @@ http://nexus.fd.io/content - + +#!/bin/sh - +STATUS=100 + +while [ $STATUS -eq 100 ] +do + %s + STATUS=$? + echo "Honeycomb exited with status: $STATUS" + if [ $STATUS -eq 100 ] + then + echo "Restarting..." + fi +done + -Xms32m -Xmx128m -XX:MetaspaceSize=32m -XX:MaxMetaspaceSize=128m -client -Xms20m -Xmx32m -XX:MetaspaceSize=5m -XX:MaxMetaspaceSize=32m -XX:MaxMetaspaceExpansion=1m -Xss512k -XX:+UseSerialGC -Djava.compiler=NONE -Xverify:none -noverify -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 @@ -242,29 +256,30 @@ import java.nio.file.Paths log.info "Generating shell exec script" + def scriptTemplate = properties.getOrDefault("start.script.template", "") def args = properties.getOrDefault("exec.parameters", "") log.debug "Additional shell exec script properties: ${args}" def javaArgs = "${args} -jar \$(dirname \$0)/${project.artifactId}-${project.version}.jar" def scriptParent = Paths.get(project.build.outputDirectory, "honeycomb-minimal-resources") scriptParent.toFile().mkdirs() - def scriptContent = "#!/bin/sh -\njava " + javaArgs + def scriptContent = "java " + javaArgs log.info "Generating shell exec script as ${scriptContent}" def scriptPath = Paths.get(scriptParent.toString(), "honeycomb") log.info "Writing shell exec script to ${scriptPath}" - scriptPath.toFile().text = scriptContent + scriptPath.toFile().text = String.format(scriptTemplate, scriptContent) scriptPath.toFile().setExecutable(true) scriptPath = Paths.get(scriptParent.toString(), "honeycomb-start") log.info "Writing shell exec script to ${scriptPath}" - scriptPath.toFile().text = scriptContent + " &" + scriptPath.toFile().text = "\$(dirname \$0)/honeycomb &" scriptPath.toFile().setExecutable(true) def debug_args = properties.getOrDefault("debug.parameters", "") - def debugScriptContent = "#!/bin/sh -\njava" + " ${debug_args} " + javaArgs + def debugScriptContent = "java" + " ${debug_args} " + javaArgs log.info "Generating shell debug script as ${debugScriptContent}" scriptPath = Paths.get(scriptParent.toString(), "honeycomb-debug") log.info "Writing shell debug script to ${scriptPath}" - scriptPath.toFile().text = debugScriptContent + scriptPath.toFile().text = String.format(scriptTemplate, debugScriptContent) scriptPath.toFile().setExecutable(true) -- cgit 1.2.3-korg