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: I2df5ae03c13b7bde00621a8b208e7204b4747713
Closes-Bug: #1755102
(cherry picked from commit 45b3c8cfa1)
This commit is contained in:
ZhongShengping 2018-03-12 16:33:09 +08:00 committed by zhongshengping
parent 7c847cd3dd
commit aa0ee2903b
5 changed files with 11 additions and 0 deletions

View File

@ -36,5 +36,6 @@ class nova::db::sync(
Anchor['nova::dbsync::begin']
],
notify => Anchor['nova::dbsync::end'],
tag => 'openstack-db',
}
}

View File

@ -45,6 +45,7 @@ class nova::db::sync_api(
Anchor['nova::dbsync_api::begin']
],
notify => Anchor['nova::dbsync_api::end'],
tag => 'openstack-db',
}
if $cellv2_setup {

View File

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

View File

@ -16,6 +16,7 @@ describe 'nova::db::sync_api' do
'Anchor[nova::db::end]',
'Anchor[nova::dbsync_api::begin]'],
:notify => 'Anchor[nova::dbsync_api::end]',
:tag => 'openstack-db',
)
}
it { is_expected.to_not contain_class('nova::cell_v2::simple_setup') }
@ -41,6 +42,7 @@ describe 'nova::db::sync_api' do
'Anchor[nova::db::end]',
'Anchor[nova::dbsync_api::begin]'],
:notify => 'Anchor[nova::dbsync_api::end]',
:tag => 'openstack-db',
)
}
it { is_expected.to_not contain_class('nova::cell_v2::simple_setup') }
@ -65,6 +67,7 @@ describe 'nova::db::sync_api' do
'Anchor[nova::db::end]',
'Anchor[nova::dbsync_api::begin]'],
:notify => 'Anchor[nova::dbsync_api::end]',
:tag => 'openstack-db',
)
}
end

View File

@ -18,6 +18,7 @@ describe 'nova::db::sync' do
'Anchor[nova::db::end]',
'Anchor[nova::dbsync::begin]'],
:notify => 'Anchor[nova::dbsync::end]',
:tag => 'openstack-db',
)
end
@ -42,6 +43,7 @@ describe 'nova::db::sync' do
'Anchor[nova::db::end]',
'Anchor[nova::dbsync::begin]'],
:notify => 'Anchor[nova::dbsync::end]',
:tag => 'openstack-db',
)
}
end
@ -67,6 +69,7 @@ describe 'nova::db::sync' do
'Anchor[nova::db::end]',
'Anchor[nova::dbsync::begin]'],
:notify => 'Anchor[nova::dbsync::end]',
:tag => 'openstack-db',
)
}
end