From 340e12c0d457d244d375c2d805e78033c9dbdf78 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 4 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 --- ocf/NovaCompute | 26 +++++++++++++++++++++++++- ocf/NovaEvacuate | 26 +++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/ocf/NovaCompute b/ocf/NovaCompute index 45b2bd6..5d63a35 100644 --- a/ocf/NovaCompute +++ b/ocf/NovaCompute @@ -62,13 +62,29 @@ Password for connecting to keystone in admin context -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. Tenant name + + +Keystone domain the user belongs to + +Keystone v3 User Domain + + + + + +Keystone domain the tenant(project) belongs to + +Keystone v3 Project Domain + + + DNS domain in which hosts live, useful when the cluster uses short names and nova uses FQDN @@ -286,6 +302,14 @@ nova_validate() { 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 diff --git a/ocf/NovaEvacuate b/ocf/NovaEvacuate index 596f520..4565766 100644 --- a/ocf/NovaEvacuate +++ b/ocf/NovaEvacuate @@ -63,13 +63,29 @@ Password for connecting to keystone in admin context -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. Tenant name + + +Keystone domain the user belongs to + +Keystone v3 User Domain + + + + + +Keystone domain the tenant(project) belongs to + +Keystone v3 Project Domain + + + DNS domain in which hosts live, useful when the cluster uses short names and nova uses FQDN @@ -319,6 +335,14 @@ evacuate_validate() { 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