summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt
diff options
context:
space:
mode:
authorJaroslav Henner <jhenner@redhat.com>2015-10-19 18:04:54 +0200
committerJaroslav Henner <jhenner@redhat.com>2015-10-20 02:12:50 +0200
commit14598f3a9cd7998a35a127832349f3ec57f4684b (patch)
tree646a3d6fbd2cc116dac650737e64f2f224b6e832 /playbooks/libvirt
parentef021a3d43e46d0da00ece93b45d5eb55bb4ca93 (diff)
downloadopenshift-14598f3a9cd7998a35a127832349f3ec57f4684b.tar.gz
openshift-14598f3a9cd7998a35a127832349f3ec57f4684b.tar.bz2
openshift-14598f3a9cd7998a35a127832349f3ec57f4684b.tar.xz
openshift-14598f3a9cd7998a35a127832349f3ec57f4684b.zip
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
Diffstat (limited to 'playbooks/libvirt')
-rw-r--r--playbooks/libvirt/openshift-cluster/templates/user-data2
1 files changed, 1 insertions, 1 deletions
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