From 67bff5da8d9c339d076c273e43b396712883d853 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 16 2018 12:47:35 +0000 Subject: import fence-agents-4.0.11-86.el7_5.3 --- diff --git a/SOURCES/bz1600602-1-fence_evacuate-fix-evacuable-tag-mix-issue.patch b/SOURCES/bz1600602-1-fence_evacuate-fix-evacuable-tag-mix-issue.patch new file mode 100644 index 0000000..621abda --- /dev/null +++ b/SOURCES/bz1600602-1-fence_evacuate-fix-evacuable-tag-mix-issue.patch @@ -0,0 +1,20 @@ +diff -uNr a/fence/agents/compute/fence_evacuate.py b/fence/agents/compute/fence_evacuate.py +--- a/fence/agents/compute/fence_evacuate.py 2018-06-28 14:24:54.000000000 +0200 ++++ b/fence/agents/compute/fence_evacuate.py 2018-07-11 09:08:56.975072003 +0200 +@@ -74,12 +74,15 @@ + } + + def _is_server_evacuable(server, evac_flavors, evac_images): ++ reason = "flavor "+server.flavor.get('id') + if server.flavor.get('id') in evac_flavors: + return True + if hasattr(server.image, 'get'): + if server.image.get('id') in evac_images: + return True +- logging.debug("Instance %s is not evacuable" % server.image.get('id')) ++ reason = reason +" and image "+server.image.get('id') ++ ++ logging.debug("Instance is not evacuable: no match for %s" % reason) + return False + + def _get_evacuable_flavors(connection): diff --git a/SOURCES/bz1600602-2-fence_compute-fence_evacuate-fix-compute-domain.patch b/SOURCES/bz1600602-2-fence_compute-fence_evacuate-fix-compute-domain.patch new file mode 100644 index 0000000..3888078 --- /dev/null +++ b/SOURCES/bz1600602-2-fence_compute-fence_evacuate-fix-compute-domain.patch @@ -0,0 +1,122 @@ +diff -uNr a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py +--- a/fence/agents/compute/fence_compute.py 2018-07-16 12:34:24.982643862 +0200 ++++ b/fence/agents/compute/fence_compute.py 2018-07-16 12:42:16.965667752 +0200 +@@ -353,7 +353,7 @@ + "default" : "", + "order": 1, + } +- all_opt["user_domain"] = { ++ all_opt["user-domain"] = { + "getopt" : "u:", + "longopt" : "user-domain", + "help" : "-u, --user-domain=[name] Keystone v3 User Domain", +@@ -362,7 +362,7 @@ + "default" : "Default", + "order": 2, + } +- all_opt["project_domain"] = { ++ all_opt["project-domain"] = { + "getopt" : "P:", + "longopt" : "project-domain", + "help" : "-d, --project-domain=[name] Keystone v3 Project Domain", +@@ -433,6 +433,14 @@ + "default" : "False", + "order": 5, + } ++ all_opt["compute-domain"] = { ++ "getopt" : ":", ++ "longopt" : "compute-domain", ++ "help" : "--compute-domain=[string] Replaced by --domain", ++ "required" : "0", ++ "shortdesc" : "Replaced by domain", ++ "order": 6, ++ } + + def set_multi_power_fn(connection, options, set_power_fn, get_power_fn, retry_attempts=1): + for _ in range(retry_attempts): +@@ -450,9 +458,10 @@ + global override_status + atexit.register(atexit_handler) + +- device_opt = ["login", "passwd", "tenant_name", "auth_url", "fabric_fencing", +- "no_login", "no_password", "port", "domain", "project_domain", "user_domain", +- "no_shared_storage", "endpoint_type", "record_only", "instance_filtering", "insecure", "region_name"] ++ device_opt = ["login", "passwd", "tenant_name", "auth_url", "fabric_fencing", "no_login", ++ "no_password", "port", "domain", "compute-domain", "project-domain", ++ "user-domain", "no_shared_storage", "endpoint_type", "record_only", ++ "instance_filtering", "insecure", "region_name"] + define_new_opts() + all_opt["shell_timeout"]["default"] = "180" + +@@ -470,6 +479,11 @@ + + run_delay(options) + ++ # workaround to avoid regressions ++ if "--compute-domain" in options and options["--compute-domain"]: ++ options["--domain"] = options["--compute-domain"] ++ del options["--domain"] ++ + logging.debug("Running "+options["--action"]) + connection = create_nova_connection(options) + +diff -uNr a/fence/agents/compute/fence_evacuate.py b/fence/agents/compute/fence_evacuate.py +--- a/fence/agents/compute/fence_evacuate.py 2018-07-16 12:34:24.982643862 +0200 ++++ b/fence/agents/compute/fence_evacuate.py 2018-07-16 12:42:16.966667739 +0200 +@@ -290,7 +290,7 @@ + "default" : "", + "order": 1, + } +- all_opt["user_domain"] = { ++ all_opt["user-domain"] = { + "getopt" : "u:", + "longopt" : "user-domain", + "help" : "-u, --user-domain=[name] Keystone v3 User Domain", +@@ -299,7 +299,7 @@ + "default" : "Default", + "order": 2, + } +- all_opt["project_domain"] = { ++ all_opt["project-domain"] = { + "getopt" : "P:", + "longopt" : "project-domain", + "help" : "-d, --project-domain=[name] Keystone v3 Project Domain", +@@ -361,14 +361,22 @@ + "default" : "False", + "order": 5, + } ++ all_opt["compute-domain"] = { ++ "getopt" : ":", ++ "longopt" : "compute-domain", ++ "help" : "--compute-domain=[string] Replaced by --domain", ++ "required" : "0", ++ "shortdesc" : "Replaced by domain", ++ "order": 6, ++ } + + def main(): + atexit.register(atexit_handler) + + device_opt = ["login", "passwd", "tenant_name", "auth_url", +- "no_login", "no_password", "port", "domain", "project_domain", +- "user_domain", "no_shared_storage", "endpoint_type", +- "instance_filtering", "insecure", "region_name"] ++ "no_login", "no_password", "port", "domain", "compute-domain", ++ "project-domain", "user-domain", "no_shared_storage", ++ "endpoint_type", "instance_filtering", "insecure", "region_name"] + define_new_opts() + all_opt["shell_timeout"]["default"] = "180" + +@@ -383,6 +391,12 @@ + + run_delay(options) + ++ # workaround to avoid regressions ++ if "--compute-domain" in options and options["--compute-domain"]: ++ options["--domain"] = options["--compute-domain"] ++ del options["--domain"] ++ ++ + connection = create_nova_connection(options) + + # Un-evacuating a server doesn't make sense diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index e4f928b..2aba1e7 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -16,7 +16,7 @@ Name: fence-agents Summary: Fence Agents for Red Hat Cluster Version: 4.0.11 -Release: 86%{?alphatag:.%{alphatag}}%{?dist}.2 +Release: 86%{?alphatag:.%{alphatag}}%{?dist}.3 License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -156,6 +156,8 @@ Patch131: bz1519370-fence_ilo3-default-to-onoff.patch Patch132: bz1451776-2-fence_aws-bundled-python-botocore.patch Patch133: bz1565670-fence_azure_arm-network-fencing.patch Patch134: bz1565701-fence_compute-fence_evacuate-fix-parameters.patch +Patch135: bz1600602-1-fence_evacuate-fix-evacuable-tag-mix-issue.patch +Patch136: bz1600602-2-fence_compute-fence_evacuate-fix-compute-domain.patch %if 0%{?rhel} %global supportedagents amt_ws apc apc_snmp aws azure_arm bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps hpblade ibmblade ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan mpath kdump rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti @@ -321,6 +323,8 @@ BuildRequires: iputils %patch132 -p1 -b .bz1451776-2 %patch133 -p1 -b .bz1565670 %patch134 -p1 -b .bz1565701 +%patch135 -p1 -b .bz1600602-1 +%patch136 -p1 -b .bz1600602-2 %build ./autogen.sh @@ -982,6 +986,10 @@ The fence-agents-zvm package contains a fence agent for z/VM hypervisors %endif %changelog +* Mon Jul 16 2018 Oyvind Albrigtsen - 4.0.11-86.3 +- fence_evacuate: fix evacuable tag mix issue + Resolves: rhbz#1600602 + * Thu Apr 12 2018 Oyvind Albrigtsen - 4.0.11-86.2 - fence_azure_arm: fix subscriptionId from metadata Resolves: rhbz#1566632