From 205cefd8d06c111ed82b8a88ab29de80e832c2a3 Mon Sep 17 00:00:00 2001 From: apple Date: Fri, 24 Feb 2023 14:33:52 +0100 Subject: [PATCH] Add monitoring-datadir to arbitrator --- arbitrator/arbitrator_cmd.go | 1 + .../arbitrator/config.toml.sample.arbitrator | 12 ----- .../cluster-demo/stephane.d/emma.toml.old | 27 ---------- .../cluster-demo/stephane.d/galera.toml | 27 ---------- .../cluster-demo/stephane.d/grouprep.toml | 15 ------ .../cluster-demo/stephane.d/tnstest.toml | 54 ------------------- .../cluster-api/cluster-demo/stephane.toml | 4 ++ 7 files changed, 5 insertions(+), 135 deletions(-) delete mode 100644 etc/local/features/arbitrator/config.toml.sample.arbitrator delete mode 100644 etc/opensvc/cluster-api/cluster-demo/stephane.d/emma.toml.old delete mode 100644 etc/opensvc/cluster-api/cluster-demo/stephane.d/galera.toml delete mode 100644 etc/opensvc/cluster-api/cluster-demo/stephane.d/grouprep.toml delete mode 100644 etc/opensvc/cluster-api/cluster-demo/stephane.d/tnstest.toml diff --git a/arbitrator/arbitrator_cmd.go b/arbitrator/arbitrator_cmd.go index 34c37da9d..8b88e7fd1 100644 --- a/arbitrator/arbitrator_cmd.go +++ b/arbitrator/arbitrator_cmd.go @@ -56,6 +56,7 @@ func init() { rootCmd.Flags().StringVar(&conf.KeyPath, "keypath", "/etc/replication-manager/.replication-manager.key", "Encryption key file path") rootCmd.PersistentFlags().BoolVar(&conf.Verbose, "verbose", false, "Print detailed execution info") rootCmd.PersistentFlags().StringVar(&memprofile, "memprofile", "/tmp/repmgr.mprof", "Write a memory profile to a file readable by pprof") + rootCmd.PersistentFlags().StringVar(&conf.WorkingDir, "monitoring-datadir", "/var/lib/replication-manager", "Path to write temporary and persistent files") } diff --git a/etc/local/features/arbitrator/config.toml.sample.arbitrator b/etc/local/features/arbitrator/config.toml.sample.arbitrator deleted file mode 100644 index 71a0b3940..000000000 --- a/etc/local/features/arbitrator/config.toml.sample.arbitrator +++ /dev/null @@ -1,12 +0,0 @@ -# config.toml -# Example replication-manager configuration file - -# change the service file in /etc/systemd/system/replication-manager.service to looks like : -# replication-manager --config=./etc/config.toml.sample --cluster=Cluster01,Cluster_Test_2_Nodes monitor -[arbitrator] -db-servers-hosts = "192.168.100.21:3306" -db-servers-credential = "testres:testres4repman" -title = "arbitrator" -arbitrator-bind-address = "0.0.0.0:10001" -arbitrator-driver = "sqlite" -[default] diff --git a/etc/opensvc/cluster-api/cluster-demo/stephane.d/emma.toml.old b/etc/opensvc/cluster-api/cluster-demo/stephane.d/emma.toml.old deleted file mode 100644 index a142a469a..000000000 --- a/etc/opensvc/cluster-api/cluster-demo/stephane.d/emma.toml.old +++ /dev/null @@ -1,27 +0,0 @@ -[emma] -title = "emma" -db-servers-hosts = "db1,db2" -db-servers-prefered-master = "db1" -db-servers-credential = "root:mariadb" -db-servers-connect-timeout = 1 -replication-credential = "root:mariadb" -force-slave-readonly = true -prov-db-docker-img = "mariadb:10.7" -prov-db-tags = "docker,linux,innodb,noquerycache,threadpool,slow,ssd,localinfile,nodoublewrite,compressbinlog,noadaptiveflush,relayspacelimit,optimistic" -prov-db-disk-size = "2" -prov-db-memory = "256" -prov-db-disk-iops = "10000" -prov-db-cpu-cores = "8" -monitoring-scheduler = false -# backup-restic = true -proxysql=true -proxysql-port = 3306 -proxysql-servers = "proxysql1,proxysql2" -proxysql-user ="external" -proxysql-bootstrap= true -proxysql-copy-grants = true -prov-proxy-disk-size = "1" - -prov-proxy-docker-proxysql-img="proxysql/proxysql:2.4.8" -sysbench-binary-path="/usr/local/bin/sysbench" -sysbench-v1=true diff --git a/etc/opensvc/cluster-api/cluster-demo/stephane.d/galera.toml b/etc/opensvc/cluster-api/cluster-demo/stephane.d/galera.toml deleted file mode 100644 index 6124221cc..000000000 --- a/etc/opensvc/cluster-api/cluster-demo/stephane.d/galera.toml +++ /dev/null @@ -1,27 +0,0 @@ -[galera] -title = "galera" -db-servers-hosts = "db1,db2,db3" -db-servers-prefered-master = "db1" -db-servers-connect-timeout = 1 -# failover-mode = "automatic" -autorejoin-mysqldump = true -force-slave-failover-readonly-state = true -prov-db-docker-img = "mariadb:10.5.18" -#prov-db-docker-img = "quay.io/mariadb-foundation/mariadb-devel:10.5" -prov-serialized = true -prov-db-tags = "docker,smallredolog,innodb,noquerycache,threadpool,logslow,wsrep,nosplitpath" -prov-db-disk-size = "1G" -prov-proxy-disk-size ="1G" -replication-multi-master-wsrep = true -replication-multi-master-wsrep-sst-method = "rsync_wan" -#replication-multi-master-wsrep-sst-method = "rsync" -#replication-multi-master-wsrep-sst-method = "mariabackup" -# mariadbbackup failed cause can not rm mount point under .system -haproxy=true -haproxy-servers = "haproxy1" - -proxysql=true -proxysql-servers = "proxysql1" -proxysql-user ="external" -proxysql-bootstrap= true -proxysql-copy-grants = true diff --git a/etc/opensvc/cluster-api/cluster-demo/stephane.d/grouprep.toml b/etc/opensvc/cluster-api/cluster-demo/stephane.d/grouprep.toml deleted file mode 100644 index 68b165305..000000000 --- a/etc/opensvc/cluster-api/cluster-demo/stephane.d/grouprep.toml +++ /dev/null @@ -1,15 +0,0 @@ -[grouprep] -title = "grouprep" -db-servers-hosts = "db1,db2,db3" -db-servers-prefered-master = "db1" -db-servers-connect-timeout = 1 -# failover-mode = "automatic" -autorejoin-mysqldump = true -force-slave-failover-readonly-state = true -prov-db-docker-img = "mysql:latest" -prov-db-tags = "docker,smallredolog,innodb,noquerycache,threadpool,logslow,grouprep,nosplitpath" -prov-db-disk-size = "1G" -prov-proxy-disk-size ="1G" -replication-multi-master-grouprep = true -haproxy=true -haproxy-servers = "haproxy1" diff --git a/etc/opensvc/cluster-api/cluster-demo/stephane.d/tnstest.toml b/etc/opensvc/cluster-api/cluster-demo/stephane.d/tnstest.toml deleted file mode 100644 index 26731b4ba..000000000 --- a/etc/opensvc/cluster-api/cluster-demo/stephane.d/tnstest.toml +++ /dev/null @@ -1,54 +0,0 @@ -[tnstest] -title = "tnstest" -db-servers-hosts = "db1,db2" -db-servers-prefered-master = "db1" -# prov-orchestrator = "onpremise" -# db-servers-prefered-master = "db1.benchsvc.cloud18" -# db-servers-hosts = "db1.bench.svc.cloud18,db2.bench.svc.cloud18" -db-servers-credential = "root:mariadb" - -#replication-source-name = "bench" -#prov-db-domain = "1" - -#replication-multi-master-wsrep = false -db-servers-connect-timeout = 1 -replication-credential = "root:mariadb" -#force-slave-readonly = true -#prov-db-docker-img = "quay.io/mariadb-foundation/mariadb-devel:10.8-mdev-11675-rpl-lag-free-alter" -prov-db-docker-img = "mariadb:10.3.32" - -prov-db-tags = "smallredolog,docker,linux,innodb,noquerycache,threadpool,slow,ssd,localinfile,nodoublewrite,compressbinlog,noadaptiveflush,relayspacelimit,optimistic" -prov-db-disk-size = "2" -prov-db-memory = "256" -prov-db-disk-iops = "10000" -prov-db-cpu-cores = "8" - - -monitoring-scheduler = false -sysbench-binary-path ="/usr/local/bin/sysbench" -sysbench-v1 = true - -# backup-restic = true - -prov-proxy-disk-size = "1" - - -proxysql=true -proxysql-servers = "proxysql1" -proxysql-user ="external" -proxysql-bootstrap= true -proxysql-copy-grants = true - - - - -#maxscale=true -#maxscale-servers = "maxscale1" - -#haproxy=true -#haproxy-servers = "haproxy1" -# haproxy-servers = "haproxy1.bench.svc.cloud18" - -#shardproxy=true -#hardproxy-servers = "shardproxy1" -#prov-proxy-docker-shardproxy-img="signal18/mariadb-spider:latest" diff --git a/etc/opensvc/cluster-api/cluster-demo/stephane.toml b/etc/opensvc/cluster-api/cluster-demo/stephane.toml index 590af9c9b..cf9d39d73 100644 --- a/etc/opensvc/cluster-api/cluster-demo/stephane.toml +++ b/etc/opensvc/cluster-api/cluster-demo/stephane.toml @@ -34,3 +34,7 @@ prov-proxy-service-type = "docker" prov-proxy-disk-type = "volume" prov-proxy-volume-data = "tank" test=true +arbitration-external= true +arbitration-external-hosts="10.8.0.50:8080" +arbitration-peer-hosts="10.8.0.72:10001" +arbitration-external-secret="tnstest"