Merge "Restart httpd after config change"

This commit is contained in:
Zuul 2024-01-12 17:53:04 +00:00 committed by Gerrit Code Review
commit 94fa2b3ec6
5 changed files with 14 additions and 17 deletions

View File

@ -56,6 +56,6 @@ The class allows more flexible customization of the ${dashboard} dashboard.")
ensure_packages($dashboard_package_name, { ensure_packages($dashboard_package_name, {
'ensure' => $ensure, 'ensure' => $ensure,
'tag' => ['horizon-dashboard-package'] 'tag' => ['horizon-package']
}) })
} }

View File

@ -25,15 +25,13 @@ class horizon::deps {
-> Package<| tag == 'horizon-package' |> -> Package<| tag == 'horizon-package' |>
~> anchor { 'horizon::install::end': } ~> anchor { 'horizon::install::end': }
-> anchor { 'horizon::config::begin': } -> anchor { 'horizon::config::begin': }
-> Concat<| tag == 'django-config' |>
~> anchor { 'horizon::config::end': } ~> anchor { 'horizon::config::end': }
-> anchor { 'horizon::compress::begin': } ~> anchor { 'horizon::compress::begin': }
-> Exec<| tag == 'horizon-compress' |> ~> Exec<| tag == 'horizon-compress' |>
~> anchor { 'horizon::compress::end': } ~> anchor { 'horizon::compress::end': }
-> anchor { 'horizon::dashboard::begin': } ~> anchor { 'horizon::service::begin': }
-> Package<| tag == 'horizon-dashboard-package' |> ~> Service<| title == 'httpd' |>
~> anchor { 'horizon::dashboard::end': }
-> anchor { 'horizon::service::begin': }
-> Service<| title == 'httpd' |>
~> anchor { 'horizon::service::end': } ~> anchor { 'horizon::service::end': }
# policy config should occur in the config block # policy config should occur in the config block
@ -41,8 +39,10 @@ class horizon::deps {
-> Openstacklib::Policy<| tag == 'horizon' |> -> Openstacklib::Policy<| tag == 'horizon' |>
-> Anchor['horizon::config::end'] -> Anchor['horizon::config::end']
# Regenerate django cache after package update
Anchor['horizon::install::end'] ~> Anchor['horizon::compress::begin']
# Installation or config changes will always restart services. # Installation or config changes will always restart services.
Anchor['horizon::install::end'] ~> Anchor['horizon::service::begin'] Anchor['horizon::install::end'] ~> Anchor['horizon::service::begin']
Anchor['horizon::config::end'] ~> Anchor['horizon::service::begin'] Anchor['horizon::config::end'] ~> Anchor['horizon::service::begin']
Anchor['horizon::dashboard::end'] ~> Anchor['horizon::service::begin']
} }

View File

@ -722,7 +722,6 @@ Use PyMemcacheCache backend instead")
owner => $::horizon::params::wsgi_user, owner => $::horizon::params::wsgi_user,
group => $::horizon::params::wsgi_group, group => $::horizon::params::wsgi_group,
show_diff => false, show_diff => false,
require => Anchor['horizon::config::begin'],
tag => ['django-config'], tag => ['django-config'],
} }
@ -749,7 +748,6 @@ Use PyMemcacheCache backend instead")
refreshonly => true, refreshonly => true,
tag => ['horizon-compress'], tag => ['horizon-compress'],
} }
Concat<| tag == 'django-config' |> ~> Exec['refresh_horizon_django_compress']
} }
} }

View File

@ -214,8 +214,7 @@ class horizon::wsgi::apache (
fail("Invalid redirect type '${redirect_type} provided.") fail("Invalid redirect type '${redirect_type} provided.")
} }
Package['horizon'] -> Package['httpd'] Anchor['horizon::install::end'] -> Package['httpd']
Concat[$::horizon::params::config_file] ~> Service['httpd']
$unix_user = $::horizon::params::wsgi_user $unix_user = $::horizon::params::wsgi_user
$unix_group = $::horizon::params::wsgi_group $unix_group = $::horizon::params::wsgi_group

View File

@ -26,7 +26,7 @@ describe 'horizon::dashboard' do
context 'with default' do context 'with default' do
it { should contain_package(platform_params[:heat_dashboard_package_name]).with( it { should contain_package(platform_params[:heat_dashboard_package_name]).with(
:ensure => 'installed', :ensure => 'installed',
:tag => ['horizon-dashboard-package'] :tag => ['horizon-package']
)} )}
end end
@ -39,7 +39,7 @@ describe 'horizon::dashboard' do
it { should contain_package(platform_params[:heat_dashboard_package_name]).with( it { should contain_package(platform_params[:heat_dashboard_package_name]).with(
:ensure => 'absent', :ensure => 'absent',
:tag => ['horizon-dashboard-package'] :tag => ['horizon-package']
)} )}
end end
end end
@ -48,7 +48,7 @@ describe 'horizon::dashboard' do
context 'with default' do context 'with default' do
it { should contain_package('python3-heat-dashboard').with( it { should contain_package('python3-heat-dashboard').with(
:ensure => 'installed', :ensure => 'installed',
:tag => ['horizon-dashboard-package'] :tag => ['horizon-package']
)} )}
end end
end end
@ -57,7 +57,7 @@ describe 'horizon::dashboard' do
context 'with default' do context 'with default' do
it { should contain_package('python3-heat-dashboard').with( it { should contain_package('python3-heat-dashboard').with(
:ensure => 'installed', :ensure => 'installed',
:tag => ['horizon-dashboard-package'] :tag => ['horizon-package']
)} )}
end end
end end