public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fence-agents] eln: - fence_aws: support 'diag' option (NMI)
@ 2026-10-16  7:44 Arslan Ahmad
  0 siblings, 0 replies; only message in thread
From: Arslan Ahmad @ 2026-10-16  7:44 UTC (permalink / raw)
  To: git-commits

          A new commit has been pushed.

          Repo   : rpms/fence-agents
          Branch : eln
          Commit : 64f490691880fe445e9319d8481769f033c5d50d
          Author : Arslan Ahmad <arahmad@redhat.com>
          Date   : 2026-10-14T12:10:53-04:00
          Stats  : +62/-1 in 2 file(s)
          URL    : https://src.fedoraproject.org/rpms/fence-agents/c/64f490691880fe445e9319d8481769f033c5d50d?branch=eln

          Log:
          - fence_aws: support 'diag' option (NMI)
Resolves: RHEL-276888

---
diff --git a/RHEL-276888-fence_aws-support-for-NMI.patch b/RHEL-276888-fence_aws-support-for-NMI.patch
new file mode 100644
index 0000000..74d0939
--- /dev/null
+++ b/RHEL-276888-fence_aws-support-for-NMI.patch
@@ -0,0 +1,55 @@
+--- a/agents/aws/fence_aws.py
++++ b/agents/aws/fence_aws.py
+@@ -79,6 +79,15 @@
+ 	logger.debug("Monitor operation OK: %s",result)
+ 	return result
+
++def reboot_diag(conn, options):
++	try:
++		conn.meta.client.send_diagnostic_interrupt(InstanceId=options["--plug"])
++		logger.info("Called SendDiagnosticInterrupt API call for %s", options["--plug"])
++		return True
++	except Exception as e:
++		logger.error("Failed to send diagnostic interrupt to %s: %s", options["--plug"], e)
++		return False 
++
+ def get_power_status(conn, options):
+ 	logger.debug("Starting status operation")
+ 	try:
+@@ -212,7 +221,7 @@
+ def main():
+ 	conn = None
+ 
+-	device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug", "skip_race_check", "skip_os_shutdown"]
++	device_opt = ["port", "no_password", "region", "access_key", "secret_key", "filter", "boto3_debug", "skip_race_check", "skip_os_shutdown", "diag"]
+ 
+ 	atexit.register(atexit_handler)
+ 
+@@ -272,8 +281,14 @@
+ 		else:
+ 			pass
+ 
++	reboot_fn = None
++	if options["--action"] == "diag":
++		options["--action"] = "reboot"
++		options["--method"] = "cycle"
++		reboot_fn = reboot_diag
++
+ 	# Operate the fencing device
+-	result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list)
++	result = fence_action(conn, options, set_power_status, get_power_status, get_nodes_list, reboot_fn)
+ 	sys.exit(result)
+ 
+ if __name__ == "__main__":
+
+diff --git a/tests/data/metadata/fence_aws.xml b/tests/data/metadata/fence_aws.xml
+index 2514c148d..4c35d90aa 100644
+--- a/tests/data/metadata/fence_aws.xml
++++ b/tests/data/metadata/fence_aws.xml
+@@ -172,5 +172,6 @@ For instructions see: https://boto3.readthedocs.io/en/latest/guide/quickstart.ht
+ 	<action name="metadata" />
+ 	<action name="manpage" />
+ 	<action name="validate-all" />
++	<action name="diag" />
+ </actions>
+ </resource-agent>

diff --git a/fence-agents.spec b/fence-agents.spec
index 93fff21..eb6dadc 100644
--- a/fence-agents.spec
+++ b/fence-agents.spec
@@ -13,7 +13,7 @@
 Name: fence-agents
 Summary: Set of unified programs capable of host isolation ("fencing")
 Version: 4.16.0
-Release: 34%{?alphatag:.%{alphatag}}%{?dist}
+Release: 35%{?alphatag:.%{alphatag}}%{?dist}
 License: GPL-2.0-or-later AND LGPL-2.0-or-later
 URL: https://github.com/ClusterLabs/fence-agents
 Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz
@@ -130,6 +130,7 @@ Patch24: RHEL-155007-fence_openstack-fix-list-action-to-avoid-timeout-with-large
 Patch25: RHEL-191488-1-fence_vmware_rest-add-token-based-authentication.patch
 Patch26: RHEL-191488-2-fence_vmware_rest-remove-static-token-option.patch
 Patch27: RHEL-219431-fence_gce-fail-immediately-with-import-error.patch
+Patch28: RHEL-276888-fence_aws-support-for-NMI.patch
 
 %global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs drac5 eaton_snmp emerson eps hpblade ibmblade ibm_powervs ibm_vpc ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump kubevirt lpar mpath nutanix_ahv redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti
 %ifarch x86_64
@@ -269,6 +270,7 @@ BuildRequires: %{systemd_units}
 %patch -p1 -P 25
 %patch -p1 -P 26
 %patch -p1 -P 27
+%patch -p1 -P 28
 
 # prevent compilation of something that won't get used anyway
 sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
@@ -1248,6 +1250,10 @@ are located on corosync cluster nodes.
 %endif
 
 %changelog
+* Wed Oct  7 2026 Arslan Ahmad <arahmad@redhat.com> - 4.16.0-35
+- fence_aws: support 'diag' option (NMI)
+  Resolves: RHEL-276888
+
 * Fri Jul 31 2026 Arslan Ahmad <arahmad@redhat.com> - 4.16.0-34
 - fence_gce: fail immediately with import errors
   Resolves: RHEL-219431

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-16  7:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16  7:44 [rpms/fence-agents] eln: - fence_aws: support 'diag' option (NMI) Arslan Ahmad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox