我正在尝试使用以下魅力构建 HA mysql
我在单独的虚拟机中启动了 3 个 galera-cluster 单元,每个单元使用以下配置来部署服务(galera-cluster)
galera-cluster: vip: '10.3.0.101' sst-password: root root-password: root
日志的一部分内容如下,表明虽然 IP 地址是根据我的网络配置配置的,但无法分配请求的地址:
2016-02-22 15:46:05 INFO juju-log hanode:36: Missing required configuration: []
2016-02-22 15:46:05 INFO juju-log hanode:36: Unable to configure corosync right now, deferring configuration
2016-02-22 15:46:07 INFO juju-log ha:38: Missing required configuration: ['corosync_mcastport', 'corosync_bindnetaddr']
2016-02-22 15:46:07 INFO juju-log ha:38: Unable to configure corosync right now, deferring configuration
2016-02-22 15:46:08 INFO juju-log hanode:36: Missing required configuration: ['corosync_mcastport', 'corosync_bindnetaddr']
2016-02-22 15:46:08 INFO juju-log hanode:36: Unable to configure corosync right now, deferring configuration
2016-02-22 15:46:10 INFO juju-log ha:38: Missing required configuration: ['corosync_mcastport', 'corosync_bindnetaddr']
2016-02-22 15:46:10 INFO juju-log ha:38: Unable to configure corosync right now, deferring configuration
2016-02-22 15:46:11 INFO juju-log hanode:36: Missing required configuration: ['corosync_mcastport', 'corosync_bindnetaddr']
2016-02-22 15:46:11 INFO juju-log hanode:36: Unable to configure corosync right now, deferring configuration
2016-02-22 15:46:13 INFO juju-log hanode:36: Missing required configuration: ['corosync_mcastport', 'corosync_bindnetaddr']
2016-02-22 15:46:13 INFO juju-log hanode:36: Unable to configure corosync right now, deferring configuration
2016-02-22 15:46:21 INFO ha-relation-changed Traceback (most recent call last):
2016-02-22 15:46:21 INFO ha-relation-changed File "/var/lib/juju/agents/unit-galera-hacluster-2/charm/hooks/ha-relation-changed", line 424, in <module>
2016-02-22 15:46:21 INFO ha-relation-changed hooks.execute(sys.argv)
2016-02-22 15:46:21 INFO ha-relation-changed File "/var/lib/juju/agents/unit-galera-hacluster-2/charm/hooks/charmhelpers/core/hookenv.py", line 691, in execute
2016-02-22 15:46:21 INFO ha-relation-changed self._hooks[hook_name]()
2016-02-22 15:46:21 INFO ha-relation-changed File "/var/lib/juju/agents/unit-galera-hacluster-2/charm/hooks/ha-relation-changed", line 169, in ha_relation_changed
2016-02-22 15:46:21 INFO ha-relation-changed if not get_corosync_conf():
2016-02-22 15:46:21 INFO ha-relation-changed File "/var/lib/juju/agents/unit-galera-hacluster-2/charm/hooks/utils.py", line 214, in get_corosync_conf
2016-02-22 15:46:21 INFO ha-relation-changed 'corosync_bindnetaddr': bindnetaddr(bindiface),
2016-02-22 15:46:21 INFO ha-relation-changed File "/var/lib/juju/agents/unit-galera-hacluster-2/charm/hooks/utils.py", line 130, in get_network_address
2016-02-22 15:46:21 INFO ha-relation-changed network = "{}/{}".format(get_iface_ipaddr(iface),
2016-02-22 15:46:21 INFO ha-relation-changed File "/var/lib/juju/agents/unit-galera-hacluster-2/charm/hooks/utils.py", line 106, in get_iface_ipaddr
2016-02-22 15:46:21 INFO ha-relation-changed struct.pack('256s', iface[:15])
2016-02-22 15:46:21 INFO ha-relation-changed IOError: [Errno 99] Cannot assign requested address
2016-02-22 15:46:21 ERROR juju.worker.uniter.operation runhook.go:107 hook "ha-relation-changed" failed: exit status 1
galera-hacluster 下属服务的状态为
hook failed: "ha-relation-changed" for galera-hacluster:ha