From 5eb697308025eb79496ac85d09f39317560395c1 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Mon, 13 Sep 2021 10:56:47 +0200 Subject: [PATCH] Remove magnum-db-sync-service tag for service This causes a race condition that sometimes the normal API service is started before the httpd service because deps is not enforced properly. This tags doesn't do anything and doesn't exist in deps either. Change-Id: Ib407dc811bbe6813c96f40343426fc1fb5b503fc --- manifests/api.pp | 6 +++--- manifests/conductor.pp | 2 +- spec/classes/magnum_api_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index 7614180..aeffc99 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -136,7 +136,7 @@ class magnum::api( name => $::magnum::params::api_service, enable => $enabled, hasstatus => true, - tag => ['magnum-service', 'magnum-db-sync-service'], + tag => 'magnum-service', } } elsif $service_name == 'httpd' { include apache::params @@ -145,10 +145,10 @@ class magnum::api( name => $::magnum::params::api_service, enable => false, hasstatus => true, - tag => ['magnum-service', 'magnum-db-sync-service'], + tag => 'magnum-service', } Service['magnum-api'] -> Service[$service_name] - Service<| title == 'httpd' |> { tag +> ['magnum-service', 'magnum-db-sync-service'] } + Service<| title == 'httpd' |> { tag +> 'magnum-service' } } } diff --git a/manifests/conductor.pp b/manifests/conductor.pp index e128765..489ba0e 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -62,7 +62,7 @@ class magnum::conductor( name => $::magnum::params::conductor_package, enable => $enabled, hasstatus => true, - tag => ['magnum-service', 'magnum-db-sync-service'], + tag => 'magnum-service', } } diff --git a/spec/classes/magnum_api_spec.rb b/spec/classes/magnum_api_spec.rb index 24e7fba..f76abe1 100755 --- a/spec/classes/magnum_api_spec.rb +++ b/spec/classes/magnum_api_spec.rb @@ -47,7 +47,7 @@ describe 'magnum::api' do it 'ensures magnum api service is running' do is_expected.to contain_service('magnum-api').with( 'hasstatus' => true, - 'tag' => ['magnum-service', 'magnum-db-sync-service'] + 'tag' => 'magnum-service', ) end @@ -131,7 +131,7 @@ describe 'magnum::api' do :name => platform_params[:api_service], :enable => false, :hasstatus => true, - :tag => ['magnum-service', 'magnum-db-sync-service'], + :tag => 'magnum-service', )} end end