From 832bc1f47fce1b61f23259502c08f9253656cb38 Mon Sep 17 00:00:00 2001 From: Jaroslav Henner Date: Wed, 30 Sep 2015 20:51:35 +0200 Subject: Prevent dns resolution recursion (loop). The dnsmasq should not be resolving the example.com recursively, because in case that we have /etc/NetworkManager/dnsmasq.d/libvirt_dnsmasq.conf: server=/example.com/192.168.55.1 the dnsmasq will be asking itself, therefore a dns resolution loop is created, which causes Maximum number of concurrent DNS queries reached (max: 150) and performance degradation of dns resolution on the whole hypervizor and guests. This patch will fix that in the domain.xml, which will cause adding local=/example.com/ to the /var/lib/libvirt/dnsmasq/openshift-ansible.conf, effectively fixing the problem. --- playbooks/libvirt/openshift-cluster/templates/network.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbooks/libvirt/openshift-cluster/templates') diff --git a/playbooks/libvirt/openshift-cluster/templates/network.xml b/playbooks/libvirt/openshift-cluster/templates/network.xml index 86dcd62bb..050bc7ab9 100644 --- a/playbooks/libvirt/openshift-cluster/templates/network.xml +++ b/playbooks/libvirt/openshift-cluster/templates/network.xml @@ -8,7 +8,7 @@ - + -- cgit v1.2.3 From 14598f3a9cd7998a35a127832349f3ec57f4684b Mon Sep 17 00:00:00 2001 From: Jaroslav Henner Date: Mon, 19 Oct 2015 18:04:54 +0200 Subject: Use runcmd to restart network. Using bootcmd in cloud-config lead to restarts prior to starting the systemd-hostnamed, which was probable cause of the failure when DHCP client was failing to send the hostname, and subsequently, the ansible-opnshift was not able to identify the VM among the others when checking DHCP leases. The failure looked like: following 10:17:31 failed: [localhost] => {"attempts": 60, "changed": true, "cmd": "virsh -c qemu:///system net-dhcp-leases openshift-ansible | egrep -c 'experiment-node-compute-453d0|experiment-node-compute-61e16'", "delta": "0:00:00.033061", "end": "2015-10-19 10:17:31.409434", "failed": true, "rc": 0, "start": "2015-10-19 10:17:31.376373", "warnings": []} 10:17:31 stdout: 1 10:17:31 msg: Task failed as maximum retries was encountered --- playbooks/libvirt/openshift-cluster/templates/user-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbooks/libvirt/openshift-cluster/templates') diff --git a/playbooks/libvirt/openshift-cluster/templates/user-data b/playbooks/libvirt/openshift-cluster/templates/user-data index 77b788109..eacae7c7e 100644 --- a/playbooks/libvirt/openshift-cluster/templates/user-data +++ b/playbooks/libvirt/openshift-cluster/templates/user-data @@ -19,5 +19,5 @@ system_info: ssh_authorized_keys: - {{ lookup('file', '~/.ssh/id_rsa.pub') }} -bootcmd: +runcmd: - NETWORK_CONFIG=/etc/sysconfig/network-scripts/ifcfg-eth0; if ! grep DHCP_HOSTNAME ${NETWORK_CONFIG}; then echo 'DHCP_HOSTNAME="{{ item[0] }}.example.com"' >> ${NETWORK_CONFIG}; fi; pkill -9 dhclient; service network restart -- cgit v1.2.3