1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-18 21:44:02 +03:00
mariadb-columnstore-engine/oam/install_scripts/mariadb-columnstore-start.sh.in
2022-04-04 12:50:42 +00:00

22 lines
719 B
Bash

#!/bin/bash
# This script allows to gracefully start MCS
# prevent nodes using shared storage manager from stepping on each other when initializing
# flock will open up an exclusive file lock to run atomic operations
exec {fd_lock}>@ENGINE_DATADIR@/storagemanager/storagemanager-lock
flock -n "$fd_lock" || exit 0
# pass in arg of 1 to start DBRM_Worker1
/bin/systemctl start mcs-workernode@1.service
/bin/systemctl start mcs-controllernode
/bin/systemctl start mcs-primproc
/bin/systemctl start mcs-writeengineserver
/bin/systemctl start mcs-dmlproc
/bin/systemctl start mcs-ddlproc
su -s /bin/sh -c '@ENGINE_BINDIR@/dbbuilder 7' @DEFAULT_USER@ 1> @ENGINE_LOGDIR@/install/dbbuilder.log
flock -u "$fd_lock"
exit 0