Example #1
0
 def __getEc2PrivateIpv4s(self, additionalVariables):
     try:
         dir = File(self.__basedir)
         dir = dir.getParentFile().getParentFile().getParentFile()
         fileReader = FileReader(File(dir, "engine-session.properties"))
         props = Properties()
         props.load(fileReader)
         ec2PrivateIpv4s = props.getProperty("ec2PrivateIpv4s")
         if ec2PrivateIpv4s:
             ipList = ec2PrivateIpv4s.split()
             logger.info("Ec2 Private IPv4s:" + list2str(ipList))
             engineInstance = getVariableValue("ENGINE_INSTANCE")
             engineInstance = int(engineInstance)
             if len(ipList) > engineInstance:
                 self.__dockerHostIp = ipList[engineInstance]
                 logger.info("Setting DOCKER_HOST_IP:" +
                             self.__dockerHostIp)
                 additionalVariables.add(
                     RuntimeContextVariable(
                         "DOCKER_HOST_IP", self.__dockerHostIp,
                         RuntimeContextVariable.STRING_TYPE,
                         "Docker Host IP", False,
                         RuntimeContextVariable.NO_INCREMENT))
             else:
                 self.__dockerHostIp = getVariableValue("LISTEN_ADDRESS")
                 additionalVariables.add(
                     RuntimeContextVariable(
                         "DOCKER_HOST_IP", self.__dockerHostIp,
                         RuntimeContextVariable.STRING_TYPE,
                         "Docker Host IP", False,
                         RuntimeContextVariable.NO_INCREMENT))
     except:
         type, value, traceback = sys.exc_info()
         logger.warning("read engine session properties error:" + ` value `)
def doInit(additionalVariables):
    logInfo("doInit:Enter")
    elastic = ElasticSearch(additionalVariables)
    elasticRcv = RuntimeContextVariable("ELASTICSEARCH_NODE_OBJECT", elastic,
                                        RuntimeContextVariable.OBJECT_TYPE)
    runtimeContext.addVariable(elasticRcv)
    logInfo("doInit:Exit")
def doInit(additionalVariables):
    "do init"
    docker = DockerSwarm(additionalVariables)

    # save mJMX MBean server as a runtime context variable
    dockerRcv = RuntimeContextVariable("DOCKER_SWARM_OBJECT", docker,
                                       RuntimeContextVariable.OBJECT_TYPE)
    runtimeContext.addVariable(dockerRcv)
Example #4
0
def doInit(additionalVariables):
    "do init"
    logger.info("MySQLServerContainer: doInit:Enter")
    mysqlServer = MySQLServer(additionalVariables)
    mysqlServerRcv = RuntimeContextVariable("MYSQL_SERVER_OBJECT", mysqlServer,
                                            RuntimeContextVariable.OBJECT_TYPE)
    runtimeContext.addVariable(mysqlServerRcv)
    logger.info("MySQLServerContainer: doInit:Exit")
def doInit(additionalVariables):
    "do init"
    coherenceServer = CoherenceServer()

    # save mJMX MBean server as a runtime context variable
    coherenceServerRcv = RuntimeContextVariable(
        "COHERENCE_SERVER_OBJECT", coherenceServer,
        RuntimeContextVariable.OBJECT_TYPE)
    runtimeContext.addVariable(coherenceServerRcv)
Example #6
0
def doInit(additionalVariables):
    "do init"
    logger.info("OracleDatabaseContainer: doInit:Enter")
    oracleDatabase = OracleDatabase(additionalVariables)
    oracleDatabaseRcv = RuntimeContextVariable(
        "ORACLE_DATABASE_OBJECT", oracleDatabase,
        RuntimeContextVariable.OBJECT_TYPE)
    runtimeContext.addVariable(oracleDatabaseRcv)
    logger.info("OracleDatabaseContainer: doInit:Exit")
Example #7
0
def doInit(additionalVariables):
	"do init"
	logger.info("Enter WebLogicServer:doInit")
	
	try:
		weblogicServer = WebLogicServer(additionalVariables)
		
		weblogicServerRcv = RuntimeContextVariable("WEBLOGIC_SERVER_OBJECT", weblogicServer, RuntimeContextVariable.OBJECT_TYPE)
		runtimeContext.addVariable(weblogicServerRcv)
		proxy.doInit(additionalVariables)
	except:
	   	type, value, traceback = sys.exc_info()
	   	logger.severe("Unexpected exception in WebLogicServer:doInit:" + `value`)
	   	raise
	logger.info("Exit WebLogicServer:doInit")
