adfinis / mariadb-ansible-galera-cluster

Automated installation of MariaDB Galera Cluster using Ansible
GNU General Public License v2.0
62 stars 50 forks source link

Executing skip-tags setup throws error #6

Closed DeanPoulin closed 6 years ago

DeanPoulin commented 6 years ago
[ansible@plansible01 mariadb-ansible-galera-cluster]$ ansible-playbook galera.yml --skip-tags setup
[DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it can also be a list of hosts, a directory or a list of paths . This
feature will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [galera_cluster] *********************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************
ok: [pclmariadbnode02.edgewoodsoftware.com]
ok: [pclmariadbnode03.edgewoodsoftware.com]
ok: [pclmariadbnode01.edgewoodsoftware.com]

TASK [galera_privs : Ensure MariaDB is running] *******************************************************************************************************
changed: [pclmariadbnode03.edgewoodsoftware.com]
changed: [pclmariadbnode02.edgewoodsoftware.com]
changed: [pclmariadbnode01.edgewoodsoftware.com]

TASK [galera_privs : Add Galera SST user] *************************************************************************************************************
changed: [pclmariadbnode02.edgewoodsoftware.com] => (item=localhost)
changed: [pclmariadbnode03.edgewoodsoftware.com] => (item=localhost)
changed: [pclmariadbnode01.edgewoodsoftware.com] => (item=localhost)

TASK [galera_conf : Add galera configuration] *********************************************************************************************************
fatal: [pclmariadbnode01.edgewoodsoftware.com]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'ansible_eth1' is undefined"}
fatal: [pclmariadbnode02.edgewoodsoftware.com]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'ansible_eth1' is undefined"}
fatal: [pclmariadbnode03.edgewoodsoftware.com]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'ansible_eth1' is undefined"}
    to retry, use: --limit @/opt/edgewoodsoftware/ansible/playbooks/mariadb-ansible-galera-cluster/galera.retry

PLAY RECAP ********************************************************************************************************************************************
pclmariadbnode01.edgewoodsoftware.com : ok=3    changed=2    unreachable=0    failed=1
pclmariadbnode02.edgewoodsoftware.com : ok=3    changed=2    unreachable=0    failed=1
pclmariadbnode03.edgewoodsoftware.com : ok=3    changed=2    unreachable=0    failed=1

executing from an ansible control machine with the following versions:

[ansible@plansible01 mariadb-ansible-galera-cluster]$ ansible --version
ansible 2.4.1.0
  config file = /opt/edgewoodsoftware/ansible/playbooks/mariadb-ansible-galera-cluster/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
DeanPoulin commented 6 years ago

I found that my network adapters are not eth0/1 as your scripts have. My network adapter is named ens160. When I created the VM in ESXi that was the default name it was being given.

"ansible_ens160": {
            "active": true,
            "device": "ens160",
            "features": {
                "busy_poll": "off [fixed]",
                "fcoe_mtu": "off [fixed]",
                "generic_receive_offload": "on",
                "generic_segmentation_offload": "on",
                "highdma": "on",
                "hw_tc_offload": "off [fixed]",
                "l2_fwd_offload": "off [fixed]",
                "large_receive_offload": "on",
                "loopback": "off [fixed]",
                "netns_local": "off [fixed]",
                "ntuple_filters": "off [fixed]",
                "receive_hashing": "on",
                "rx_all": "off [fixed]",
                "rx_checksumming": "on",
                "rx_fcs": "off [fixed]",
                "rx_vlan_filter": "on [fixed]",
                "rx_vlan_offload": "on",
                "rx_vlan_stag_filter": "off [fixed]",
                "rx_vlan_stag_hw_parse": "off [fixed]",
                "scatter_gather": "on",
                "tcp_segmentation_offload": "on",
                "tx_checksum_fcoe_crc": "off [fixed]",
                "tx_checksum_ip_generic": "on",
                "tx_checksum_ipv4": "off [fixed]",
                "tx_checksum_ipv6": "off [fixed]",
                "tx_checksum_sctp": "off [fixed]",
                "tx_checksumming": "on",
                "tx_fcoe_segmentation": "off [fixed]",
                "tx_gre_csum_segmentation": "off [fixed]",
                "tx_gre_segmentation": "off [fixed]",
                "tx_gso_partial": "off [fixed]",
                "tx_gso_robust": "off [fixed]",
                "tx_ipip_segmentation": "off [fixed]",
                "tx_lockless": "off [fixed]",
                "tx_mpls_segmentation": "off [fixed]",
                "tx_nocache_copy": "off",
                "tx_scatter_gather": "on",
                "tx_scatter_gather_fraglist": "off [fixed]",
                "tx_sctp_segmentation": "off [fixed]",
                "tx_sit_segmentation": "off [fixed]",
                "tx_tcp6_segmentation": "on",
                "tx_tcp_ecn_segmentation": "off [fixed]",
                "tx_tcp_mangleid_segmentation": "off",
                "tx_tcp_segmentation": "on",
                "tx_udp_tnl_csum_segmentation": "off [fixed]",
                "tx_udp_tnl_segmentation": "off [fixed]",
                "tx_vlan_offload": "on",
                "tx_vlan_stag_hw_insert": "off [fixed]",
                "udp_fragmentation_offload": "off [fixed]",
                "vlan_challenged": "off [fixed]"
            },
            "hw_timestamp_filters": [],
            "ipv4": {
                "address": "192.168.1.224",
                "broadcast": "192.168.1.255",
                "netmask": "255.255.255.0",
                "network": "192.168.1.0"
            },
tongpu commented 6 years ago

You can change the interface that is being used for internal cluster communication by setting the galera_cluster_interface variable. Putting galera_cluster_interface: ens160in e.g. group_vars/all should solve the issue in your case.