From 31a2a62c53b1854896b4ad426a40e23121b4ad11 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 20 Feb 2022 19:48:46 +0900 Subject: [PATCH] Revert "ironic upgrade: change ownership for ironic-dbsync.log" This reverts the commit 179690bb93d6924517d7b22706e2b004ca4fab75 and removes the logic to ensure the log file is owned by the ironic user, as we have been using the ironic user for several cycles and expect the file is already owned by the proper user. Change-Id: Ic33db931df0473d352a6840f4c83dba0ff248e07 --- manifests/db/sync.pp | 12 ------------ spec/classes/ironic_db_sync_spec.rb | 6 ------ 2 files changed, 18 deletions(-) diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 3b952793..07db34da 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -20,17 +20,6 @@ class ironic::db::sync( include ironic::deps include ironic::params - # NOTE(dtantsur): previous ironic-dbsync was run as root. it will fail to run - # as "ironic" user, if there is an old log file owned by root. Let's fix it. - # To be removed in Rocky. - file { '/var/log/ironic/ironic-dbsync.log': - ensure => 'present', - owner => $::ironic::params::user, - group => $::ironic::params::group, - # /var/log/ironic comes from ironic-common - require => Anchor['ironic::install::end'] - } - exec { 'ironic-dbsync': command => "${::ironic::params::dbsync_command} ${extra_params}", path => '/usr/bin', @@ -46,7 +35,6 @@ class ironic::db::sync( Anchor['ironic::dbsync::begin'] ], notify => Anchor['ironic::dbsync::end'], - require => File['/var/log/ironic/ironic-dbsync.log'], tag => 'openstack-db', } } diff --git a/spec/classes/ironic_db_sync_spec.rb b/spec/classes/ironic_db_sync_spec.rb index 8551ab81..65a793a0 100644 --- a/spec/classes/ironic_db_sync_spec.rb +++ b/spec/classes/ironic_db_sync_spec.rb @@ -22,12 +22,6 @@ describe 'ironic::db::sync' do :notify => 'Anchor[ironic::dbsync::end]', :tag => 'openstack-db', ) - - is_expected.to contain_file('/var/log/ironic/ironic-dbsync.log').with( - :ensure => 'present', - :owner => 'ironic', - :group => 'ironic', - ) end describe "overriding params" do