X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fserver%2FAbsServiceStarter.java;fp=auth%2Fauth-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fserver%2FAbsServiceStarter.java;h=ee92540bdcedc7c709701c76021da9147bade347;hb=aae5c072bcb4608ae87c70fd1edf7ac5b1794ccf;hp=fe610e57a9a0c78b503688ddd32f692033ebad60;hpb=1ee8f051ba40bf4f3578952ae499dd15549a86a9;p=aaf%2Fauthz.git diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java index fe610e57..ee92540b 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java @@ -19,7 +19,10 @@ * */ package org.onap.aaf.auth.server; +import java.io.File; import java.io.IOException; +import java.net.Inet4Address; +import java.net.UnknownHostException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -29,6 +32,7 @@ import org.onap.aaf.auth.org.OrganizationFactory; import org.onap.aaf.auth.rserv.RServlet; import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.Access.Level; +import org.onap.aaf.cadi.config.Config; import org.onap.aaf.cadi.register.Registrant; import org.onap.aaf.cadi.register.Registrar; import org.onap.aaf.misc.env.Trans; @@ -38,6 +42,7 @@ public abstract class AbsServiceStarter registrar; private boolean do_register; protected AbsService service; + protected String hostname; public AbsServiceStarter(final AbsService service) { @@ -52,6 +57,14 @@ public abstract class AbsServiceStarter rserv) throws Exception; @@ -70,6 +83,8 @@ public abstract class AbsServiceStarter app = es.submit(this); final AbsServiceStarter absSS = this; + // Docker/K8 may separately create startup Status in this dir for startup + // sequencing. If so, delete ON EXIT Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { @@ -120,7 +135,28 @@ public abstract class AbsServiceStarter