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: I2df5ae03c13b7bde00621a8b208e7204b4747713
Closes-Bug: #1755102
tags/13.0.0
ZhongShengping 1 year ago
parent
commit
45b3c8cfa1

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

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

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

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

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

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

+ 3
- 0
spec/classes/nova_db_sync_api_spec.rb View File

@@ -16,6 +16,7 @@ describe 'nova::db::sync_api' do
16 16
                            'Anchor[nova::db::end]',
17 17
                            'Anchor[nova::dbsync_api::begin]'],
18 18
           :notify      => 'Anchor[nova::dbsync_api::end]',
19
+          :tag         => 'openstack-db',
19 20
         )
20 21
       }
21 22
       it { is_expected.to_not contain_class('nova::cell_v2::simple_setup') }
@@ -41,6 +42,7 @@ describe 'nova::db::sync_api' do
41 42
                            'Anchor[nova::db::end]',
42 43
                            'Anchor[nova::dbsync_api::begin]'],
43 44
           :notify      => 'Anchor[nova::dbsync_api::end]',
45
+          :tag         => 'openstack-db',
44 46
         )
45 47
       }
46 48
       it { is_expected.to_not contain_class('nova::cell_v2::simple_setup') }
@@ -65,6 +67,7 @@ describe 'nova::db::sync_api' do
65 67
                            'Anchor[nova::db::end]',
66 68
                            'Anchor[nova::dbsync_api::begin]'],
67 69
           :notify      => 'Anchor[nova::dbsync_api::end]',
70
+          :tag         => 'openstack-db',
68 71
         )
69 72
       }
70 73
     end

+ 3
- 0
spec/classes/nova_db_sync_spec.rb View File

@@ -18,6 +18,7 @@ describe 'nova::db::sync' do
18 18
                          'Anchor[nova::db::end]',
19 19
                          'Anchor[nova::dbsync::begin]'],
20 20
         :notify      => 'Anchor[nova::dbsync::end]',
21
+        :tag         => 'openstack-db',
21 22
       )
22 23
     end
23 24
 
@@ -42,6 +43,7 @@ describe 'nova::db::sync' do
42 43
                            'Anchor[nova::db::end]',
43 44
                            'Anchor[nova::dbsync::begin]'],
44 45
           :notify      => 'Anchor[nova::dbsync::end]',
46
+          :tag         => 'openstack-db',
45 47
         )
46 48
         }
47 49
       end
@@ -67,6 +69,7 @@ describe 'nova::db::sync' do
67 69
                            'Anchor[nova::db::end]',
68 70
                            'Anchor[nova::dbsync::begin]'],
69 71
           :notify      => 'Anchor[nova::dbsync::end]',
72
+          :tag         => 'openstack-db',
70 73
         )
71 74
         }
72 75
       end

Loading…
Cancel
Save