From a7396823013360ad0d576413a5da2d6fce999775 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 21 2021 10:22:08 +0000 Subject: import fence-agents-4.2.1-74.el8 --- diff --git a/SOURCES/bz1969953-fence_gce-add-proxy-support.patch b/SOURCES/bz1969953-fence_gce-add-proxy-support.patch deleted file mode 100644 index 55dbc5b..0000000 --- a/SOURCES/bz1969953-fence_gce-add-proxy-support.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --color -uNr a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py ---- a/agents/gce/fence_gce.py 2021-06-11 14:57:01.138390529 +0200 -+++ b/agents/gce/fence_gce.py 2021-06-11 15:12:45.829855806 +0200 -@@ -1,6 +1,7 @@ - #!@PYTHON@ -tt - - import atexit -+import httplib2 - import logging - import os - import sys -@@ -18,6 +19,7 @@ - from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action - try: - import googleapiclient.discovery -+ import socks - try: - from google.oauth2.credentials import Credentials as GoogleCredentials - except: -@@ -189,13 +191,30 @@ - "required" : "0", - "order" : 9 - } -+ all_opt["proxyhost"] = { -+ "getopt" : ":", -+ "longopt" : "proxyhost", -+ "help" : "--proxyhost=[proxy_host] The proxy host to use, if one is needed to access the internet (Example: 10.122.0.33)", -+ "shortdesc" : "If a proxy is used for internet access, the proxy host should be specified.", -+ "required" : "0", -+ "order" : 10 -+ } -+ all_opt["proxyport"] = { -+ "getopt" : ":", -+ "type" : "integer", -+ "longopt" : "proxyport", -+ "help" : "--proxyport=[proxy_port] The proxy port to use, if one is needed to access the internet (Example: 3127)", -+ "shortdesc" : "If a proxy is used for internet access, the proxy port should be specified.", -+ "required" : "0", -+ "order" : 11 -+ } - - - def main(): - conn = None - - device_opt = ["port", "no_password", "zone", "project", "stackdriver-logging", -- "method", "serviceaccount"] -+ "method", "serviceaccount", "proxyhost", "proxyport"] - - atexit.register(atexit_handler) - -@@ -259,7 +278,17 @@ - credentials = GoogleCredentials.get_application_default() - logging.debug("using application default credentials") - -- conn = googleapiclient.discovery.build('compute', 'v1', credentials=credentials) -+ if options.get("--proxyhost") and options.get("--proxyport"): -+ proxy_info = httplib2.ProxyInfo( -+ proxy_type=socks.PROXY_TYPE_HTTP, -+ proxy_host=options.get("--proxyhost"), -+ proxy_port=int(options.get("--proxyport"))) -+ http = credentials.authorize(httplib2.Http(proxy_info=proxy_info)) -+ conn = googleapiclient.discovery.build( -+ 'compute', 'v1', http=http, cache_discovery=False) -+ else: -+ conn = googleapiclient.discovery.build( -+ 'compute', 'v1', credentials=credentials, cache_discovery=False) - except Exception as err: - fail_usage("Failed: Create GCE compute v1 connection: {}".format(str(err))) - diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index 6f35d26..55fc871 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -29,7 +29,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.2.1 -Release: 73%{?alphatag:.%{alphatag}}%{?dist} +Release: 74%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -132,7 +132,6 @@ Patch90: bz1920947-fence_redfish-2-add-diag-action-logic.patch Patch91: bz1920947-fence_redfish-3-fix-typo.patch Patch92: bz1922437-fence_mpath-watchdog-retry-support.patch Patch93: bz1685814-fence_gce-add-serviceaccount-file-support.patch -Patch94: bz1969953-fence_gce-add-proxy-support.patch %if 0%{?fedora} || 0%{?rhel} > 7 %global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hds_cb hpblade ibmblade ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti @@ -304,7 +303,6 @@ BuildRequires: python3-google-api-client %patch91 -p1 %patch92 -p1 %patch93 -p1 -%patch94 -p1 # prevent compilation of something that won't get used anyway sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac @@ -1196,11 +1194,9 @@ Fence agent for IBM z/VM over IP. %endif %changelog -* Fri Jun 11 2021 Oyvind Albrigtsen - 4.2.1-73 +* Tue Jul 20 2021 Oyvind Albrigtsen - 4.2.1-74 - fence_gce: add serviceaccount JSON file support Resolves: rhbz#1685814 -- fence_gce: add proxy support - Resolves: rhbz#1969953 * Thu May 20 2021 Oyvind Albrigtsen - 4.2.1-72 - fence_mpath: add watchdog retry support