From 43daae6d38562b38e70c85ae041e73b0dda93ab7 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: I869ed64d19d82c64d6370a6b42c3016087f5760d Closes-Bug: #1755102 (cherry picked from commit 635bbc2a475c9b9b12a625abaf24a6081ee2e92e) --- manifests/db/sync.pp | 1 + releasenotes/notes/openstack_db_tag-a3f0e6426366c25d.yaml | 3 +++ spec/classes/heat_db_sync_spec.rb | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 releasenotes/notes/openstack_db_tag-a3f0e6426366c25d.yaml diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index d1a34166..ca097234 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -30,5 +30,6 @@ class heat::db::sync( Anchor['heat::dbsync::begin'] ], notify => Anchor['heat::dbsync::end'], + tag => 'openstack-db', } } diff --git a/releasenotes/notes/openstack_db_tag-a3f0e6426366c25d.yaml b/releasenotes/notes/openstack_db_tag-a3f0e6426366c25d.yaml new file mode 100644 index 00000000..4872e117 --- /dev/null +++ b/releasenotes/notes/openstack_db_tag-a3f0e6426366c25d.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add openstack-db tag to Exec that run db-sync. diff --git a/spec/classes/heat_db_sync_spec.rb b/spec/classes/heat_db_sync_spec.rb index 4edc29f1..121bbaeb 100644 --- a/spec/classes/heat_db_sync_spec.rb +++ b/spec/classes/heat_db_sync_spec.rb @@ -17,6 +17,7 @@ describe 'heat::db::sync' do 'Anchor[heat::config::end]', 'Anchor[heat::dbsync::begin]'], :notify => 'Anchor[heat::dbsync::end]', + :tag => 'openstack-db', ) end @@ -40,6 +41,7 @@ describe 'heat::db::sync' do 'Anchor[heat::config::end]', 'Anchor[heat::dbsync::begin]'], :notify => 'Anchor[heat::dbsync::end]', + :tag => 'openstack-db', ) } end