Browse Source

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)
ZhongShengping 1 year ago
parent
commit
665b4f8fa2

+ 1
- 0
manifests/db/sync.pp View File

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

+ 1
- 0
manifests/inspector/db/sync.pp View File

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

+ 3
- 0
releasenotes/notes/openstack_db_tag-92785ba5669c7b28.yaml View File

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

+ 2
- 0
spec/classes/ironic_db_sync_spec.rb View File

@@ -17,6 +17,7 @@ describe 'ironic::db::sync' do
17 17
                          'Anchor[ironic::config::end]',
18 18
                          'Anchor[ironic::dbsync::begin]'],
19 19
         :notify      => 'Anchor[ironic::dbsync::end]',
20
+        :tag         => 'openstack-db',
20 21
       )
21 22
 
22 23
       is_expected.to contain_file('/var/log/ironic/ironic-dbsync.log').with(
@@ -44,6 +45,7 @@ describe 'ironic::db::sync' do
44 45
                              'Anchor[ironic::config::end]',
45 46
                              'Anchor[ironic::dbsync::begin]'],
46 47
             :notify      => 'Anchor[ironic::dbsync::end]',
48
+            :tag         => 'openstack-db',
47 49
         )
48 50
         }
49 51
     end

+ 2
- 1
spec/classes/ironic_inspector_db_sync_spec.rb View File

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

Loading…
Cancel
Save