|
From: Thien H. <thi...@en...> - 2025-11-17 10:17:44
|
Hi Thang,
ACK from me.
Best Regards,
Thien
________________________________
From: Thang Nguyen <tha...@en...>
Sent: Monday, November 10, 2025 7:58 AM
To: Thien Huynh <thi...@en...>; Dat Phan <Dat...@en...>; Tai Nguyen <tai...@en...>
Cc: ope...@li... <ope...@li...>; Thang Nguyen <tha...@en...>
Subject: [PATCH 1/1] amf: correct role failover failed [#3383]
Currently role failover from standby to active
does not handle error return code correctly. It
causes there is no AMF-OI for AMF objects.
The fix is to correct handle the error return code
so that AMF can be recovered automatically.
---
src/amf/amfd/role.cc | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/amf/amfd/role.cc b/src/amf/amfd/role.cc
index f74bd689f..1d7e16303 100644
--- a/src/amf/amfd/role.cc
+++ b/src/amf/amfd/role.cc
@@ -454,8 +454,11 @@ static uint32_t avd_role_failover(AVD_CL_CB *cb, SaAmfHAStateT role) {
on Avd role. */
if (rc == SA_AIS_ERR_BAD_HANDLE) {
avd_imm_reinit_bg();
- } else
+ } else {
+ avd_d2d_chg_role_rsp(cb, NCSCC_RC_FAILURE, SA_AMF_HA_ACTIVE);
+ status = NCSCC_RC_FAILURE;
goto done;
+ }
}
/* Time to send fail-over messages to all the AVND's */
@@ -480,12 +483,11 @@ static uint32_t avd_role_failover(AVD_CL_CB *cb, SaAmfHAStateT role) {
LOG_ER("FAILOVER StandBy --> Active FAILED, ImplementerSet failed %u", rc);
if (rc == SA_AIS_ERR_BAD_HANDLE) {
avd_imm_reinit_bg();
- } else if (rc == SA_AIS_ERR_EXIST) {
- /* This may arise if immutil_saImmOiImplementerClear
- failed and amf reinitializes imm interface and
- set impl in avd_imm_reinit_bg_thread.*/
- } else
+ } else {
+ avd_d2d_chg_role_rsp(cb, NCSCC_RC_FAILURE, SA_AMF_HA_ACTIVE);
+ status = NCSCC_RC_FAILURE;
goto done;
+ }
} else
osaf_mutex_unlock_ordie(&imm_reinit_mutex);
--
2.48.1
The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Any opinions expressed are mine and do not necessarily represent the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited and may be unlawful. If you have received this message in error, do not open any attachments but please notify the Endava Service Desk on (+44 (0)870 423 0187), and delete this message from your system. The sender accepts no responsibility for information, errors or omissions in this email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If in doubt, please verify the authenticity of the contents with the sender. Please rely on your own virus checkers as no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
Endava plc is a company registered in England under company number 5722669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, United Kingdom. Endava plc is the Endava group holding company and does not provide any services to clients. Each of Endava plc and its subsidiaries is a separate legal entity and has no liability for another such entity's acts or omissions.
|