From 73b6c79b38d80893ed21ab827c96070ed10ea724 Mon Sep 17 00:00:00 2001 From: Pavel Chechetin Date: Fri, 2 Dec 2016 15:34:44 -0800 Subject: [PATCH] Stop configuring contrail-named from a template Currently contrail-named is configurated from a template, which doesn't make any sence 'cause contrail-dns overrides contrail-named's configuration files. Change-Id: If91b98fa2c835cf764f4a66b777b4ec8e7664c30 --- .../modules/contrail/files/contrail-rndc.conf | 10 ----- .../modules/contrail/manifests/control.pp | 43 ++++++++----------- .../templates/contrail-named.conf.erb | 40 ----------------- 3 files changed, 17 insertions(+), 76 deletions(-) delete mode 100644 deployment_scripts/puppet/modules/contrail/files/contrail-rndc.conf delete mode 100644 deployment_scripts/puppet/modules/contrail/templates/contrail-named.conf.erb diff --git a/deployment_scripts/puppet/modules/contrail/files/contrail-rndc.conf b/deployment_scripts/puppet/modules/contrail/files/contrail-rndc.conf deleted file mode 100644 index 6508d8dfb..000000000 --- a/deployment_scripts/puppet/modules/contrail/files/contrail-rndc.conf +++ /dev/null @@ -1,10 +0,0 @@ -key "rndc-key" { - algorithm hmac-md5; - secret "xvysmOR8lnUQRBcunkC6vg=="; -}; - -options { - default-key "rndc-key"; - default-server 127.0.0.1; - default-port 8094; -}; diff --git a/deployment_scripts/puppet/modules/contrail/manifests/control.pp b/deployment_scripts/puppet/modules/contrail/manifests/control.pp index 4ac00cc11..daeffa5c4 100755 --- a/deployment_scripts/puppet/modules/contrail/manifests/control.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/control.pp @@ -74,40 +74,31 @@ class contrail::control { notify => Service['supervisor-control'], } - file { '/etc/contrail/dns/contrail-named.conf': - content => template('contrail/contrail-named.conf.erb'), - require => Package['contrail-dns'], - } - - file { '/etc/contrail/dns/contrail-rndc.conf': - source => 'puppet:///modules/contrail/contrail-rndc.conf', - require => Package['contrail-dns'], - } - contrail_control_nodemgr_config { 'DISCOVERY/server': value => $contrail::contrail_private_vip; 'DISCOVERY/port': value => '5998'; } -# Control service - service { 'contrail-named': + service { 'contrail-dns': ensure => running, require => Package['contrail-dns'], - subscribe => [ - File['/etc/contrail/dns/contrail-named.conf'], - File['/etc/contrail/dns/contrail-rndc.conf'], - ] - } - service { 'supervisor-control': - ensure => $contrail::service_ensure, - enable => true, - require => [ - Package['contrail-openstack-control'], - Package['contrail-control'] - ], } - Contrail_control_config <||> ~> Service['supervisor-control'] - Contrail_dns_config <||> ~> Service['supervisor-control'] + service { 'contrail-named': + ensure => running, + require => Service['contrail-dns'] + } + service { 'supervisor-control': + ensure => $contrail::service_ensure, + enable => true, + require => [ + Package['contrail-openstack-control'], + Package['contrail-control'] + ], + } + + Contrail_control_config <||> ~> Service['supervisor-control'] + Contrail_dns_config <||> ~> Service['supervisor-control'] + Contrail_dns_config <||> ~> Service['contrail-dns'] } diff --git a/deployment_scripts/puppet/modules/contrail/templates/contrail-named.conf.erb b/deployment_scripts/puppet/modules/contrail/templates/contrail-named.conf.erb deleted file mode 100644 index b89c422d1..000000000 --- a/deployment_scripts/puppet/modules/contrail/templates/contrail-named.conf.erb +++ /dev/null @@ -1,40 +0,0 @@ -<%- external_dns=scope.function_hiera(['external_dns']) %> -options { - directory "/etc/contrail/dns/"; - managed-keys-directory "/etc/contrail/dns/"; - allow-new-zones yes; - pid-file "/etc/contrail/dns/contrail-named.pid"; -}; - -key "rndc-key" { - algorithm hmac-md5; - secret "xvysmOR8lnUQRBcunkC6vg=="; -}; - -controls { - inet 127.0.0.1 port 8094 - allow { 127.0.0.1; } keys { "rndc-key"; }; -}; - -logging { - channel debug_log { - file "/var/log/contrail/contrail-named.log" versions 3 size 5m; - severity debug; - print-time yes; - print-severity yes; - print-category yes; - }; - category default { - debug_log; - }; - category queries { - debug_log; - }; -}; - -view "_default_view_" { - match-clients {any;}; - match-destinations {any;}; - match-recursive-only no; - forwarders { <%= external_dns['dns_list'].map{ |ip| "#{ip};" }.join(' ') %> }; -};