From b8dc3d3ba6283cd7be69fed04e1aa682f3094099 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Mon, 12 Mar 2018 16:33:07 +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: I800fd9a00ddf7e7ca0ebd54c9d203cf04477aa3b Closes-Bug: #1755102 (cherry picked from commit d595457836a82a20b18573b085b166d396bdba1a) --- manifests/db/sync.pp | 1 + releasenotes/notes/openstack_db_tag-8b0893929fcd6617.yaml | 3 +++ spec/classes/gnocchi_db_sync_spec.rb | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 releasenotes/notes/openstack_db_tag-8b0893929fcd6617.yaml diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 2da3ab50..e84312eb 100644 --- a/manifests/db/sync.pp +++ b/manifests/db/sync.pp @@ -31,6 +31,7 @@ class gnocchi::db::sync ( Anchor['gnocchi::dbsync::begin'] ], notify => Anchor['gnocchi::dbsync::end'], + tag => 'openstack-db', } } diff --git a/releasenotes/notes/openstack_db_tag-8b0893929fcd6617.yaml b/releasenotes/notes/openstack_db_tag-8b0893929fcd6617.yaml new file mode 100644 index 00000000..4872e117 --- /dev/null +++ b/releasenotes/notes/openstack_db_tag-8b0893929fcd6617.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add openstack-db tag to Exec that run db-sync. diff --git a/spec/classes/gnocchi_db_sync_spec.rb b/spec/classes/gnocchi_db_sync_spec.rb index d0bd33b8..5677ced5 100644 --- a/spec/classes/gnocchi_db_sync_spec.rb +++ b/spec/classes/gnocchi_db_sync_spec.rb @@ -17,6 +17,7 @@ describe 'gnocchi::db::sync' do 'Anchor[gnocchi::config::end]', 'Anchor[gnocchi::dbsync::begin]'], :notify => 'Anchor[gnocchi::dbsync::end]', + :tag => 'openstack-db', ) end describe "overriding extra_opts" do @@ -37,6 +38,7 @@ describe 'gnocchi::db::sync' do 'Anchor[gnocchi::config::end]', 'Anchor[gnocchi::dbsync::begin]'], :notify => 'Anchor[gnocchi::dbsync::end]', + :tag => 'openstack-db', ) } end