From d8181add51a4dd4a78c75b239fef072c949321e2 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Mon, 12 Mar 2018 16:33:08 +0800 Subject: [PATCH] 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: Icd2700fe8c27a647dab8d91a4f9c20eda930b4e1 Closes-Bug: #1755102 (cherry picked from commit b563459e379ec17954feac1d613ab67e826fdba5) --- manifests/db/sync.pp | 2 +- releasenotes/notes/openstack_db_tag-89916b8b22f8e4a5.yaml | 3 +++ spec/classes/keystone_db_sync_spec.rb | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/openstack_db_tag-89916b8b22f8e4a5.yaml diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index cee869b77..124bee4fb 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -35,6 +35,6 @@ class keystone::db::sync( Anchor['keystone::dbsync::begin'] ], notify => Anchor['keystone::dbsync::end'], - tag => 'keystone-exec', + tag => ['keystone-exec', 'openstack-db'] } } diff --git a/releasenotes/notes/openstack_db_tag-89916b8b22f8e4a5.yaml b/releasenotes/notes/openstack_db_tag-89916b8b22f8e4a5.yaml new file mode 100644 index 000000000..4872e117d --- /dev/null +++ b/releasenotes/notes/openstack_db_tag-89916b8b22f8e4a5.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add openstack-db tag to Exec that run db-sync. diff --git a/spec/classes/keystone_db_sync_spec.rb b/spec/classes/keystone_db_sync_spec.rb index 619031d4b..14f22565e 100644 --- a/spec/classes/keystone_db_sync_spec.rb +++ b/spec/classes/keystone_db_sync_spec.rb @@ -18,6 +18,7 @@ describe 'keystone::db::sync' do 'Anchor[keystone::config::end]', 'Anchor[keystone::dbsync::begin]'], :notify => 'Anchor[keystone::dbsync::end]', + :tag => ['keystone-exec', 'openstack-db'], ) } end @@ -43,6 +44,7 @@ describe 'keystone::db::sync' do 'Anchor[keystone::config::end]', 'Anchor[keystone::dbsync::begin]'], :notify => 'Anchor[keystone::dbsync::end]', + :tag => ['keystone-exec', 'openstack-db'], ) } end