Пример #1
0
def check_database_is_running(context):
    if not 'PGPORT' in os.environ:
        raise Exception('PGPORT should be set')

    pgport = int(os.environ['PGPORT'])

    running_status = chk_local_db_running(master_data_dir, pgport)
    gpdb_running = running_status[0] and running_status[1] and running_status[2] and running_status[3]

    return gpdb_running
Пример #2
0
def check_database_is_running(context):
    if not 'PGPORT' in os.environ:
        raise Exception('PGPORT should be set')

    pgport = int(os.environ['PGPORT'])

    running_status = chk_local_db_running(os.environ.get('MASTER_DATA_DIRECTORY'), pgport)
    gpdb_running = running_status[0] and running_status[1] and running_status[2] and running_status[3]

    return gpdb_running
Пример #3
0
def check_database_is_running(context):
    if not 'PGPORT' in os.environ:
        raise Exception('PGPORT should be set')

    pgport = int(os.environ['PGPORT'])

    running_status = chk_local_db_running(master_data_dir, pgport)
    gpdb_running = running_status[0] and running_status[1] and running_status[2] and running_status[3]

    return gpdb_running
Пример #4
0
def check_database_is_running(context):
    if not 'PGPORT' in os.environ:
        raise Exception('PGPORT should be set')

    pgport = int(os.environ['PGPORT'])

    running_status = chk_local_db_running(os.environ.get('MASTER_DATA_DIRECTORY'), pgport)
    gpdb_running = running_status[0] and running_status[1] and running_status[2] and running_status[3]

    return gpdb_running
    def getPidRunningStatus(self, seg):
        """
        Get an object containing various information about the postmaster pid's status
        """
        (postmasterPidFileExists, tempFileExists, lockFileExists, netstatPortActive, pidValue) = \
                    gp.chk_local_db_running(seg.getSegmentDataDirectory(), seg.getSegmentPort())

        return {
            'postmasterPidFileExists': postmasterPidFileExists,
            'tempFileExists': tempFileExists,
            'lockFileExists': lockFileExists,
            'netstatPortActive': netstatPortActive,
            'pidValue': pidValue
        }
    def getPidRunningStatus(self, seg):
        """
        Get an object containing various information about the postmaster pid's status
        """
        (postmasterPidFileExists, tempFileExists, lockFileExists, netstatPortActive, pidValue) = \
                    gp.chk_local_db_running(seg.getSegmentDataDirectory(), seg.getSegmentPort())

        return {
            'postmasterPidFileExists' : postmasterPidFileExists,
            'tempFileExists' : tempFileExists,
            'lockFileExists' : lockFileExists,
            'netstatPortActive' : netstatPortActive,
            'pidValue' : pidValue
        }
    def getPidRunningStatus(self, seg):
        """
        Get an object containing various information about the postmaster pid's status
        """
        (
            postmasterPidFileExists,
            tempFileExists,
            lockFileExists,
            netstatPortActive,
            pidValue,
        ) = gp.chk_local_db_running(seg.getSegmentDataDirectory(), seg.getSegmentPort())

        return {
            "postmasterPidFileExists": postmasterPidFileExists,
            "tempFileExists": tempFileExists,
            "lockFileExists": lockFileExists,
            "netstatPortActive": netstatPortActive,
            "pidValue": pidValue,
        }