integ/config/puppet-modules/openstack/puppet-heat-11.3.0/centos/patches/0001-Roll-up-TIS-patches.patch

153 lines
6.2 KiB
Diff

From 41d3cbbc1a3e359cbed1443327601773fe35cce0 Mon Sep 17 00:00:00 2001
From: Al Bailey <Al.Bailey@windriver.com>
Date: Mon, 6 Nov 2017 15:10:27 -0600
Subject: [PATCH] WRS: Patch1: 0001-Roll-up-TIS-patches.patch
---
manifests/db/sync.pp | 6 +++++-
manifests/engine.pp | 7 +++++++
manifests/init.pp | 8 ++++++++
manifests/keystone/domain.pp | 4 +++-
spec/classes/heat_engine_spec.rb | 3 +++
5 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp
index d1a3416..d866595 100644
--- a/manifests/db/sync.pp
+++ b/manifests/db/sync.pp
@@ -19,7 +19,8 @@ class heat::db::sync(
exec { 'heat-dbsync':
command => "heat-manage ${extra_params} db_sync",
path => '/usr/bin',
- user => 'heat',
+ # For whatever reason, the db_sync doesn't work as heat user
+ #user => 'heat',
refreshonly => true,
try_sleep => 5,
tries => 10,
@@ -30,5 +31,8 @@ class heat::db::sync(
Anchor['heat::dbsync::begin']
],
notify => Anchor['heat::dbsync::end'],
+ # Only do the db sync if both controllers are running the same software
+ # version. Avoids impacting mate controller during an upgrade.
+ onlyif => "test $::controller_sw_versions_match = true",
}
}
diff --git a/manifests/engine.pp b/manifests/engine.pp
index 6b31316..021662f 100644
--- a/manifests/engine.pp
+++ b/manifests/engine.pp
@@ -109,6 +109,11 @@
# (Optional) The directory to search for template files.
# Defaults to $::os_service_default
#
+# [*action_retry_limit*]
+# (optional) Number of times to retry to bring a resource to a non-error
+# state. Set to 0 to disable retries.
+# Defaults to '5'
+#
# [*max_nested_stack_depth*]
# (Optional) Maximum depth allowed when using nested stacks.
# Defaults to $::os_service_default
@@ -135,6 +140,7 @@ class heat::engine (
$reauthentication_auth_method = $::os_service_default,
$environment_dir = $::os_service_default,
$template_dir = $::os_service_default,
+ $action_retry_limit = $::os_service_default,
$max_nested_stack_depth = $::os_service_default,
) {
@@ -194,6 +200,7 @@ class heat::engine (
'DEFAULT/reauthentication_auth_method': value => $reauthentication_auth_method;
'DEFAULT/environment_dir': value => $environment_dir;
'DEFAULT/template_dir': value => $template_dir;
+ 'DEFAULT/action_retry_limit': value => $action_retry_limit;
'DEFAULT/max_nested_stack_depth': value => $max_nested_stack_depth;
}
}
diff --git a/manifests/init.pp b/manifests/init.pp
index f268ecd..5d6d445 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -288,6 +288,11 @@
# take for evaluation.
# Defaults to $::os_service_default.
#
+# === WRS PARAMETERS
+# [*heat_clients_insecure*]
+# (optional) sets the insecure option in the config file under
+# [clients_heat]
+#
# === DEPRECATED PARAMETERS
#
# [*rabbit_host*]
@@ -383,6 +388,8 @@ class heat(
$auth_strategy = 'keystone',
$yaql_memory_quota = $::os_service_default,
$yaql_limit_iterators = $::os_service_default,
+ # WRS PARAMETERS
+ $heat_clients_insecure = false,
# DEPRECATED PARAMETERS
$rabbit_host = $::os_service_default,
$rabbit_port = $::os_service_default,
@@ -480,6 +487,7 @@ instead.")
'trustee/user_domain_name': value => $keystone_user_domain_name;
'clients_keystone/auth_uri': value => $auth_url;
'clients_heat/url': value => $heat_clients_url;
+ 'clients_heat/insecure': value => $heat_clients_insecure;
'clients/endpoint_type': value => $heat_clients_endpoint_type;
}
diff --git a/manifests/keystone/domain.pp b/manifests/keystone/domain.pp
index 98c5013..44aa0c5 100644
--- a/manifests/keystone/domain.pp
+++ b/manifests/keystone/domain.pp
@@ -54,12 +54,14 @@ class heat::keystone::domain (
'enabled' => true,
})
}
+ # fix the user name that has the domain name appended
if $manage_user {
- ensure_resource('keystone_user', "${domain_admin}::${domain_name}", {
+ ensure_resource('keystone_user', $domain_admin, {
'ensure' => 'present',
'enabled' => true,
'email' => $domain_admin_email,
'password' => $domain_password,
+ 'domain' => $domain_name,
})
}
if $manage_role {
diff --git a/spec/classes/heat_engine_spec.rb b/spec/classes/heat_engine_spec.rb
index da4ef71..0150edb 100644
--- a/spec/classes/heat_engine_spec.rb
+++ b/spec/classes/heat_engine_spec.rb
@@ -18,6 +18,7 @@ describe 'heat::engine' do
:reauthentication_auth_method => '<SERVICE DEFAULT>',
:environment_dir => '<SERVICE DEFAULT>',
:template_dir => '<SERVICE DEFAULT>',
+ :action_retry_limit => '<SERVICE DEFAULT>',
:max_nested_stack_depth => '<SERVICE DEFAULT>',
}
end
@@ -48,6 +49,7 @@ describe 'heat::engine' do
:reauthentication_auth_method => 'trusts',
:environment_dir => '/etc/heat/environment.d',
:template_dir => '/etc/heat/templates',
+ :action_retry_limit => '5',
}
].each do |new_params|
describe 'when #{param_set == {} ? "using default" : "specifying"} parameters'
@@ -93,6 +95,7 @@ describe 'heat::engine' do
it { is_expected.to contain_heat_config('DEFAULT/reauthentication_auth_method').with_value( expected_params[:reauthentication_auth_method] ) }
it { is_expected.to contain_heat_config('DEFAULT/environment_dir').with_value( expected_params[:environment_dir] ) }
it { is_expected.to contain_heat_config('DEFAULT/template_dir').with_value( expected_params[:template_dir] ) }
+ it { is_expected.to contain_heat_config('DEFAULT/action_retry_limit').with_value('<SERVICE DEFAULT>') }
end
context 'with disabled service managing' do
--
1.8.3.1