コード例 #1
0
ファイル: rqg_datagen.py プロジェクト: Percona-QA/pxc-qa
 def __init__(self, basedir, workdir, user, debug):
     self.basedir = basedir
     self.workdir = workdir
     self.user = user
     self.debug = debug
     self.utility_cmd = utility.Utility(debug)
     self.version = self.utility_cmd.version_check(self.basedir)
コード例 #2
0
 def __init__(self, pt_basedir, basedir, workdir, node, socket, debug):
     self.pt_basedir = pt_basedir
     self.basedir = basedir
     self.workdir = workdir
     self.node = node
     self.socket = socket
     self.debug = debug
     self.utility_cmd = utility.Utility(debug)
コード例 #3
0
#!/usr/bin/env python
# Created by Ramesh Sivaraman, Percona LLC.
# This will help us to start Percona XtraDB Cluster

import os
import subprocess
import random
import shutil
import time
from util import utility

utility_cmd = utility.Utility()


class StartCluster:
    def __init__(self, scriptdir, workdir, basedir, node):
        self.scriptdir = scriptdir
        self.workdir = workdir
        self.basedir = basedir
        self.node = node

    def sanity_check(self):
        """ Sanity check method will remove existing
            cluster data directories and forcefully kill
            running mysqld processes. This will also check
            the availability of mysqld binary file.
        """
        # kill existing mysqld process
        os.system("ps -ef | grep 'node[0-9]' | grep -v grep | "
                  "awk '{print $2}' | xargs kill -9 >/dev/null 2>&1")
        if not os.path.exists(self.workdir + '/log'):
コード例 #4
0
parser = argparse.ArgumentParser(prog='PXC consistency test', usage='%(prog)s [options]')
parser.add_argument('-e', '--encryption-run', action='store_true',
                    help='This option will enable encryption options')
parser.add_argument('-d', '--debug', action='store_true',
                    help='This option will enable debug logging')
args = parser.parse_args()
if args.encryption_run is True:
    encryption = 'YES'
else:
    encryption = 'NO'
if args.debug is True:
    debug = 'YES'
else:
    debug = 'NO'

utility_cmd = utility.Utility(debug)
utility_cmd.check_python_version()
sysbench_run_time = 10


class ConsistencyCheck:
    def __init__(self, basedir, workdir, user, node1_socket, pt_basedir, node):
        self.workdir = workdir
        self.basedir = basedir
        self.user = user
        self.socket = node1_socket
        self.pt_basedir = pt_basedir
        self.node = node

    def run_query(self, query):
        query_status = os.system(query)
コード例 #5
0
ファイル: sysbench_run.py プロジェクト: Percona-QA/pxc-qa
 def __init__(self, basedir, workdir, socket, debug):
     self.basedir = basedir
     self.workdir = workdir
     self.socket = socket
     self.debug = debug
     self.utility_cmd = utility.Utility(debug)