diff --git a/oam/install_scripts/columnstore-post-install.in b/oam/install_scripts/columnstore-post-install.in index 930c6a929..0d9e1aef3 100755 --- a/oam/install_scripts/columnstore-post-install.in +++ b/oam/install_scripts/columnstore-post-install.in @@ -316,9 +316,14 @@ systemctl cat mariadb-columnstore.service > /dev/null 2>&1 if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then mkdir -p /var/lib/columnstore/storagemanager chown -R mysql:mysql /var/lib/columnstore/storagemanager + IFLAG=/var/lib/columnstore/storagemanager/storagemanager-lock - echo "Populating the engine initial system catalog." - systemctl start mariadb-columnstore + # prevent nodes using shared storage manager from stepping on each other when initializing + # if storagemanager-lock already exists, we have already initialized + if [ ! -e $IFLAG ]; then + echo "Populating the engine initial system catalog." + systemctl start mariadb-columnstore + fi fi if [ $stop_mysqld -eq 1 ];then diff --git a/oam/install_scripts/columnstore-pre-uninstall.in b/oam/install_scripts/columnstore-pre-uninstall.in index aeafe9429..4c987ed11 100755 --- a/oam/install_scripts/columnstore-pre-uninstall.in +++ b/oam/install_scripts/columnstore-pre-uninstall.in @@ -110,7 +110,7 @@ if [ -n "$systemctl" ] && [ $(running_systemd) -eq 0 ]; then systemctl daemon-reload # remove flag to prevent clusters using shared storage from initializing columnstore more than once - IFLAG=/var/lib/columnstore/storagemanager/cs-initialized + IFLAG=/var/lib/columnstore/storagemanager/storagemanager-lock if [ -e $IFLAG ]; then rm $IFLAG fi