summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Gagné <mgagne@calavera.ca>2018-10-22 13:41:36 -0400
committerMathieu Gagné <mgagne@calavera.ca>2018-10-22 13:41:36 -0400
commit412ca9519c3f34b4b43a112ee1dd088ed45c3146 (patch)
tree0c211470c6b715da48c258ef28b22193cd5386d5
parent61bef03c9004ccbba18bd378ddbd3a40661e7b56 (diff)
Only designate-central and mdns require database access
According to Designate architecture documentation, only the designate-central and mdns services require database access. This change removes the designate::db class for generic service and include the designate::db class for services that need it instead. Change-Id: I696745e2d57aade6cbb0fe89e334fddf1beaafdb
Notes
Notes (review): Code-Review+2: Alex Schultz <aschultz@redhat.com> Code-Review+2: Emilien Macchi <emilien@redhat.com> Workflow+1: Emilien Macchi <emilien@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 06 Nov 2018 17:14:11 +0000 Reviewed-on: https://review.openstack.org/612455 Project: openstack/puppet-designate Branch: refs/heads/master
-rw-r--r--manifests/central.pp1
-rw-r--r--manifests/generic_service.pp1
-rw-r--r--manifests/mdns.pp1
-rw-r--r--spec/classes/designate_central_spec.rb4
-rw-r--r--spec/classes/designate_mdns_spec.rb4
5 files changed, 10 insertions, 1 deletions
diff --git a/manifests/central.pp b/manifests/central.pp
index 668e0f9..2a3d043 100644
--- a/manifests/central.pp
+++ b/manifests/central.pp
@@ -69,6 +69,7 @@ class designate::central (
69) inherits designate { 69) inherits designate {
70 70
71 include ::designate::deps 71 include ::designate::deps
72 include ::designate::db
72 73
73 designate_config { 74 designate_config {
74 'service:central/managed_resource_email' : value => $managed_resource_email; 75 'service:central/managed_resource_email' : value => $managed_resource_email;
diff --git a/manifests/generic_service.pp b/manifests/generic_service.pp
index 780133d..dea85c8 100644
--- a/manifests/generic_service.pp
+++ b/manifests/generic_service.pp
@@ -41,7 +41,6 @@ define designate::generic_service(
41 41
42 include ::designate::deps 42 include ::designate::deps
43 include ::designate::params 43 include ::designate::params
44 include ::designate::db
45 44
46 $designate_title = "designate-${name}" 45 $designate_title = "designate-${name}"
47 Exec['post-designate_config'] ~> Anchor['designate::service::end'] 46 Exec['post-designate_config'] ~> Anchor['designate::service::end']
diff --git a/manifests/mdns.pp b/manifests/mdns.pp
index 4e3c08c..c77d059 100644
--- a/manifests/mdns.pp
+++ b/manifests/mdns.pp
@@ -68,6 +68,7 @@ class designate::mdns (
68) inherits designate { 68) inherits designate {
69 69
70 include ::designate::deps 70 include ::designate::deps
71 include ::designate::db
71 72
72 designate_config { 73 designate_config {
73 'service:mdns/workers' : value => $workers; 74 'service:mdns/workers' : value => $workers;
diff --git a/spec/classes/designate_central_spec.rb b/spec/classes/designate_central_spec.rb
index c07c24a..8e546c6 100644
--- a/spec/classes/designate_central_spec.rb
+++ b/spec/classes/designate_central_spec.rb
@@ -26,6 +26,10 @@ describe 'designate::central' do
26 ) 26 )
27 end 27 end
28 28
29 it 'includes designate::db' do
30 is_expected.to contain_class('designate::db')
31 end
32
29 it 'configures designate-central with default parameters' do 33 it 'configures designate-central with default parameters' do
30 is_expected.to contain_designate_config('service:central/managed_resource_email').with_value('hostmaster@example.com') 34 is_expected.to contain_designate_config('service:central/managed_resource_email').with_value('hostmaster@example.com')
31 is_expected.to contain_designate_config('service:central/managed_resource_tenant_id').with_value('123456') 35 is_expected.to contain_designate_config('service:central/managed_resource_tenant_id').with_value('123456')
diff --git a/spec/classes/designate_mdns_spec.rb b/spec/classes/designate_mdns_spec.rb
index 4b1e836..487533c 100644
--- a/spec/classes/designate_mdns_spec.rb
+++ b/spec/classes/designate_mdns_spec.rb
@@ -27,6 +27,10 @@ describe 'designate::mdns' do
27 ) 27 )
28 end 28 end
29 29
30 it 'includes designate::db' do
31 is_expected.to contain_class('designate::db')
32 end
33
30 it 'configures designate-mdns with default parameters' do 34 it 'configures designate-mdns with default parameters' do
31 is_expected.to contain_designate_config('service:mdns/workers').with_value(8) 35 is_expected.to contain_designate_config('service:mdns/workers').with_value(8)
32 is_expected.to contain_designate_config('service:mdns/threads').with_value('<SERVICE DEFAULT>') 36 is_expected.to contain_designate_config('service:mdns/threads').with_value('<SERVICE DEFAULT>')