diff --git a/lxc1/p0-infrastructure/mgdb.yml b/lxc1/p0-infrastructure/mgdb.yml index dd59143..3a22b45 100644 --- a/lxc1/p0-infrastructure/mgdb.yml +++ b/lxc1/p0-infrastructure/mgdb.yml @@ -13,17 +13,20 @@ services: - /docker/maria/data:/var/lib/mysql - /docker/maria/conf:/etc/mysql/conf.d command: + - mariadb - --${WS_NEW_CLUSTER} - --wsrep-on=ON - --wsrep-provider=/usr/lib/galera/libgalera_smm.so - --wsrep-cluster-name=${CLUSTER_NAME} - # ?pc.wait_prim=no tells the process not to hang if it can't find a leader immediately - - --wsrep-cluster-address=${WSREP_GCOMM} + - --wsrep-cluster-address=gcomm://${CLUSTER_LOCAL_IP},${CLUSTER_REMOTE_IP}?pc.wait_prim=no - --wsrep-node-address=${CLUSTER_KEEPALIVED_IP} - --wsrep-node-name=node${MGDB_NODE_NUMBER} - --binlog-format=row - --default-storage-engine=innodb - --innodb-autoinc-lock-mode=2 - --bind-address=0.0.0.0 - # pc.ignore_sb=true is the key for 2-node clusters to avoid deadlocks - - --wsrep-provider-options=pc.ignore_sb=true;pc.npvo=true;pc.weight=${MARIA_PC_WEIGHT} \ No newline at end of file + # Switch to MariaBackup (The production standard) + - --wsrep-sst-method=mariabackup + - --wsrep-sst-auth=sstuser:${SST_PASSWORD} + # Weight 2 on Node 1 forces it to be the leader during reboots/resets + - --wsrep-provider-options=pc.ignore_sb=true;pc.npvo=true;pc.weight=${NODE_WEIGHT} \ No newline at end of file