Fix up fence_compute with latest keystone v3 changes

Via 549fee1c18
the fence_compute RA gained the possibility to use keystone V3
authentication and versionless endpoint support.
Regenerate the manifest automatically given the new parameters

Tested this and am able to correctly configure fence_compute for
keystone v3:

[root@overcloud-controller-0 ~]# pcs stonith show stonith-fence_compute-fence-nova
 Resource: stonith-fence_compute-fence-nova (class=stonith type=fence_compute)
  Attributes: auth_url=http://10.0.0.4:5000/ domain=localdomain login=admin passwd=7mcDcuGDaBWcwNAbpwhjAZ4MB project_domain=Default record_only=1 tenant_name=admin user_domain=Default
  Meta Attrs: provides=unfencing
  Operations: monitor interval=60s (stonith-fence_compute-fence-nova-monitor-interval-60s)

Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>

Change-Id: I40087dc602b92e06825c80d0c13c6036fdb77a52
This commit is contained in:
Michele Baldessari 2017-11-29 15:29:48 +01:00
parent 9201cbd32a
commit 3f79e3fd20
2 changed files with 30 additions and 4 deletions

View File

@ -4,9 +4,9 @@
<vendor-url></vendor-url>
<parameters>
<parameter name="tenant_name" unique="0" required="0">
<getopt mixed="-t, --tenant-name=[tenant]" />
<getopt mixed="-t, --tenant-name=[name]" />
<content type="string" />
<shortdesc lang="en">Keystone Admin Tenant</shortdesc>
<shortdesc lang="en">Keystone Admin Tenant or v3 Project</shortdesc>
</parameter>
<parameter name="auth_url" unique="0" required="0">
<getopt mixed="-k, --auth-url=[url]" />
@ -78,6 +78,16 @@
<content type="string" />
<shortdesc lang="en">DNS domain in which hosts live</shortdesc>
</parameter>
<parameter name="project_domain" unique="0" required="0">
<getopt mixed="-d, --project-domain=[name]" />
<content type="string" default="Default" />
<shortdesc lang="en">Keystone v3 Project Domain</shortdesc>
</parameter>
<parameter name="user_domain" unique="0" required="0">
<getopt mixed="-u, --user-domain=[name]" />
<content type="string" default="Default" />
<shortdesc lang="en">Keystone v3 User Domain</shortdesc>
</parameter>
<parameter name="instance_filtering" unique="0" required="0">
<getopt mixed="--instance-filtering" />
<content type="boolean" default="True" />

View File

@ -8,7 +8,7 @@
# === Parameters
#
# [*tenant_name*]
# Keystone Admin Tenant
# Keystone Admin Tenant or v3 Project
#
# [*auth_url*]
# Keystone Admin Auth URL
@ -52,6 +52,12 @@
# [*domain*]
# DNS domain in which hosts live
#
# [*project_domain*]
# Keystone v3 Project Domain
#
# [*user_domain*]
# Keystone v3 User Domain
#
# [*instance_filtering*]
# Allow instances to be evacuated
#
@ -149,6 +155,8 @@ define pacemaker::stonith::fence_compute (
$password_script = undef,
$insecure = undef,
$domain = undef,
$project_domain = undef,
$user_domain = undef,
$instance_filtering = undef,
$no_shared_storage = undef,
$record_only = undef,
@ -232,6 +240,14 @@ define pacemaker::stonith::fence_compute (
undef => '',
default => "domain=\"${domain}\"",
}
$project_domain_chunk = $project_domain ? {
undef => '',
default => "project_domain=\"${project_domain}\"",
}
$user_domain_chunk = $user_domain ? {
undef => '',
default => "user_domain=\"${user_domain}\"",
}
$instance_filtering_chunk = $instance_filtering ? {
undef => '',
default => "instance_filtering=\"${instance_filtering}\"",
@ -300,7 +316,7 @@ define pacemaker::stonith::fence_compute (
Exec<| title == 'wait-for-settle' |> -> Pcmk_stonith<||>
$param_string = "${tenant_name_chunk} ${auth_url_chunk} ${port_chunk} ${passwd_script_chunk} ${region_name_chunk} ${passwd_chunk} ${endpoint_type_chunk} ${action_chunk} ${login_chunk} ${plug_chunk} ${username_chunk} ${password_chunk} ${password_script_chunk} ${insecure_chunk} ${domain_chunk} ${instance_filtering_chunk} ${no_shared_storage_chunk} ${record_only_chunk} ${verbose_chunk} ${debug_chunk} ${debug_file_chunk} ${separator_chunk} ${power_wait_chunk} ${login_timeout_chunk} ${delay_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${retry_on_chunk} op monitor interval=${interval} ${meta_attr_value_chunk}"
$param_string = "${tenant_name_chunk} ${auth_url_chunk} ${port_chunk} ${passwd_script_chunk} ${region_name_chunk} ${passwd_chunk} ${endpoint_type_chunk} ${action_chunk} ${login_chunk} ${plug_chunk} ${username_chunk} ${password_chunk} ${password_script_chunk} ${insecure_chunk} ${domain_chunk} ${project_domain_chunk} ${user_domain_chunk} ${instance_filtering_chunk} ${no_shared_storage_chunk} ${record_only_chunk} ${verbose_chunk} ${debug_chunk} ${debug_file_chunk} ${separator_chunk} ${power_wait_chunk} ${login_timeout_chunk} ${delay_chunk} ${power_timeout_chunk} ${shell_timeout_chunk} ${retry_on_chunk} op monitor interval=${interval} ${meta_attr_value_chunk}"
if $ensure != 'absent' {
ensure_resource('package', 'fence-agents-compute', { ensure => 'installed' })