From c0658056cfc13cc4fc40057847573801f77869e9 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Thu, 26 Mar 2015 14:59:19 +0100 Subject: 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 --- puppet/manifests/overcloud_compute.pp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'puppet/manifests/overcloud_compute.pp') 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 -- cgit 1.2.3-korg