From 97a933064c1b090106d1475b7ffc26c2a018703f Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Thu, 16 Jun 2016 15:27:27 +0200 Subject: [PATCH] Remove special config for west bifrost host The infracloud servers are all now in the same location, thus it will be likely we'll just have one bifrost host managing the provisioning of vanilla/chocolate regions. The glean and bifrost changes now allows to do all the network config without a double dhcp, thus removing this logic. Change-Id: I649334fbc657c9a27378360d2763d378d59cb763 --- manifests/bifrost.pp | 70 -------------------------------------------- 1 file changed, 70 deletions(-) diff --git a/manifests/bifrost.pp b/manifests/bifrost.pp index c4e3407..4770ddc 100644 --- a/manifests/bifrost.pp +++ b/manifests/bifrost.pp @@ -121,74 +121,4 @@ class infracloud::bifrost ( Class['::mysql::server'], ], } - - if $region == 'hpuswest' { - # This is a temporary workaround while we work on getting glean and - # networking init scripts working. dnsmasq was already started by bifrost, - # but we need a second one in order to make our infra-cloud-networking - # element work properly. Set up an alternate config file and static dhcp host - # files, and manage the second dnsmasq as if it was a service. - # - # This improvement is already activated in hpuseast, so this conditional - # will make it easier to run both concurrently and eventually remove this - # whole thing. - file { "/etc/dnsmasq.conf.vlan${vlan}": - ensure => present, - content => template('infracloud/bifrost/dnsmasq.conf.vlan.erb'), - mode => '0644', - require => Exec['install bifrost'], - notify => Service['dnsmasq-vlan'], - } - - file { '/opt/stack/custom_playbooks': - ensure => directory, - require => Exec['install bifrost'], - } - - file { '/opt/stack/custom_playbooks/templates': - ensure => directory, - } - - file { '/opt/stack/custom_playbooks/deploy-public-dnsmasq.yaml': - ensure => present, - content => template('infracloud/bifrost/deploy-public-dnsmasq.yaml.erb') - } - - file { '/opt/stack/custom_playbooks/templates/dhcp-host.j2': - ensure => present, - source => 'puppet:///modules/infracloud/dhcp-host.j2', - } - - file { "/etc/dnsmasq.d/bifrost.dhcp-hosts.vlan${vlan}.d": - ensure => directory, - require => Exec['install bifrost'], - } - - exec { 'set up static dhcp hosts': - environment => ['BIFROST_INVENTORY_SOURCE=/opt/stack/baremetal.json', 'HOME=/root'], - command => "ansible-playbook -e @/etc/bifrost/bifrost_global_vars -vvvv \ - -i /opt/stack/bifrost/playbooks/inventory/bifrost_inventory.py \ - /opt/stack/custom_playbooks/deploy-public-dnsmasq.yaml", - path => '/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin', - unless => "test '\$(ls -A /etc/dnsmasq.d/bifrost.dhcp-hosts.vlan${vlan}.d/)'", # onlyif directory is empty - notify => Service['dnsmasq-vlan'], - require => [ - File['/opt/stack/custom_playbooks/deploy-public-dnsmasq.yaml'], - File['/opt/stack/custom_playbooks/templates/dhcp-host.j2'], - File["/etc/dnsmasq.d/bifrost.dhcp-hosts.vlan${vlan}.d"], - ] - } - - service { 'dnsmasq-vlan': - ensure => running, - provider => 'base', - binary => "/usr/sbin/dnsmasq --conf-file=/etc/dnsmasq.conf.vlan${vlan}", - hasstatus => false, - hasrestart => false, - # This uses the process table to TERM the dnsmasq process matching the - # pattern parameter. It does not HUP because that would not reload - # /etc/dnsmasq.conf.vlan${vlan}. - pattern => "dnsmasq --conf-file=/etc/dnsmasq.conf.vlan${vlan}" - } - } }