我有一个伪代码,应该创建一个包含两个节点的galera群集,但是,它正在创建两个群集,每个群集一个节点。
两个节点的名称分别是testbox1和testbox2
以下是我的./hiera/role/testbox.yaml
---
classes:
- '::galera'
selinux::mode: 'permissive'
yum::repos::enabled:
- percona-x86_64
yum::repos:
contrail-3.2.1-mitaka:
enabled: 0
packages:
- 'Percona-XtraDB-Cluster-shared-compat-57'
- 'Percona-Server-selinux-56'
galera::configure_repo: false
galera::package_ensure: 'present'
galera::galera_package_ensure: 'absent'
galera::galera_package_name: 'Percona-XtraDB-Cluster-galera-3'
galera::client_package_name: 'Percona-XtraDB-Cluster-client-57'
galera::mysql_package_name: 'Percona-XtraDB-Cluster-server-57'
galera::bootstrap_command: 'systemctl start [email protected]'
galera::mysql_service_name: 'mysql'
mysql::server_service_name: 'mysql'
galera::service_enabled: true
galera::mysql_restart: true
galera::configure_firewall: false
mysql::server::purge_conf_dir: true
galera::purge_conf_dir: true
galera::grep_binary: '/bin/grep'
galera::mysql_binary: '/usr/bin/mysql'
galera::rundir: '/var/run/mysqld'
galera::socket: '/var/lib/mysql/mysql.sock'
galera::create_root_user: true
galera::create_root_my_cnf: true
galera::create_status_user: true
galera::status_check: true
galera::galera_servers: ['testbox-1', 'testbox-2']
galera::galera_master: 'testbox-1'
galera::status_password: 'bla'
galera::bind_address: '0.0.0.0'
galera::override_options:
mysqld:
pxc_strict_mode: 'ENFORCING'
wsrep_provider: '/usr/lib64/galera3/libgalera_smm.so'
wsrep_slave_threads: 8
wsrep_sst_method: 'rsync'
wsrep_cluster_name: 'grafana-galera-cluster'
wsrep_node_address: "%{ipaddress}"
wsrep_node_name: "%{hostname}"
wsrep_sst_auth: "sstuser:%{hiera('galera::sstuser_password')}"
binlog_format: 'ROW'
default_storage_engine: 'InnoDB'
innodb_locks_unsafe_for_binlog: 1
innodb_autoinc_lock_mode: 2
innodb_buffer_pool_size: '40000M'
innodb_log_file_size: '100M'
query_cache_size: 0
query_cache_type: 0
datadir: '/var/lib/mysql'
socket: '/var/lib/mysql/mysql.sock'
log-error: '/var/log/mysqld.log'
pid-file: '/var/run/mysql/mysql.pid'
max_connections: '10000'
max_connect_errors: '10000000'
mysqld_safe:
log-error: '/var/log/mysqld.log'
galera::status_user: 'clustercheck'
galera::status_allow: '%'
galera::status_available_when_donor: 0
galera::status_available_when_readonly: -1
galera::status_host: 'localhost'
galera::status_log_on_success: ''
galera::status_log_on_success_operator: '='
galera::status_port: 9200
galera::validate::action: 'select count(1);'
galera::validate::catch: 'ERROR'
galera::validate::delay: 3
galera::validate::inv_catch: undef
galera::validate::retries: 20
并且我正在使用fraenki/galera模块
有了这段代码,我最终将一个集群中的testbox1和另一个集群中的testbox2结束,而不是将它们都放在同一集群中,有人可以告诉我我的代码有什么问题吗?
木偶版本3.8.7(开源)(我无法升级)
我有一个伪代码,应该创建一个包含两个节点的galera群集,但是,它正在创建两个群集,每个群集一个节点。两个节点的名称是testbox1和...
mysql@bootstrap
仅需要在一个节点上执行。另一个节点正常启动,然后它将从第一个节点开始SST。