From ccc7436523946fedce4eadbae2f000c3ca30b235 Mon Sep 17 00:00:00 2001 From: Arslan Ahmad Date: Fri, 4 Sep 2026 13:03:37 +0530 Subject: [PATCH] - oralsnr: support for multiple listeners per Oracle SID Resolves: RHEL-139361 --- ...for-multiple-listener-per-oracle-sid.patch | 110 ++++++++++++++++++ resource-agents.spec | 9 +- 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 RHEL-139361-oralsnr-support-for-multiple-listener-per-oracle-sid.patch diff --git a/RHEL-139361-oralsnr-support-for-multiple-listener-per-oracle-sid.patch b/RHEL-139361-oralsnr-support-for-multiple-listener-per-oracle-sid.patch new file mode 100644 index 0000000..5e6582a --- /dev/null +++ b/RHEL-139361-oralsnr-support-for-multiple-listener-per-oracle-sid.patch @@ -0,0 +1,110 @@ +From b071d36f00e02d3b2f56b9e70b6abb456bf78c14 Mon Sep 17 00:00:00 2001 +From: Arslan Ahmad +Date: Mon, 29 Jun 2026 19:13:22 +0530 +Subject: [PATCH] oralsnr: enable support for multiple listeners per SID + +Previously, configuring multiple listeners for the same SID caused +validation warnings and false positive monitor operations. + +One can configure several listeners per instance, one for front-end +applications, another for backup etc. To properly support this +architecture, this commit introduces the following changes: + +* Removed the `unique` constraint on the `sid` parameter, as the +`listener` parameter is the true unique identifier for the OS-level +process. + +* Added a new resource option `tns_svc_name` to allow cluster +administrators to specify a custom TNS alias (e.g. pointing to a +specific port) for the monitor operation. + +* Updated `test_tnsping()` to use the new `tns_svc_name` parameter +instead of hardcoded `$ORACLE_SID`. This parameter dynamically defaults +to the database SID, ensuring complete backward compatibility for +existing single-listener setups. +--- + heartbeat/oralsnr | 33 ++++++++++++++++++++++++--------- + 1 file changed, 24 insertions(+), 9 deletions(-) + +diff --git a/heartbeat/oralsnr b/heartbeat/oralsnr +index dd0df1c614..7db73ecde3 100755 +--- a/heartbeat/oralsnr ++++ b/heartbeat/oralsnr +@@ -25,6 +25,7 @@ + # OCF_RESKEY_home (optional; else read it from /etc/oratab) + # OCF_RESKEY_user (optional; user to run the listener) + # OCF_RESKEY_listener (optional; defaults to LISTENER) ++# OCF_RESKEY_tns_svc_name (optional; defaults to Oracle SID) + # + # Initialization: + +@@ -44,6 +45,9 @@ OCF_RESKEY_listener_default="LISTENER" + : ${OCF_RESKEY_user=${OCF_RESKEY_user_default}} + : ${OCF_RESKEY_listener=${OCF_RESKEY_listener_default}} + ++OCF_RESKEY_tns_svc_name_default="${OCF_RESKEY_sid}" ++: ${OCF_RESKEY_tns_svc_name=${OCF_RESKEY_tns_svc_name_default}} ++ + ####################################################################### + + SH=/bin/sh +@@ -81,10 +85,10 @@ Oracle Listener instance as an HA resource. + + + +- ++ + +-The Oracle SID (aka ORACLE_SID). Necessary for the monitor op, +-i.e. to do tnsping SID. ++The Oracle SID (aka ORACLE_SID). Used for the monitor op, when ++alias is undefined i.e. to do tnsping SID. + + sid + +@@ -118,16 +122,27 @@ Defaults to LISTENER. + + + +- Full path to the directory that contains the Oracle +- listener tnsnames.ora configuration file. The shell +- variable TNS_ADMIN is set to the value provided. ++Full path to the directory that contains the Oracle ++listener tnsnames.ora configuration file. The shell ++variable TNS_ADMIN is set to the value provided. + + +- Full path to the directory containing tnsnames.ora ++Full path to the directory containing tnsnames.ora + + + + ++ ++ ++The TNS alias (aka net_service_name) to ping during the ++monitor operation. Defaults to the Oracle SID. ++ ++ ++TNS alias to ping ++ ++ ++ ++ + + + +@@ -237,11 +252,11 @@ test_listener() { + # and does it work? + test_tnsping() { + local output +- output=`tnsping $ORACLE_SID` ++ output=`tnsping ${OCF_RESKEY_tns_svc_name}` + if echo "$output" | tail -1 | grep -qs '^OK'; then + return $OCF_SUCCESS + else +- ocf_exit_reason "tnsping $ORACLE_SID failed: $output" ++ ocf_exit_reason "tnsping ${OCF_RESKEY_tns_svc_name} failed: $output" + return $OCF_ERR_GENERIC + fi + } diff --git a/resource-agents.spec b/resource-agents.spec index e52ee97..c404ad3 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -45,7 +45,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.16.0 -Release: 76%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 77%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPL-2.0-or-later AND LGPL-2.1-or-later URL: https://github.com/ClusterLabs/resource-agents Source0: %{upstream_prefix}-%{upstream_version}.tar.gz @@ -154,6 +154,7 @@ Patch101: RHEL-235065-podman-etcd-scope-sync-to-etcd-filesystem-to-avoid-CephFS- Patch102: RHEL-239956-podman-etcd-resolve-force_new_cluster-race-during-simultaneous-dual-start.patch Patch103: RHEL-239878-1-podman-etcd-add-restart_no_leave-CRM-attribute-guard-to-skip-member-removal.patch Patch104: RHEL-239878-2-podman-etcd-treat-attribute-not-found-as-empty.patch +Patch105: RHEL-139361-oralsnr-support-for-multiple-listener-per-oracle-sid.patch # bundled ha-cloud-support libs Patch500: ha-cloud-support-aliyun.patch @@ -429,6 +430,7 @@ exit 1 %patch -p1 -P 102 %patch -p1 -P 103 %patch -p1 -P 104 +%patch -p1 -P 105 # bundled ha-cloud-support libs %patch -p1 -P 500 @@ -761,6 +763,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Fri Sep 04 2026 Arslan Ahmad - 4.16.0-77 +- oralsnr: support for multiple listeners per Oracle SID + + Resolves: RHEL-139361 + * Thu Sep 3 2026 Oyvind Albrigtsen - 4.16.0-76 - podman-etcd: remove cert monitoring - podman-etcd: add support for single-node operation