From fbdd661f89d0c68f317834a44bcdf21b41336b97 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 8 Dec 2021 23:16:00 +0900 Subject: [PATCH] Clean up direct dependencies on puppetlabs-apache This change removes direct reference to some classes in puppetlabs-apache. Details are explained below. - The api class doesn't need access to anything defined in apache::params - The following classes are included by the openstacklib::wsgi::apache resource type, and current inclusions are just redundant. Dependencies defined in neutron::wsgi::apache are removed and loosen to avoid direct deference to resources from puppetlabs-apache. When httpd is used to run neutron-api, the neutron-service tag is added to the httpd service, so that it is started during service phase. Change-Id: I1a17a5ac990dd8e0a166b7d78b8a58a4b1055502 --- manifests/server.pp | 1 - manifests/wsgi/apache.pp | 25 ------------------------ metadata.json | 4 ---- spec/classes/neutron_wsgi_apache_spec.rb | 6 ------ 4 files changed, 36 deletions(-) diff --git a/manifests/server.pp b/manifests/server.pp index 5c3e2c466..028fe692e 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -432,7 +432,6 @@ class neutron::server ( if $api_service_name { if $api_service_name == 'httpd' { - include apache::params Service <| title == 'httpd' |> { tag +> 'neutron-service' } if $::neutron::params::server_service { diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 8596fd254..1a809894d 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -128,31 +128,6 @@ class neutron::wsgi::apache ( include neutron::deps include neutron::params - include apache - include apache::mod::wsgi - if $ssl_real { - include apache::mod::ssl - } - - # The httpd package is untagged, but needs to have ordering enforced, - # so handle it here rather than in the deps class. - Anchor['neutron::install::begin'] - -> Package['httpd'] - -> Anchor['neutron::install::end'] - - # Configure apache during the config phase - Anchor['neutron::config::begin'] - -> Apache::Vhost<||> - ~> Anchor['neutron::config::end'] - - # Start the service during the service phase - Anchor['neutron::service::begin'] - -> Service['httpd'] - -> Anchor['neutron::service::end'] - - # Notify the service when config changes - Anchor['neutron::config::end'] - ~> Service['httpd'] ::openstacklib::wsgi::apache { 'neutron_wsgi': bind_host => $bind_host, diff --git a/metadata.json b/metadata.json index 326411b02..3e86d12f6 100644 --- a/metadata.json +++ b/metadata.json @@ -1,10 +1,6 @@ { "author": "OpenStack Contributors", "dependencies": [ - { - "name": "puppetlabs/apache", - "version_requirement": ">=5.0.0" - }, { "name": "puppetlabs/inifile", "version_requirement": ">=2.0.0 <6.0.0" diff --git a/spec/classes/neutron_wsgi_apache_spec.rb b/spec/classes/neutron_wsgi_apache_spec.rb index f3fd2fb0b..2819f8893 100644 --- a/spec/classes/neutron_wsgi_apache_spec.rb +++ b/spec/classes/neutron_wsgi_apache_spec.rb @@ -4,9 +4,6 @@ describe 'neutron::wsgi::apache' do shared_examples 'apache serving neutron with mod_wsgi' do context 'with default parameters' do it { should contain_class('neutron::params') } - it { should contain_class('apache') } - it { should contain_class('apache::mod::wsgi') } - it { should contain_class('apache::mod::ssl') } it { should contain_openstacklib__wsgi__apache('neutron_wsgi').with( :bind_port => 9696, :group => 'neutron', @@ -45,9 +42,6 @@ describe 'neutron::wsgi::apache' do } end it { should contain_class('neutron::params') } - it { should contain_class('apache') } - it { should contain_class('apache::mod::wsgi') } - it { should_not contain_class('apache::mod::ssl') } it { should contain_openstacklib__wsgi__apache('neutron_wsgi').with( :bind_host => '10.42.51.1', :bind_port => 12345,