You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-4157 mcs-loadbrm.py doesn't start SM with systemd with a certain argument
This feature is used to start multi-node MCS in containers
This commit is contained in:
@@ -28,6 +28,10 @@ def get_port():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
# To avoid systemd in container environment
|
||||||
|
use_systemd = True
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
use_systemd = not sys.argv[1] == 'no'
|
||||||
sm_config = configparser.ConfigParser()
|
sm_config = configparser.ConfigParser()
|
||||||
|
|
||||||
sm_config.read('/etc/columnstore/storagemanager.cnf')
|
sm_config.read('/etc/columnstore/storagemanager.cnf')
|
||||||
@@ -48,7 +52,8 @@ if __name__ == '__main__':
|
|||||||
brm_saves_current = ''
|
brm_saves_current = ''
|
||||||
|
|
||||||
if storage.lower() == 's3' and not bucket.lower() == 'some_bucket':
|
if storage.lower() == 's3' and not bucket.lower() == 'some_bucket':
|
||||||
# start SM
|
# start SM using systemd
|
||||||
|
if use_systemd is True:
|
||||||
cmd = 'systemctl start mcs-storagemanager'
|
cmd = 'systemctl start mcs-storagemanager'
|
||||||
retcode = subprocess.call(cmd, shell=True)
|
retcode = subprocess.call(cmd, shell=True)
|
||||||
if retcode < 0:
|
if retcode < 0:
|
||||||
@@ -90,7 +95,7 @@ Please install CMAPI first.', file=sys.stderr)
|
|||||||
primary_address = config_root.find('./DBRM_Controller/IPAddr').text
|
primary_address = config_root.find('./DBRM_Controller/IPAddr').text
|
||||||
api_key = get_key()
|
api_key = get_key()
|
||||||
if len(api_key) == 0:
|
if len(api_key) == 0:
|
||||||
print('Failed to find API key in {}.'.format(api_config_file), \
|
print('Failed to find API key in {}.'.format(API_CONFIG_PATH), \
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
headers = {'x-api-key': api_key}
|
headers = {'x-api-key': api_key}
|
||||||
|
Reference in New Issue
Block a user