Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package fence-agents for openSUSE:Factory 
checked in at 2025-09-04 17:59:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fence-agents (Old)
 and      /work/SRC/openSUSE:Factory/.fence-agents.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fence-agents"

Thu Sep  4 17:59:36 2025 rev:87 rq:1302690 
version:4.16.0+git.1755594293.5cf006ff

Changes:
--------
--- /work/SRC/openSUSE:Factory/fence-agents/fence-agents.changes        
2025-06-24 20:52:36.464824657 +0200
+++ /work/SRC/openSUSE:Factory/.fence-agents.new.1977/fence-agents.changes      
2025-09-04 18:02:20.402184462 +0200
@@ -1,0 +2,7 @@
+Thu Sep 04 08:06:38 UTC 2025 - [email protected]
+
+- Update to version 4.16.0+git.1755594293.5cf006ff:
+  * fence_aws: Add new skip_os_shutdown flag (#632)
+  * fence_ibm_vpc: add apikey file support
+
+-------------------------------------------------------------------

Old:
----
  fence-agents-4.16.0+git.1750325058.755815b1.tar.xz

New:
----
  fence-agents-4.16.0+git.1755594293.5cf006ff.tar.xz

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

Other differences:
------------------
++++++ fence-agents.spec ++++++
--- /var/tmp/diff_new_pack.8osV12/_old  2025-09-04 18:02:21.354224559 +0200
+++ /var/tmp/diff_new_pack.8osV12/_new  2025-09-04 18:02:21.358224727 +0200
@@ -19,7 +19,7 @@
 %define agent_list aliyun alom apc apc_snmp aws azure_arm bladecenter brocade 
cisco_mds cisco_ucs drac5 dummy eaton_snmp eaton_ssh emerson eps evacuate gce 
hds_cb hpblade ibmblade ibmz ibm_powervs ibm_vpc ifmib ilo ilo_moonshot ilo_mp 
ilo_ssh intelmodular ipdu ipmilan ironic kdump lpar mpath netio nutanix_ahv 
powerman pve raritan rcd_serial redfish rsa rsb sanbox2 sbd scsi vbox virsh 
vmware vmware_rest wti zvm
 Name:           fence-agents
 Summary:        Set of unified programs capable of host isolation ("fencing")
-Version:        4.16.0+git.1750325058.755815b1
+Version:        4.16.0+git.1755594293.5cf006ff
 Release:        0
 License:        GPL-2.0-or-later AND LGPL-2.0-or-later
 Group:          Productivity/Clustering/HA

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.8osV12/_old  2025-09-04 18:02:21.426227592 +0200
+++ /var/tmp/diff_new_pack.8osV12/_new  2025-09-04 18:02:21.430227760 +0200
@@ -3,6 +3,6 @@
             <param 
name="url">git://github.com/ClusterLabs/fence-agents.git</param>
           <param 
name="changesrevision">8d746be92f191aa289f13a3703031c122a5e6cf3</param></service><service
 name="tar_scm">
                 <param 
name="url">https://github.com/ClusterLabs/fence-agents</param>
-              <param 
name="changesrevision">755815b1cda6619360a09196e1b75ecc5ee189ba</param></service></servicedata>
+              <param 
name="changesrevision">5cf006ffa3a948ccded3a55c15669f1d5efef5f5</param></service></servicedata>
 (No newline at EOF)
 

++++++ fence-agents-4.16.0+git.1750325058.755815b1.tar.xz -> 
fence-agents-4.16.0+git.1755594293.5cf006ff.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fence-agents-4.16.0+git.1750325058.755815b1/agents/aws/fence_aws.py 
new/fence-agents-4.16.0+git.1755594293.5cf006ff/agents/aws/fence_aws.py
--- old/fence-agents-4.16.0+git.1750325058.755815b1/agents/aws/fence_aws.py     
2025-06-19 11:24:18.000000000 +0200
+++ new/fence-agents-4.16.0+git.1755594293.5cf006ff/agents/aws/fence_aws.py     
2025-08-19 11:04:53.000000000 +0200
@@ -12,7 +12,7 @@
 
 try:
        import boto3
-       from botocore.exceptions import ConnectionError, ClientError, 
EndpointConnectionError, NoRegionError
+       from botocore.exceptions import ConnectionError, ClientError, 
EndpointConnectionError, NoRegionError, ParamValidationError
 except ImportError:
        pass
 
@@ -120,14 +120,28 @@
 def set_power_status(conn, options):
        my_instance = get_instance_id(options)
        try:
+               if options.get("--skip-os-shutdown", "false").lower() in ["1", 
"yes", "on", "true"]:
+                       shutdown_option = {
+                               "SkipOsShutdown": True,
+                               "Force": True
+                       }
+               else:
+                       shutdown_option = {
+                               "SkipOsShutdown": False,
+                               "Force": True
+                       }
                if (options["--action"]=="off"):
                        if "--skip-race-check" in options or 
get_self_power_status(conn,my_instance) == "ok":
-                               
conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True)
+                               
conn.instances.filter(InstanceIds=[options["--plug"]]).stop(**shutdown_option)
                                logger.debug("Called StopInstance API call for 
%s", options["--plug"])
                        else:
                                logger.debug("Skipping fencing as instance is 
not in running status")
                elif (options["--action"]=="on"):
                        
conn.instances.filter(InstanceIds=[options["--plug"]]).start()
+       except ParamValidationError:
+               if (options["--action"] == "off"):
+                       logger.warning(f"SkipOsShutdown not supported with the 
current boto3 version {boto3.__version__} - falling back to graceful shutdown")
+                       
conn.instances.filter(InstanceIds=[options["--plug"]]).stop(Force=True)
        except Exception as e:
                logger.debug("Failed to power %s %s: %s", \
                                options["--action"], options["--plug"], e)
@@ -183,12 +197,21 @@
                "required": "0",
                "order": 7
        }
+       all_opt["skip_os_shutdown"] = {
+               "getopt" : ":",
+               "longopt" : "skip-os-shutdown",
+               "help" : "--skip-os-shutdown=[true|false]    Uses 
SkipOsShutdown flag",
+               "shortdesc" : "Use SkipOsShutdown flag to stop the EC2 
instance",
+               "required" : "0",
+               "default" : "true",
+               "order" : 8
+       }
 
 # Main agent method
 def main():
        conn = None
 
-       device_opt = ["port", "no_password", "region", "access_key", 
"secret_key", "filter", "boto3_debug", "skip_race_check"]
+       device_opt = ["port", "no_password", "region", "access_key", 
"secret_key", "filter", "boto3_debug", "skip_race_check", "skip_os_shutdown"]
 
        atexit.register(atexit_handler)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fence-agents-4.16.0+git.1750325058.755815b1/agents/ibm_vpc/fence_ibm_vpc.py 
new/fence-agents-4.16.0+git.1755594293.5cf006ff/agents/ibm_vpc/fence_ibm_vpc.py
--- 
old/fence-agents-4.16.0+git.1750325058.755815b1/agents/ibm_vpc/fence_ibm_vpc.py 
    2025-06-19 11:24:18.000000000 +0200
+++ 
new/fence-agents-4.16.0+git.1755594293.5cf006ff/agents/ibm_vpc/fence_ibm_vpc.py 
    2025-08-19 11:04:53.000000000 +0200
@@ -7,7 +7,7 @@
 import hashlib
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
-from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS, 
EC_GENERIC_ERROR
+from fencing import fail, run_delay, EC_BAD_ARGS, EC_LOGIN_DENIED, EC_STATUS, 
EC_GENERIC_ERROR
 
 state = {
         "running": "on",
@@ -315,6 +315,27 @@
        ####
        run_delay(options)
 
+       if options["--apikey"][0] == '@':
+               key_file = options["--apikey"][1:]
+               try:
+                       # read the API key from a file
+                       with open(key_file, "r") as f:
+                               try:
+                                       keys = json.loads(f.read())
+                                       # data seems to be in json format
+                                       # return the value of the item with the 
key 'Apikey'
+                                       options["--apikey"] = 
keys.get("Apikey", "")
+                                       if not options["--apikey"]:
+                                               # backward compatibility: 
former key name was 'apikey'
+                                               options["--apikey"] = 
keys.get("apikey", "")
+                               # data is text, return as is
+                               except ValueError:
+                                       f.seek(0)
+                                       options["--apikey"] = f.read().strip()
+               except FileNotFoundError:
+                       logging.error("Failed: Cannot open file 
{}".format(key_file))
+                       sys.exit(EC_BAD_ARGS)
+
        conn = connect(options)
        atexit.register(disconnect, conn)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/fence-agents-4.16.0+git.1750325058.755815b1/tests/data/metadata/fence_aws.xml
 
new/fence-agents-4.16.0+git.1755594293.5cf006ff/tests/data/metadata/fence_aws.xml
--- 
old/fence-agents-4.16.0+git.1750325058.755815b1/tests/data/metadata/fence_aws.xml
   2025-06-19 11:24:18.000000000 +0200
+++ 
new/fence-agents-4.16.0+git.1755594293.5cf006ff/tests/data/metadata/fence_aws.xml
   2025-08-19 11:04:53.000000000 +0200
@@ -51,6 +51,11 @@
                <content type="boolean"  />
                <shortdesc lang="en">Skip race condition check</shortdesc>
        </parameter>
+       <parameter name="skip_os_shutdown" unique="0" required="0">
+               <getopt mixed="--skip-os-shutdown=[true|false]" />
+               <content type="string" default="true"  />
+               <shortdesc lang="en">Use SkipOsShutdown flag to stop the EC2 
instance</shortdesc>
+       </parameter>
        <parameter name="quiet" unique="0" required="0">
                <getopt mixed="-q, --quiet" />
                <content type="boolean"  />

Reply via email to