Add 'openstack-db' tag to db-sync Exec resource

In order to make easy orchestration on all OpenStack db-sync, add this
tag so people can use this tag in composition layer.
A use case it to set some orchestration to make sure MySQL Galera is
ready before running any Exec with this tag.

Change-Id: If6394558b373f85e61840f538a3e2e1105cfe98c
Closes-Bug: #1755102
(cherry picked from commit 1f694ff1a4)
This commit is contained in:
ZhongShengping 2018-03-12 16:33:08 +08:00 committed by zhongshengping
parent 0ffe4e1bba
commit 23e7fa0382
5 changed files with 9 additions and 1 deletions

View File

@ -41,5 +41,6 @@ class ironic::db::sync(
],
notify => Anchor['ironic::dbsync::end'],
require => File['/var/log/ironic/ironic-dbsync.log'],
tag => 'openstack-db',
}
}

View File

@ -18,5 +18,6 @@ class ironic::inspector::db::sync {
Anchor['ironic-inspector::dbsync::begin']
],
notify => Anchor['ironic-inspector::dbsync::end'],
tag => 'openstack-db',
}
}

View File

@ -0,0 +1,3 @@
---
features:
- Add openstack-db tag to Exec that run db-sync.

View File

@ -17,6 +17,7 @@ describe 'ironic::db::sync' do
'Anchor[ironic::config::end]',
'Anchor[ironic::dbsync::begin]'],
:notify => 'Anchor[ironic::dbsync::end]',
:tag => 'openstack-db',
)
is_expected.to contain_file('/var/log/ironic/ironic-dbsync.log').with(
@ -44,6 +45,7 @@ describe 'ironic::db::sync' do
'Anchor[ironic::config::end]',
'Anchor[ironic::dbsync::begin]'],
:notify => 'Anchor[ironic::dbsync::end]',
:tag => 'openstack-db',
)
}
end

View File

@ -10,7 +10,8 @@ describe 'ironic::inspector::db::sync' do
:path => '/usr/bin',
:user => 'ironic-inspector',
:refreshonly => 'true',
:logoutput => 'on_failure'
:logoutput => 'on_failure',
:tag => 'openstack-db',
)
end