Example #8
0
	def __initServerInfo(self, additionalVariables):
		"initialize server info"
		self.__domainDir = getVariableValue("WL_DOMAIN_DIR", "")
		self.__wlsUser = getVariableValue("WLS_USER")
		self.__wlsPwd = getVariableValue("WLS_PW")
		
		self.__wlHome = getVariableValue("WL_HOME", "")
  		
  		self.__baseDir = getVariableValue("DS_WEBLOGIC_BASE", "")
  		self.__workDir = getVariableValue("ENGINE_WORK_DIR", "")
         
		serverAddrs = getVariableValue("LISTEN_ADDRESS")
		httpPortStr = getVariableValue("HTTP_PORT", "")
		self.__wlsUrl = "t3://" + serverAddrs +":"+  httpPortStr
		additionalVariables.add(RuntimeContextVariable("WLS_URL", self.__wlsUrl, RuntimeContextVariable.STRING_TYPE))
		changePermissions(self.__baseDir)
Example #9
0
def doInit(additionalVariables):
    "do init"
    consul = Consul(additionalVariables)
    consulRcv = RuntimeContextVariable("CONSUL_OBJECT", consul,
                                       RuntimeContextVariable.OBJECT_TYPE)
    runtimeContext.addVariable(consulRcv)
Example #10
0
    def __init__(self, additionalVariables):
        " initialize consul cluster member"

        self.__clusterConfigDir = getVariableValue("CLUSTER_CONFIG_DIR")

        if not self.__clusterConfigDir:
            raise Exception("CLUSTER_CONFIG_DIR variable is required")

        componentName = proxy.container.currentDomain.name
        self.__clusterConfigDir = os.path.join(self.__clusterConfigDir,
                                               componentName)

        self.__listenAddress = getVariableValue("LISTEN_ADDRESS")
        self.__nodeName = getVariableValue(
            "NODE_NAME_PREFIX", "node-") + self.__listenAddress.replace(
                '.', '-') + "-" + getVariableValue("ENGINE_INSTANCE")
        additionalVariables.add(
            RuntimeContextVariable("NODE_NAME", self.__nodeName,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "Consul node name", False,
                                   RuntimeContextVariable.NO_INCREMENT))

        self.__workDir = getVariableValue("CONTAINER_WORK_DIR")
        changePermissions(self.__workDir)

        self.__rpcAddr = self.__listenAddress + ":" + getVariableValue(
            "CLI_RPC_PORT")
        self.__serfAddr = self.__listenAddress + ":" + getVariableValue(
            "SERF_LAN_PORT")
        self.__httpAddr = self.__listenAddress + ":" + getVariableValue(
            "HTTP_PORT")
        self.__dnsAddr = self.__listenAddress + ":" + getVariableValue(
            "DNS_SERVER_PORT")

        self.__lockExpire = int(getVariableValue("LOCK_EXPIRE", "300000"))
        self.__lockWait = int(getVariableValue("LOCK_WAIT", "30000"))
        self.__staleWait = int(getVariableValue("STALE_CONFIG_WAIT", "300"))

        self.__lock()
        mkdir_p(self.__clusterConfigDir)
        self.__unlock()

        additionalVariables.add(
            RuntimeContextVariable("CONSUL_HTTP_ADDRESS",
                                   "http://" + self.__httpAddr,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "Consul Http address", True,
                                   RuntimeContextVariable.NO_INCREMENT))
        keyFile = getVariableValue("KEY_FILE")
        certFile = getVariableValue("CERT_FILE")
        self.__httpsAddr = None
        if keyFile and certFile:
            self.__httpsAddr = self.__listenAddress + ":" + getVariableValue(
                "HTTPS_PORT")
            additionalVariables.add(
                RuntimeContextVariable("CONSUL_HTTPS_ADDRESS",
                                       "https://" + self.__httpsAddr,
                                       RuntimeContextVariable.STRING_TYPE,
                                       "Consul Https address", True,
                                       RuntimeContextVariable.NO_INCREMENT))

        additionalVariables.add(
            RuntimeContextVariable("CONSUL_DNS_ADDRESS", self.__dnsAddr,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "Consul DNS address", True,
                                   RuntimeContextVariable.NO_INCREMENT))
        additionalVariables.add(
            RuntimeContextVariable("CONSUL_ADDRESS",
                                   "consul://" + self.__httpAddr,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "Consul  address", True,
                                   RuntimeContextVariable.NO_INCREMENT))
