From a0fe5a91dfe813a5c89d559db5aaf4a37af21ec6 Mon Sep 17 00:00:00 2001 From: Mykyta Karpin Date: Wed, 19 Apr 2017 11:50:26 +0300 Subject: [PATCH] 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 --- .../openstack_tasks/manifests/heat/heat.pp | 24 +++++++++++-------- tests/noop/spec/hosts/heat/heat_spec.rb | 2 -- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/deployment/puppet/openstack_tasks/manifests/heat/heat.pp b/deployment/puppet/openstack_tasks/manifests/heat/heat.pp index 77bee11256..37b11b616b 100644 --- a/deployment/puppet/openstack_tasks/manifests/heat/heat.pp +++ b/deployment/puppet/openstack_tasks/manifests/heat/heat.pp @@ -106,16 +106,6 @@ class openstack_tasks::heat::heat { Tweaks::Ubuntu_service_override['heat-engine'] -> Service['heat-engine'] } - if $sahara_hash['enabled'] and !$storage_hash['objects_ceph'] { - heat_config { - 'DEFAULT/reauthentication_auth_method': value => 'trusts'; - } - } else { - heat_config { - 'DEFAULT/reauthentication_auth_method': ensure => absent; - } - } - # Turn on Caching for Heat validation process heat_config { 'cache/enabled': value => true; @@ -239,6 +229,20 @@ class openstack_tasks::heat::heat { instance_connection_is_secure => '0', } + # [mkarpin] TODO: rework this when + # https://review.openstack.org/#/c/457869/ is merged + if $sahara_hash['enabled'] and !$storage_hash['objects_ceph'] { + if !defined(Heat_config['DEFAULT/reauthentication_auth_method']) { + heat_config { 'DEFAULT/reauthentication_auth_method': + value => 'trusts' + } + } else { + Heat_config <| title == 'DEFAULT/reauthentication_auth_method' |> { + value => 'trusts' + } + } + } + # TODO(dmburmistrov): completely remove pacemaker for heat-engine after release "N" if hiera('heat_ha_engine', true) and hiera('heat_pcs_engine', false) { if $deployment_mode in ['ha', 'ha_compact'] { diff --git a/tests/noop/spec/hosts/heat/heat_spec.rb b/tests/noop/spec/hosts/heat/heat_spec.rb index 4ea30913d1..306a5a26b0 100644 --- a/tests/noop/spec/hosts/heat/heat_spec.rb +++ b/tests/noop/spec/hosts/heat/heat_spec.rb @@ -138,8 +138,6 @@ describe manifest do it 'should configure reauthentication_auth_method' do if sahara and !storage_hash['objects_ceph'] should contain_heat_config('DEFAULT/reauthentication_auth_method').with_value('trusts') - else - should contain_heat_config('DEFAULT/reauthentication_auth_method').with_ensure('absent') end end