From acc7086b1d292510878f8d6bacb0ffc0171ca4af Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Mon, 3 Jul 2023 12:32:35 +0200 Subject: [PATCH] - fence_azure_arm: add Stack Hub support Resolves: rhbz#2211460 --- ...rm-2-metadata-endpoint-error-message.patch | 21 ++++++++++++++++--- fence-agents.spec | 4 ++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch b/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch index 8944970..d2c6956 100644 --- a/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch +++ b/bz2211460-fence_azure-arm-2-metadata-endpoint-error-message.patch @@ -1,10 +1,10 @@ ---- a/lib/azure_fence.py.py 2023-06-20 16:16:38.525301510 +0200 -+++ b/lib/azure_fence.py.py 2023-06-20 16:15:52.336508620 +0200 +--- a/lib/azure_fence.py.py 2023-07-03 11:40:44.083882319 +0200 ++++ b/lib/azure_fence.py.py 2023-07-03 11:40:38.178784811 +0200 @@ -317,12 +317,11 @@ from azure.mgmt.compute import ComputeManagementClient cloud_environment = get_azure_cloud_environment(config) -+ if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: ++ if cloud_environment and config.Cloud.lower() == "stack" and not config.MetadataEndpoint: + fail_usage("metadata-endpoint not specified") credentials = get_azure_credentials(config) @@ -15,3 +15,18 @@ compute_client = ComputeManagementClient( credentials, config.SubscriptionId, +@@ -339,12 +338,11 @@ + from azure.mgmt.network import NetworkManagementClient + + cloud_environment = get_azure_cloud_environment(config) ++ if cloud_environment and config.Cloud.lower() == "stack" and not config.MetadataEndpoint: ++ fail_usage("metadata-endpoint not specified") + credentials = get_azure_credentials(config) + + if cloud_environment: +- if (config.Cloud.lower() == "stack") and not config.MetadataEndpoint: +- fail_usage("metadata-endpoint not specified") +- + network_client = NetworkManagementClient( + credentials, + config.SubscriptionId, diff --git a/fence-agents.spec b/fence-agents.spec index 3e05a06..973ac64 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -87,7 +87,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.2.1 -Release: 117%{?alphatag:.%{alphatag}}%{?dist} +Release: 118%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -1481,7 +1481,7 @@ Fence agent for IBM z/VM over IP. %endif %changelog -* Tue Jun 20 2023 Oyvind Albrigtsen - 4.2.1-117 +* Mon Jul 3 2023 Oyvind Albrigtsen - 4.2.1-118 - fence_azure_arm: add Stack Hub support Resolves: rhbz#2211460