- NovaEvacuate: add user_domain and project_domain parameters

Resolves: rhbz#2081585
This commit is contained in:
Oyvind Albrigtsen 2022-05-17 09:38:53 +02:00
parent 68deed5b7c
commit a4d84eff3a
2 changed files with 69 additions and 1 deletions

View File

@ -0,0 +1,61 @@
From 340e12c0d457d244d375c2d805e78033c9dbdf78 Mon Sep 17 00:00:00 2001
From: Takashi Kajinami <tkajinam@redhat.com>
Date: Wed, 04 May 2022 23:13:35 +0900
Subject: [PATCH] NovaCompute/Evacuate: Make user/project domain configurable
... so that we can use a user or a project in a non-default keystone
domain.
Change-Id: I6e2175adca08fd97942cb83b8f8094e980b60c9d
---
diff --git a/heartbeat/NovaEvacuate b/heartbeat/NovaEvacuate
index 596f520..4565766 100644
--- a/heartbeat/NovaEvacuate
+++ b/heartbeat/NovaEvacuate
@@ -63,13 +63,29 @@
<parameter name="tenant_name" unique="0" required="1">
<longdesc lang="en">
-Tenant name for connecting to keystone in admin context.
+Tenant(Project) name for connecting to keystone in admin context.
Note that with Keystone V3 tenant names are only unique within a domain.
</longdesc>
<shortdesc lang="en">Tenant name</shortdesc>
<content type="string" default="" />
</parameter>
+<parameter name="user_domain" unique="0" required="0">
+<longdesc lang="en">
+Keystone domain the user belongs to
+</longdesc>
+<shortdesc lang="en">Keystone v3 User Domain</shortdesc>
+<content type="string" default="" />
+</parameter>
+
+<parameter name="project_domain" unique="0" required="0">
+<longdesc lang="en">
+Keystone domain the tenant(project) belongs to
+</longdesc>
+<shortdesc lang="en">Keystone v3 Project Domain</shortdesc>
+<content type="string" default="" />
+</parameter>
+
<parameter name="domain" unique="0" required="0">
<longdesc lang="en">
DNS domain in which hosts live, useful when the cluster uses short names and nova uses FQDN
@@ -319,6 +335,14 @@
fence_options="${fence_options} -t ${OCF_RESKEY_tenant_name}"
+ if [ -n "${OCF_RESKEY_user_domain}" ]; then
+ fence_options="${fence_options} -u ${OCF_RESKEY_user_domain}"
+ fi
+
+ if [ -n "${OCF_RESKEY_project_domain}" ]; then
+ fence_options="${fence_options} -P ${OCF_RESKEY_project_domain}"
+ fi
+
if [ -n "${OCF_RESKEY_domain}" ]; then
fence_options="${fence_options} -d ${OCF_RESKEY_domain}"
fi

View File

@ -45,7 +45,7 @@
Name: resource-agents Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.10.0 Version: 4.10.0
Release: 14%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} Release: 15%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
URL: https://github.com/ClusterLabs/resource-agents URL: https://github.com/ClusterLabs/resource-agents
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
@ -67,6 +67,7 @@ Patch14: bz2065138-IPaddr2-enable-more-control-for-IPv6-addresses.patch
Patch15: bz2072371-Filesystem-1-fix-uuid-label-device-whitespace.patch Patch15: bz2072371-Filesystem-1-fix-uuid-label-device-whitespace.patch
Patch16: bz2072371-Filesystem-2-improve-uuid-label-device-logic.patch Patch16: bz2072371-Filesystem-2-improve-uuid-label-device-logic.patch
Patch17: bz2083081-bz2083086-bz2083090-bz2083092-update-openstack-agents.patch Patch17: bz2083081-bz2083086-bz2083090-bz2083092-update-openstack-agents.patch
Patch18: bz2081585-NovaEvacuate-add-user_domain-project_domain.patch
# bundled ha-cloud-support libs # bundled ha-cloud-support libs
Patch500: ha-cloud-support-aws.patch Patch500: ha-cloud-support-aws.patch
@ -208,6 +209,7 @@ exit 1
%patch15 -p1 %patch15 -p1
%patch16 -p1 %patch16 -p1
%patch17 -p1 %patch17 -p1
%patch18 -p1
# bundled ha-cloud-support libs # bundled ha-cloud-support libs
%patch500 -p1 %patch500 -p1
@ -529,6 +531,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
%changelog %changelog
* Tue May 17 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-15
- NovaEvacuate: add user_domain and project_domain parameters
Resolves: rhbz#2081585
* Mon May 9 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-14 * Mon May 9 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-14
- openstack-cinder-volume/openstack-floating-ip/openstack-info/ - openstack-cinder-volume/openstack-floating-ip/openstack-info/
openstack-virtual-ip: new resource agents openstack-virtual-ip: new resource agents