Example #11
0
    def __init__(self, additionalVariables):
        " initialize mysql database"

        self.__getHostName()

        additionalVariables.add(
            RuntimeContextVariable("MYSQL_HOST", self.__hostname,
                                   RuntimeContextVariable.ENVIRONMENT_TYPE, "",
                                   True, RuntimeContextVariable.NO_INCREMENT))
        additionalVariables.add(
            RuntimeContextVariable("RESTART_ENGINE_ON_DEACTIVATION", "true",
                                   RuntimeContextVariable.STRING_TYPE))

        self.__serverUser = getVariableValue("MYSQL_SERVER_USER")
        self.__rootPwd = getVariableValue("MYSQL_ROOT_PASSWD")

        self.__dbUser = getVariableValue("DATABASE_USER")
        self.__dbPwd = getVariableValue("DATABASE_PASSWORD")

        self.__basedir = getVariableValue("MYSQL_BASE")

        self.__bindir = os.path.join(self.__basedir, "bin")
        changePermissions(self.__bindir)

        self.__mysqld = cmd = os.path.join(self.__bindir, "mysqld")
        self.__mysql = cmd = os.path.join(self.__bindir, "mysql")
        self.__mysqladmin = cmd = os.path.join(self.__bindir, "mysqladmin")

        self.__defaultsFile = getVariableValue("MYSQL_CONFIG_FILE")
        self.__initDbSql = getVariableValue("MYSQL_INIT_SQL")

        self.__mysqlHome = getVariableValue("MYSQL_HOME")
        if not os.path.isdir(self.__mysqlHome):
            mkdir_p(self.__mysqlHome)

        self.__tmp = getVariableValue("TMPDIR")
        mkdir_p(self.__tmp)

        self.__pwdfile = os.path.join(self.__tmp, ".#p")

        self.__datadir = getVariableValue("MYSQL_DATA")
        if not os.path.isdir(self.__datadir) or not os.listdir(self.__datadir):
            dbDataClone = getVariableValue("MYSQL_DATA_CLONE")
            if dbDataClone and os.path.isdir(dbDataClone):
                shutil.copytree(dbDataClone, self.__datadir)
                self.__secured = True
            else:
                mkdir_p(self.__datadir)
                self.__secured = False
        else:
            self.__secured = True

        self.__tcpPort = getVariableValue("TCP_PORT")
        additionalVariables.add(
            RuntimeContextVariable("MYSQL_PORT", self.__tcpPort,
                                   RuntimeContextVariable.STRING_TYPE, "",
                                   True, RuntimeContextVariable.NO_INCREMENT))
        self.__dbName = getVariableValue("DATABASE_NAME")
        additionalVariables.add(
            RuntimeContextVariable("MYSQL_DB", self.__dbName,
                                   RuntimeContextVariable.STRING_TYPE, "",
                                   True, RuntimeContextVariable.NO_INCREMENT))

        self.__rootJdbcUrl = "jdbc:mysql://localhost:" + self.__tcpPort + "/mysql"
        self.__jdbcUrl = "jdbc:mysql://" + self.__hostname + ":" + self.__tcpPort + "/" + self.__dbName
        runtimeContext.addVariable(
            RuntimeContextVariable("JDBC_URL", self.__jdbcUrl,
                                   RuntimeContextVariable.STRING_TYPE, "",
                                   True, RuntimeContextVariable.NO_INCREMENT))

        self.__mysqlUnixPort = getVariableValue("MYSQL_UNIX_PORT")
        self.__databases = []
    def __init__(self, additionalVariables):
        logInfo("__init__:Enter")
        self.__workdir = getVariableValue('CONTAINER_WORK_DIR')
        self.__basedir = getVariableValue('ES_BASE_DIR')
        self.__eshome = self.__basedir
        self.lock = threading.Lock()
        runtimeContext.addVariable(
            RuntimeContextVariable("ES_HOME", self.__basedir,
                                   RuntimeContextVariable.ENVIRONMENT_TYPE,
                                   "ElasticSearch Home", False,
                                   RuntimeContextVariable.NO_INCREMENT))

        self.__bindir = os.path.join(self.__basedir, "bin")
        self.__enginedir = getVariableValue('ENGINE_WORK_DIR')
        self.__javahome = getVariableValue('GRIDLIB_JAVA_HOME')
        #try do chmod to java home, just in case
        if sys.platform.lower().find('win') != 0:
            java_file_path = os.path.join(self.__javahome, 'bin/java')
            try:
                java_file_mode = os.stat(java_file_path).st_mode
                if stat.S_IXUSR & java_file_mode == 0:
                    subprocess.call(["chmod", "-R", "0755", self.__javahome])
            except OSError:
                pass

        os.putenv("JAVA_HOME", self.__javahome)

        self.__path = os.getenv("PATH")
        self.__UnixPath = self.__bindir + ":" + os.path.join(
            self.__javahome, "bin") + ":" + self.__path
        os.putenv("PATH", self.__UnixPath)

        self.__ldd = os.getenv("LD_LIBRARY_PATH")
        self.__UnixLibPath = self.__ldd + ":" + os.path.join(
            self.__javahome, "jre/lib/amd64/server") + ":" + os.path.join(
                self.__javahome, "jre/lib/amd64/") + ":" + os.path.join(
                    self.__javahome, "jre/lib/ext") + ":" + os.path.join(
                        self.__javahome, "lib/")
        os.putenv("LD_LIBRARY_PATH", self.__UnixLibPath)

        self.__UnixPreLoad = os.path.join(self.__javahome,
                                          "jre/lib/amd64/libzip.so")
        os.putenv("LD_PRELOAD", self.__UnixPreLoad)
        runtimeContext.addVariable(
            RuntimeContextVariable("LD_LIBRARY_PATH", self.__UnixLibPath,
                                   RuntimeContextVariable.ENVIRONMENT_TYPE,
                                   "LD_LIBRARY_PATH", False,
                                   RuntimeContextVariable.NO_INCREMENT))
        runtimeContext.addVariable(
            RuntimeContextVariable("LD_PRELOAD", self.__UnixPreLoad,
                                   RuntimeContextVariable.ENVIRONMENT_TYPE,
                                   "LD_PRELOAD", False,
                                   RuntimeContextVariable.NO_INCREMENT))
        runtimeContext.addVariable(
            RuntimeContextVariable("JAVA_HOME", self.__javahome,
                                   RuntimeContextVariable.ENVIRONMENT_TYPE,
                                   "JAVA_HOME", False,
                                   RuntimeContextVariable.NO_INCREMENT))

        os.putenv("ES_HOME", self.__basedir)

        self.__logdir = getVariableValue('ES_LOG_DIR')
        self.__datadir = getVariableValue('ES_DATA_DIR')
        self.__tempdir = getVariableValue('ES_TMP_DIR')
        self.__confdir = getVariableValue('ES_CONF_DIR')
        self.__plugdir = getVariableValue('ES_PLUGINS_DIR')

        self.__hostIp = getVariableValue('ES_HOST_IP')
        self.__httpPort = getVariableValue('HTTP_PORT')
        self.__tcpPort = getVariableValue('ES_TCP_PORT')

        self.__httpPortInt = int(self.__httpPort)
        self.__maxRandom = int(getVariableValue('PORT_RANDOM_MAX_OFFSET'))
        self.__randomnum = int(random.randint(1, self.__maxRandom))
        self.__tcpPortInt = int(self.__tcpPort)

        #generate unique TCP port :
        ##self.__tcpPort = str(self.__tcpPortInt + self.__randomnum)
        ##runtimeContext.addVariable(RuntimeContextVariable("ES_TCP_PORT", self.__tcpPort, RuntimeContextVariable.STRING_TYPE, "TCP PORT Random Number", False, RuntimeContextVariable.NO_INCREMENT))
        #generate unique Http Port :
        ##self.__httpPort = str(self.__httpPortInt + self.__randomnum)

        self.__baseUrl = self.__hostIp + ":" + self.__tcpPort
        self.__baseUrlHttp = "http://" + self.__hostIp + ":" + self.__httpPort
        ##runtimeContext.addVariable(RuntimeContextVariable("HTTP_PORT", self.__httpPort, RuntimeContextVariable.STRING_TYPE, "HTTP PORT Random Number", False, RuntimeContextVariable.NO_INCREMENT))
        self.__master = getVariableValue('isPrimaryNode')
        if self.__master == "True":
            runtimeContext.addVariable(
                RuntimeContextVariable("EXPORTED_CLUSTER_ENDPOINT", "",
                                       RuntimeContextVariable.STRING_TYPE,
                                       "Master Endpoint for Clustering", False,
                                       RuntimeContextVariable.NO_INCREMENT))
            runtimeContext.addVariable(
                RuntimeContextVariable("MASTER_ENDPOINT", self.__baseUrl,
                                       RuntimeContextVariable.STRING_TYPE,
                                       "Master Endpoint for Clustering", True,
                                       RuntimeContextVariable.NO_INCREMENT))
        else:
            self.__myMasterEndpoint = getVariableValue('MASTER_ENDPOINT')
            runtimeContext.addVariable(
                RuntimeContextVariable("EXPORTED_CLUSTER_ENDPOINT",
                                       self.__myMasterEndpoint,
                                       RuntimeContextVariable.STRING_TYPE,
                                       "Master Endpoint for Clustering", False,
                                       RuntimeContextVariable.NO_INCREMENT))
        self.__httpRoutePrefix = getVariableValue("CLUSTER_NAME")
        self.__prefix = "/" + self.__httpRoutePrefix
        runtimeContext.addVariable(
            RuntimeContextVariable("HTTP_PREFIX", self.__prefix,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "PREFIX", False,
                                   RuntimeContextVariable.NO_INCREMENT))
        self.__pidfile = os.path.join(self.__workdir, "elasticsearch.pid")

        self.__toggleCheck = False

        #generate unique Node Name :

        self.__hostname = getVariableValue("ENGINE_USERNAME")
        self.__nodeName = "ElasticSearch-" + self.__hostname + "-" + str(
            self.__hostIp).replace(".", "_") + ":" + self.__httpPort + "-Node"
        runtimeContext.addVariable(
            RuntimeContextVariable("NODE_NAME", self.__nodeName,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "Auto Generated Node Name", False,
                                   RuntimeContextVariable.NO_INCREMENT))

        call(["touch", self.__pidfile])
        call(["chmod", "777", self.__pidfile])
        defaultfolders = [
            self.__logdir, self.__datadir, self.__tempdir, self.__confdir,
            self.__plugdir, self.__bindir
        ]
        logInfo("Creating the necessaries folders")
        for dir in defaultfolders:
            createDir(dir)
            call(["chmod", "-fR", "+x", dir])
        self.dist_pre_1x = getElasticSearchVersion().split(".") == "0"
