Hello community,

here is the log from the commit of package fence-agents for openSUSE:Factory 
checked in at 2018-04-26 13:38:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fence-agents (Old)
 and      /work/SRC/openSUSE:Factory/.fence-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fence-agents"

Thu Apr 26 13:38:55 2018 rev:38 rq:601100 version:4.0.25+git.1524215631.8f9c770a

Changes:
--------
--- /work/SRC/openSUSE:Factory/fence-agents/fence-agents.changes        
2018-04-13 12:50:44.673434331 +0200
+++ /work/SRC/openSUSE:Factory/.fence-agents.new/fence-agents.changes   
2018-04-26 13:38:57.378046087 +0200
@@ -1,0 +2,13 @@
+Thu Apr 26 05:37:33 UTC 2018 - kgronl...@suse.com
+
+- Update to version 4.0.25+git.1524215631.8f9c770a:
+  * fence_gce: Write error messages to log (fate#325539) (bsc#1088358)
+  * fence_azure_arm: fix subscriptionId from metadata (bsc#1090995)
+  * fence_scsi: fix plug-parameter and keep support for nodename to avoid 
regressions
+
+-------------------------------------------------------------------
+Wed Apr 25 20:28:19 UTC 2018 - kgronl...@suse.com
+
+- Disable Google Compute Engine support unless openSUSE (fate#325539) 
(bsc#1088358)
+
+-------------------------------------------------------------------

Old:
----
  fence-agents-4.0.25+git.1523367910.7473fab7.tar.xz

New:
----
  fence-agents-4.0.25+git.1524215631.8f9c770a.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fence-agents.spec ++++++
--- /var/tmp/diff_new_pack.NYuIwc/_old  2018-04-26 13:38:57.838029226 +0200
+++ /var/tmp/diff_new_pack.NYuIwc/_new  2018-04-26 13:38:57.842029080 +0200
@@ -17,13 +17,17 @@
 
 
 %global plugin_dir %{_libdir}/stonith/plugins/rhcs
+%if 0%{?is_opensuse}
 %define agent_list alom amt amt_ws apc apc_snmp azure_arm bladecenter brocade 
cisco_mds cisco_ucs compute docker drac5 dummy eaton_snmp emerson eps evacuate 
gce hds_cb hpblade ibmblade ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular 
ipdu ipmilan ironic kdump ldom lpar mpath netio powerman pve raritan rcd_serial 
rhevm rsa rsb sanbox2 sbd scsi vbox virsh vmware vmware_rest wti xenapi zvm
+%else
+%define agent_list alom amt amt_ws apc apc_snmp azure_arm bladecenter brocade 
cisco_mds cisco_ucs compute docker drac5 dummy eaton_snmp emerson eps evacuate 
hds_cb hpblade ibmblade ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu 
ipmilan ironic kdump ldom lpar mpath netio powerman pve raritan rcd_serial 
rhevm rsa rsb sanbox2 sbd scsi vbox virsh vmware vmware_rest wti xenapi zvm
+%endif
 
 Name:           fence-agents
 Summary:        Fence Agents for High Availability
 License:        GPL-2.0-only AND LGPL-2.1-only
 Group:          Productivity/Clustering/HA
-Version:        4.0.25+git.1523367910.7473fab7
+Version:        4.0.25+git.1524215631.8f9c770a
 Release:        0
 Url:            https://github.com/ClusterLabs/fence-agents
 Source0:        %{name}-%{version}.tar.xz
@@ -43,8 +47,10 @@
 BuildRequires:  perl-Net-Telnet
 BuildRequires:  pkg-config
 BuildRequires:  python3
+%if 0%{?is_opensuse}
 BuildRequires:  python3-google-api-python-client
 BuildRequires:  python3-oauth2client
+%endif
 BuildRequires:  python3-openwsman
 BuildRequires:  python3-pexpect
 BuildRequires:  python3-pycurl
@@ -129,7 +135,7 @@
 
 %files
 %defattr(-,root,root,-)
-%doc doc/COPYING.* doc/COPYRIGHT doc/README.licence
+%license doc/COPYING.* doc/COPYRIGHT doc/README.licence
 %dir %{plugin_dir}
 %dir %{_libdir}/stonith/plugins
 %dir %{_libdir}/stonith

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.NYuIwc/_old  2018-04-26 13:38:57.886027467 +0200
+++ /var/tmp/diff_new_pack.NYuIwc/_new  2018-04-26 13:38:57.886027467 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">git://github.com/ClusterLabs/fence-agents.git</param>
-          <param 
name="changesrevision">7473fab7350f3f26c203b7559a9092ed9ebcd047</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">bec154345d2291c9051c16277de9054387dc9707</param></service></servicedata>
\ No newline at end of file

++++++ fence-agents-4.0.25+git.1523367910.7473fab7.tar.xz -> 
fence-agents-4.0.25+git.1524215631.8f9c770a.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fence-agents-4.0.25+git.1523367910.7473fab7/fence/agents/gce/fence_gce.py 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/fence/agents/gce/fence_gce.py
--- 
old/fence-agents-4.0.25+git.1523367910.7473fab7/fence/agents/gce/fence_gce.py   
    2018-04-10 15:45:10.000000000 +0200
+++ 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/fence/agents/gce/fence_gce.py   
    2018-04-20 11:13:51.000000000 +0200
@@ -3,11 +3,18 @@
 import atexit
 import sys
 sys.path.append("@FENCEAGENTSLIBDIR@")
-from googleapiclient import discovery
-from oauth2client.client import GoogleCredentials
 
-from fencing import *
-from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay
+import googleapiclient
+import oauth2client
+from fencing import fail_usage, run_delay, all_opt, atexit_handler, 
check_input, process_input, show_docs, fence_action
+
+def translate_status(instance_status):
+       "Returns on | off | unknown."
+       if instance_status == "RUNNING":
+               return "on"
+       elif instance_status == "TERMINATED":
+               return "off"
+       return "unknown"
 
 
 def get_nodes_list(conn, options):
@@ -15,43 +22,38 @@
        try:
                instanceList = 
conn.instances().list(project=options["--project"], 
zone=options["--zone"]).execute()
                for instance in instanceList["items"]:
-                       status = "unknown"
-                       if instance["status"] == "RUNNING":
-                               status = "on"
-                       elif instance["status"] == "TERMINATED":
-                               status = "off"
-                       result[instance["id"]] = (instance["name"], status)
-       # TODO: check which Exceptions it can throw
-       except:
-               fail_usage("Failed: Unable to connect to GCE. Check your 
configuration.")
+                       result[instance["id"]] = (instance["name"], 
translate_status(instance["status"]))
+       except Exception as err:
+               fail_usage("Failed: get_nodes_list: {}".format(str(err)))
 
        return result
 
 def get_power_status(conn, options):
        try:
-               instance = conn.instances().get(project=options["--project"], 
zone=options["--zone"],
-                                               
instance=options["--plug"]).execute()
-               if instance["status"] == "RUNNING":
-                       return "on"
-               elif instance["status"] == "TERMINATED":
-                       return "off"
-               else:
-                       return "unknown"
-       # TODO: check which Exceptions it can throw
-       except:
-               fail_usage("Failed: Unable to connect to GCE. Check your 
configuration.")
+               instance = conn.instances().get(
+                               project=options["--project"],
+                               zone=options["--zone"],
+                               instance=options["--plug"]).execute()
+               return translate_status(instance["status"])
+       except Exception as err:
+               fail_usage("Failed: get_power_status: {}".format(str(err)))
+
 
 def set_power_status(conn, options):
        try:
-               if (options["--action"]=="off"):
-                       conn.instances().stop(project=options["--project"], 
zone=options["--zone"],
-                                                       
instance=options["--plug"]).execute()
-               elif (options["--action"]=="on"):
-                       conn.instances().start(project=options["--project"], 
zone=options["--zone"],
-                                                       
instance=options["--plug"]).execute()
-       # TODO: check which Exceptions it can throw
-       except :
-               fail_usage("Failed: Unable to connect to GCE. Check your 
configuration.")
+               if options["--action"] == "off":
+                       conn.instances().stop(
+                                       project=options["--project"],
+                                       zone=options["--zone"],
+                                       instance=options["--plug"]).execute()
+               elif options["--action"] == "on":
+                       conn.instances().start(
+                                       project=options["--project"],
+                                       zone=options["--zone"],
+                                       instance=options["--plug"]).execute()
+       except Exception as err:
+               fail_usage("Failed: set_power_status: {}".format(str(err)))
+
 
 def define_new_opts():
        all_opt["zone"] = {
@@ -97,10 +99,10 @@
        run_delay(options)
 
        try:
-               credentials = GoogleCredentials.get_application_default()
-               conn = discovery.build('compute', 'v1', credentials=credentials)
-       except:
-               fail_usage("Failed: Unable to connect to GCE. Check your 
configuration.")
+               credentials = 
oauth2client.GoogleCredentials.get_application_default()
+               conn = googleapiclient.discovery.build('compute', 'v1', 
credentials=credentials)
+       except Exception as err:
+               fail_usage("Failed: Create GCE compute v1 connection: 
{}".format(str(err)))
 
        # Operate the fencing device
        result = fence_action(conn, options, set_power_status, 
get_power_status, get_nodes_list)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fence-agents-4.0.25+git.1523367910.7473fab7/fence/agents/lib/azure_fence.py.py
 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/fence/agents/lib/azure_fence.py.py
--- 
old/fence-agents-4.0.25+git.1523367910.7473fab7/fence/agents/lib/azure_fence.py.py
  2018-04-10 15:45:10.000000000 +0200
+++ 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/fence/agents/lib/azure_fence.py.py
  2018-04-20 11:13:51.000000000 +0200
@@ -262,7 +262,7 @@
 
     if not config.SubscriptionId:
         logging.info("subscriptionId not provided. Using metadata service")
-        config.RGName = get_from_metadata("subscriptionId")
+        config.SubscriptionId = get_from_metadata("subscriptionId")
 
     return config
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fence-agents-4.0.25+git.1523367910.7473fab7/fence/agents/scsi/fence_scsi.py 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/fence/agents/scsi/fence_scsi.py
--- 
old/fence-agents-4.0.25+git.1523367910.7473fab7/fence/agents/scsi/fence_scsi.py 
    2018-04-10 15:45:10.000000000 +0200
+++ 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/fence/agents/scsi/fence_scsi.py 
    2018-04-20 11:13:51.000000000 +0200
@@ -191,7 +191,7 @@
 def get_node_id(options):
        cmd = options["--corosync-cmap-path"] + " nodelist"
 
-       match = re.search(r".(\d).ring._addr \(str\) = " + 
options["--nodename"] + "\n", run_cmd(options, cmd)["out"])
+       match = re.search(r".(\d).ring._addr \(str\) = " + options["--plug"] + 
"\n", run_cmd(options, cmd)["out"])
        return match.group(1) if match else fail_usage("Failed: unable to parse 
output of corosync-cmapctl or node does not exist")
 
 
@@ -299,13 +299,11 @@
                "order": 1
        }
        all_opt["nodename"] = {
-               "getopt" : "n:",
+               "getopt" : ":",
                "longopt" : "nodename",
-               "help" : "-n, --nodename=[nodename]      Name of the node to be 
fenced",
+               "help" : "",
                "required" : "0",
-               "shortdesc" : "Name of the node to be fenced. The node name is 
used to \
-generate the key value used for the current operation. This option will be \
-ignored when used with the -k option.",
+               "shortdesc" : "",
                "order": 1
        }
        all_opt["key"] = {
@@ -418,14 +416,19 @@
 
        atexit.register(atexit_handler)
 
-       device_opt = ["no_login", "no_password", "devices", "nodename", "key",\
-       "aptpl", "fabric_fencing", "on_target", "corosync_cmap_path",\
+       device_opt = ["no_login", "no_password", "devices", "nodename", "port",\
+       "no_port", "key", "aptpl", "fabric_fencing", "on_target", 
"corosync_cmap_path",\
        "sg_persist_path", "sg_turs_path", "logfile", "vgs_path", "force_on"]
 
        define_new_opts()
 
        all_opt["delay"]["getopt"] = "H:"
 
+       all_opt["port"]["help"] = "-n, --plug=[nodename]          Name of the 
node to be fenced"
+       all_opt["port"]["shortdesc"] = "Name of the node to be fenced. The node 
name is used to \
+generate the key value used for the current operation. This option will be \
+ignored when used with the -k option."
+
        #fence_scsi_check
        if os.path.basename(sys.argv[0]) == "fence_scsi_check":
                sys.exit(scsi_check())
@@ -434,6 +437,9 @@
 
        options = check_input(device_opt, process_input(device_opt), 
other_conditions=True)
 
+       # hack to remove list/list-status actions which are not supported
+       options["device_opt"] = [ o for o in options["device_opt"] if o != 
"separator" ]
+
        docs = {}
        docs["shortdesc"] = "Fence agent for SCSI persistent reservation"
        docs["longdesc"] = "fence_scsi is an I/O fencing agent that uses SCSI-3 
\
@@ -470,7 +476,12 @@
        if options["--action"] == "monitor":
                sys.exit(do_action_monitor(options))
 
-       if not (("--nodename" in options and options["--nodename"])\
+       # workaround to avoid regressions
+       if "--nodename" in options and options["--nodename"]:
+               options["--plug"] = options["--nodename"]
+               del options["--nodename"]
+
+       if not (("--plug" in options and options["--plug"])\
        or ("--key" in options and options["--key"])):
                fail_usage("Failed: nodename or key is required", 
stop_after_error)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fence-agents-4.0.25+git.1523367910.7473fab7/tests/data/metadata/fence_scsi.xml
 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/tests/data/metadata/fence_scsi.xml
--- 
old/fence-agents-4.0.25+git.1523367910.7473fab7/tests/data/metadata/fence_scsi.xml
  2018-04-10 15:45:10.000000000 +0200
+++ 
new/fence-agents-4.0.25+git.1524215631.8f9c770a/tests/data/metadata/fence_scsi.xml
  2018-04-20 11:13:51.000000000 +0200
@@ -24,8 +24,13 @@
                <content type="string"  />
                <shortdesc lang="en">Key to use for the current operation. This 
key should be unique to a node. For the "on" action, the key specifies the key 
use to register the local node. For the "off" action, this key specifies the 
key to be removed from the device(s).</shortdesc>
        </parameter>
-       <parameter name="nodename" unique="0" required="0">
-               <getopt mixed="-n, --nodename=[nodename]" />
+       <parameter name="plug" unique="0" required="1" obsoletes="port">
+               <getopt mixed="-n, --plug=[nodename]" />
+               <content type="string"  />
+               <shortdesc lang="en">Name of the node to be fenced. The node 
name is used to generate the key value used for the current operation. This 
option will be ignored when used with the -k option.</shortdesc>
+       </parameter>
+       <parameter name="port" unique="0" required="1" deprecated="1">
+               <getopt mixed="-n, --plug=[nodename]" />
                <content type="string"  />
                <shortdesc lang="en">Name of the node to be fenced. The node 
name is used to generate the key value used for the current operation. This 
option will be ignored when used with the -k option.</shortdesc>
        </parameter>


Reply via email to