def startNode(self): logInfo("startNode:Enter") self.__environ = os.environ.copy() ### Starting Node self.__ELASTIC_ARGS = "-f -Des.pidfile=" + self.__pidfile if ContainerUtils.isWindows(): self.__ELASTIC_CMD = os.path.join(self.__bindir, "elasticsearch.bat ") else: self.__ELASTIC_CMD = os.path.join(self.__bindir, "elasticsearch ") self.__CMD = self.__ELASTIC_CMD + self.__ELASTIC_ARGS logInfo("StartUp Command to be used : " + self.__CMD) args = shlex.split(self.__CMD) process = Popen(args, stdout=None, stderr=None, env=self.__environ, shell=False) time.sleep(20) logInfo("Start return Code : " + str(process.returncode)) logInfo("finding the archivesDir") global archivesDir archiveMgmtFeature = ContainerUtils.getFeatureInfo( "Archive Management Support", proxy.container, proxy.container.currentDomain) archivesDir = os.path.join(self.__enginedir, archiveMgmtFeature.archiveDirectory) logInfo("Found archives dir " + archivesDir) self.__toggleCheck = True logInfo("startNode:Exit")
def doStart(): "do start" logger.info("Enter OracleCoherenceEnabler:doStart") # install archives: we need to install them before starting the oracle coherence server archiveFeatureInfo = ContainerUtils.getFeatureInfo( Feature.ARCHIVE_FEATURE_NAME, proxy.container, proxy.container.currentDomain) if archiveFeatureInfo != None: rootDirPath = runtimeContext.rootDirectory.absolutePath archiveDir = archiveFeatureInfo.archiveDirectory archiveDirPath = os.path.join(rootDirPath, archiveDir) if os.path.isdir(archiveDirPath): deploymentDir = getVariableValue( "COHERENCE_RUNTIME_DEPLOYMENT_DIR") logger.info("OracleCoherenceEnabler:doStart:Extracting archives:" + archiveDirPath + " --> " + deploymentDir) uzip = UnZipFile() for entry in os.listdir(archiveDirPath): archiveFile = os.path.join(archiveDirPath, entry) if os.path.isfile(archiveFile): logger.info( "OracleCoherenceEnabler:doStart:Extracting archive:" + archiveFile) try: uzip.extract(archiveFile, deploymentDir) except: type, value, traceback = sys.exc_info() logger.severe( "OracleCoherenceEnabler:doStart:Error extracting archive file:" + ` value `) # we do not want the archive feature to install the archives archiveFeatureInfo.setInstallArchivesViaFileCopy(False) # start coherence server proxy.doStart() logger.info("Exit OracleCoherenceEnabler:doStart")