Example #13
0
    def __init__(self, additionalVariables):
        " initialize oracle database"

        self.__hostname = "localhost"
        try:
            self.__hostname = InetAddress.getLocalHost().getCanonicalHostName()
        except:
            type, value, traceback = sys.exc_info()
            logger.severe("Hostname error:" + ` value `)

        additionalVariables.add(
            RuntimeContextVariable("ORACLE_HOSTNAME", self.__hostname,
                                   RuntimeContextVariable.ENVIRONMENT_TYPE,
                                   "Oracle Hostname", True,
                                   RuntimeContextVariable.NO_INCREMENT))

        listenAddress = getVariableValue("LISTEN_ADDRESS")
        additionalVariables.add(
            RuntimeContextVariable("ORACLE_LISTEN_ADDRESS", listenAddress,
                                   RuntimeContextVariable.ENVIRONMENT_TYPE,
                                   "Oracle Listen Address", True,
                                   RuntimeContextVariable.NO_INCREMENT))

        dbPassword = getVariableValue("DB_PASSWORD_ALL")

        if dbPassword and dbPassword.strip():
            self.__sysPassword = dbPassword
            additionalVariables.add(
                RuntimeContextVariable(
                    "SYS_PWD", dbPassword,
                    RuntimeContextVariable.ENVIRONMENT_TYPE))
            additionalVariables.add(
                RuntimeContextVariable(
                    "DBSNMP_PWD", dbPassword,
                    RuntimeContextVariable.ENVIRONMENT_TYPE))
            additionalVariables.add(
                RuntimeContextVariable(
                    "SYSMAN_PWD", dbPassword,
                    RuntimeContextVariable.ENVIRONMENT_TYPE))
            additionalVariables.add(
                RuntimeContextVariable(
                    "SYSTEM_PWD", dbPassword,
                    RuntimeContextVariable.ENVIRONMENT_TYPE))
        else:
            self.__sysPassword = getVariableValue("SYS_PWD")

        dbDataLocation = getVariableValue("DB_DATA_LOC")
        if dbDataLocation and os.path.isdir(dbDataLocation):
            dbName = getVariableValue("DB_NAME")

            dbDataDir = os.path.join(dbDataLocation, dbName)
            if os.path.isdir(dbDataDir):
                logger.info("DB Data directory already exists:" + dbDataDir +
                            "; Setting DB_INSTALL_OPTION to INSTALL_DB_SWONLY")
                additionalVariables.add(
                    RuntimeContextVariable(
                        "DB_INSTALL_OPTION", "INSTALL_DB_SWONLY",
                        RuntimeContextVariable.ENVIRONMENT_TYPE))

        tcpPort = getVariableValue("TCP_PORT")
        self.__serviceName = getVariableValue("DB_GLOBAL_NAME")

        sb = StringBuilder(
            "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)")
        sb.append("(HOST=").append(self.__hostname).append(")")
        sb.append("(PORT=").append(tcpPort).append("))")
        sb.append("(CONNECT_DATA=(SERVICE_NAME=").append(
            self.__serviceName).append(")))")

        self.__oracleServiceUrl = sb.toString()

        logger.info("Oracle listener service URL:" + self.__oracleServiceUrl)

        self.__jdbcUrl = "jdbc:oracle:thin:@" + self.__hostname + ":" + tcpPort + ":" + self.__serviceName
        additionalVariables.add(
            RuntimeContextVariable("JDBC_URL", self.__jdbcUrl,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "Oracle Thin Driver JDBC Url", True,
                                   RuntimeContextVariable.NO_INCREMENT))

        oracleDriver = "oracle.jdbc.OracleDriver"
        additionalVariables.add(
            RuntimeContextVariable("JDBC_DRIVER", oracleDriver,
                                   RuntimeContextVariable.STRING_TYPE,
                                   "Oracle Thin Driver class", True,
                                   RuntimeContextVariable.NO_INCREMENT))

        self.__dbControl = Boolean.parseBoolean(
            getVariableValue("CONFIG_DBCONTROL", "false"))

        if self.__dbControl:
            self.__dbCtrlPort = getVariableValue("DBCONTROL_HTTP_PORT")
            additionalVariables.add(
                RuntimeContextVariable("HTTPS_PORT", self.__dbCtrlPort,
                                       RuntimeContextVariable.STRING_TYPE))

        oracleDir = getVariableValue("ORACLE_DIR")
        self.__markerFilePath = os.path.join(oracleDir, ".#dsoracle")

        self.__maintFilePath = getVariableValue("ORACLE_MAINT_FILE")

        dbInstallOption = getVariableValue("DB_INSTALL_OPTION")
        if dbInstallOption == "INSTALL_DB_AND_CONFIG":
            globalLockString = "OracleEnabler-" + self.__hostname
            logger.info("Requesting Global Lock with name: " +
                        globalLockString)
            domain = proxy.getContainer().getCurrentDomain()
            options = domain.getOptions()
            maxActivationTimeOut = options.getProperty(
                Options.MAX_ACTIVATION_TIME_IN_SECONDS)
            lockTimeOut = Long.parseLong(maxActivationTimeOut) * 1000
            acquired = ContainerUtils.acquireGlobalLock(
                globalLockString, lockTimeOut, lockTimeOut)
            if acquired:
                logger.info("Acquired Global lock with name: " +
                            globalLockString)
            else:
                logger.severe("Could not acquire Global lock with name: " +
                              globalLockString)
                raise Exception("Could not acquire Global lock with name: " +
                                globalLockString)