Browse Source

Avoid duplicate declaration of reauth method

Upstream patch https://review.openstack.org/#/c/457869
breaks noop tests, we need prepare heat task to this.

Change-Id: I53b36677a1c7427bee5c5f20e3a04e49d9bbffa2
Closes-Bug: #1684042
changes/28/457928/2
Mykyta Karpin 2 years ago
parent
commit
a0fe5a91df

+ 14
- 10
deployment/puppet/openstack_tasks/manifests/heat/heat.pp View File

@@ -106,16 +106,6 @@ class openstack_tasks::heat::heat {
106 106
     Tweaks::Ubuntu_service_override['heat-engine']         -> Service['heat-engine']
107 107
   }
108 108
 
109
-  if $sahara_hash['enabled'] and !$storage_hash['objects_ceph'] {
110
-    heat_config {
111
-      'DEFAULT/reauthentication_auth_method': value  => 'trusts';
112
-    }
113
-  } else {
114
-    heat_config {
115
-      'DEFAULT/reauthentication_auth_method': ensure => absent;
116
-    }
117
-  }
118
-
119 109
   # Turn on Caching for Heat validation process
120 110
   heat_config {
121 111
     'cache/enabled':          value => true;
@@ -239,6 +229,20 @@ class openstack_tasks::heat::heat {
239 229
     instance_connection_is_secure                   => '0',
240 230
   }
241 231
 
232
+  # [mkarpin] TODO: rework this when 
233
+  # https://review.openstack.org/#/c/457869/ is merged
234
+  if $sahara_hash['enabled'] and !$storage_hash['objects_ceph'] {
235
+    if !defined(Heat_config['DEFAULT/reauthentication_auth_method']) {
236
+      heat_config { 'DEFAULT/reauthentication_auth_method':
237
+        value => 'trusts'
238
+      }
239
+    } else {
240
+      Heat_config <| title == 'DEFAULT/reauthentication_auth_method' |> {
241
+        value => 'trusts'
242
+      }
243
+    }
244
+  }
245
+
242 246
   # TODO(dmburmistrov): completely remove pacemaker for heat-engine after release "N"
243 247
   if hiera('heat_ha_engine', true) and hiera('heat_pcs_engine', false) {
244 248
     if $deployment_mode in ['ha', 'ha_compact'] {

+ 0
- 2
tests/noop/spec/hosts/heat/heat_spec.rb View File

@@ -138,8 +138,6 @@ describe manifest do
138 138
     it 'should configure reauthentication_auth_method' do
139 139
       if sahara and !storage_hash['objects_ceph']
140 140
         should contain_heat_config('DEFAULT/reauthentication_auth_method').with_value('trusts')
141
-      else
142
-        should contain_heat_config('DEFAULT/reauthentication_auth_method').with_ensure('absent')
143 141
       end
144 142
     end
145 143
 

Loading…
Cancel
Save