diff --git a/manifests/dashboard.pp b/manifests/dashboard.pp index 2ae4658c..4f858fad 100644 --- a/manifests/dashboard.pp +++ b/manifests/dashboard.pp @@ -56,6 +56,6 @@ The class allows more flexible customization of the ${dashboard} dashboard.") ensure_packages($dashboard_package_name, { 'ensure' => $ensure, - 'tag' => ['horizon-dashboard-package'] + 'tag' => ['horizon-package'] }) } diff --git a/manifests/deps.pp b/manifests/deps.pp index 720a521b..0414ad78 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -25,15 +25,13 @@ class horizon::deps { -> Package<| tag == 'horizon-package' |> ~> anchor { 'horizon::install::end': } -> anchor { 'horizon::config::begin': } + -> Concat<| tag == 'django-config' |> ~> anchor { 'horizon::config::end': } - -> anchor { 'horizon::compress::begin': } - -> Exec<| tag == 'horizon-compress' |> + ~> anchor { 'horizon::compress::begin': } + ~> Exec<| tag == 'horizon-compress' |> ~> anchor { 'horizon::compress::end': } - -> anchor { 'horizon::dashboard::begin': } - -> Package<| tag == 'horizon-dashboard-package' |> - ~> anchor { 'horizon::dashboard::end': } - -> anchor { 'horizon::service::begin': } - -> Service<| title == 'httpd' |> + ~> anchor { 'horizon::service::begin': } + ~> Service<| title == 'httpd' |> ~> anchor { 'horizon::service::end': } # policy config should occur in the config block @@ -41,8 +39,10 @@ class horizon::deps { -> Openstacklib::Policy<| tag == 'horizon' |> -> 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. Anchor['horizon::install::end'] ~> Anchor['horizon::service::begin'] Anchor['horizon::config::end'] ~> Anchor['horizon::service::begin'] - Anchor['horizon::dashboard::end'] ~> Anchor['horizon::service::begin'] } diff --git a/manifests/init.pp b/manifests/init.pp index 5f0a250a..63925df8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -717,7 +717,6 @@ Use PyMemcacheCache backend instead") owner => $::horizon::params::wsgi_user, group => $::horizon::params::wsgi_group, show_diff => false, - require => Anchor['horizon::config::begin'], tag => ['django-config'], } @@ -744,7 +743,6 @@ Use PyMemcacheCache backend instead") refreshonly => true, tag => ['horizon-compress'], } - Concat<| tag == 'django-config' |> ~> Exec['refresh_horizon_django_compress'] } } diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index d91fcfdf..37fa3e30 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -214,8 +214,7 @@ class horizon::wsgi::apache ( fail("Invalid redirect type '${redirect_type} provided.") } - Package['horizon'] -> Package['httpd'] - Concat[$::horizon::params::config_file] ~> Service['httpd'] + Anchor['horizon::install::end'] -> Package['httpd'] $unix_user = $::horizon::params::wsgi_user $unix_group = $::horizon::params::wsgi_group diff --git a/spec/defines/horizon_dashboard_spec.rb b/spec/defines/horizon_dashboard_spec.rb index 33841fca..c814b4f2 100644 --- a/spec/defines/horizon_dashboard_spec.rb +++ b/spec/defines/horizon_dashboard_spec.rb @@ -26,7 +26,7 @@ describe 'horizon::dashboard' do context 'with default' do it { should contain_package(platform_params[:heat_dashboard_package_name]).with( :ensure => 'installed', - :tag => ['horizon-dashboard-package'] + :tag => ['horizon-package'] )} end @@ -39,7 +39,7 @@ describe 'horizon::dashboard' do it { should contain_package(platform_params[:heat_dashboard_package_name]).with( :ensure => 'absent', - :tag => ['horizon-dashboard-package'] + :tag => ['horizon-package'] )} end end @@ -48,7 +48,7 @@ describe 'horizon::dashboard' do context 'with default' do it { should contain_package('python3-heat-dashboard').with( :ensure => 'installed', - :tag => ['horizon-dashboard-package'] + :tag => ['horizon-package'] )} end end @@ -57,7 +57,7 @@ describe 'horizon::dashboard' do context 'with default' do it { should contain_package('python3-heat-dashboard').with( :ensure => 'installed', - :tag => ['horizon-dashboard-package'] + :tag => ['horizon-package'] )} end end