summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Stransky <jistr@redhat.com>2015-03-26 14:59:19 +0100
committerJiri Stransky <jistr@redhat.com>2015-03-26 18:57:38 +0100
commitc0658056cfc13cc4fc40057847573801f77869e9 (patch)
tree2f7e11196cad0479728e882be509565895dd2100
parentfed9d001ccc92a6d3392cb959416596b6df83d99 (diff)
puppet+devtest: make compute nodes reachable
Compute nodes run libvirt, which automatically creates a default network which has the same address space (192.168.122.*) as the libvirt default network on the host machine where devtest is running. This overlap causes that when a compute node wants to send a packet to the host machine (192.168.122.1) it gets incorrectly routed through the compute node's own virbr0 instead of br-ex. The current solution does not seem to be enough because libvirt gets started and creates the default network before Puppet is triggered on compute nodes. Making sure the libvirt default network is destroyed on the compute node fixes the issue. We don't have any puppet modules in OPM that would deal with libvirt networks and it's probably not worth exploring and adding one because of this small issue (i don't expect another use case of managing libvirt networks directly), so i'm using an exec with proper idempotency check. Change-Id: Icde12aa204ed1f7fa35b0525875ce07db34dc42c Closes-Bug: #1436822
-rw-r--r--puppet/manifests/overcloud_compute.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
index eef468da..d02725ab 100644
--- a/puppet/manifests/overcloud_compute.pp
+++ b/puppet/manifests/overcloud_compute.pp
@@ -33,6 +33,13 @@ file { ['/etc/libvirt/qemu/networks/autostart/default.xml',
ensure => absent,
before => Service['libvirt']
}
+# in case libvirt has been already running before the Puppet run, make
+# sure the default network is destroyed
+exec { 'libvirt-default-net-destroy':
+ command => '/usr/bin/virsh net-destroy default',
+ onlyif => '/usr/bin/virsh net-info default | /bin/grep -i "^active:\s*yes"',
+ before => Service['libvirt'],
+}
include ::nova
include ::nova::compute