- **status**: assigned --> fixed
- **Comment**:

commit 04efb90064441d285c35d544d4371552ef27663f (HEAD -> develop, 
origin/develop, ticket-3402)
Author: Thang Duc Nguyen <[email protected]>
Date:   Thu Jul 2 06:35:47 2026 +0000

    amf: fix SI partial assignment after split-brain recovery in roaming SC 
[#3402]

    When a roaming SC cluster experiences a split-brain and the active
    controller reboots then comes back before failover completes, an SI
    can get stuck in PARTIALLY_ASSIGNED state with two standby assignments
    and no active.

    The root cause is in avd_sg_2n_su_chose_asgn(). When avd_sg_2n_act_susi()
    returns a_susi=NULL (no active) but s_susi!=NULL (standby exists), the
    code enters the a_susi==NULL branch and calls avd_sg_2n_assign_act_si()
    for each in-service SU. However, avd_sg_2n_assign_act_si() skips any SI
    that already has a SUSI (the existing standby), so no active is assigned.
    The function then falls through to the standby section and creates a
    duplicate standby assignment.

    Fix by detecting the case where only a standby SUSI exists with no
    active, and promoting the existing standby SU to active via
    avd_sg_su_si_mod_snd() before entering the normal assignment path.
    Set the SG FSM to SG_REALIGN so that a new standby will be assigned
    to another suitable SU after the promotion completes. On send failure,
    bail out without modifying the SG FSM state to avoid deadlocking the
    FSM on a response that will never arrive.




---

**[tickets:#3402] amf: SI partial assignment after split-brain recovery**

**Status:** fixed
**Milestone:** 5.27.01
**Created:** Fri Jun 19, 2026 04:47 AM UTC by Thang Duc Nguyen
**Last Updated:** Fri Jun 19, 2026 04:47 AM UTC
**Owner:** Thang Duc Nguyen


Test scenario:
1. Cluster starts with SC-1 as Active controller, SC-3 as Standby.
2. Two applications deployed: osaftest0 (SI A) and osaftest1 (SI B).
3. For safSi=B,safApp=osaftest1:
    4. safSu=1 (on SC-1) has Active assignment.
    5. safSu=2 (on SC-2) has Standby assignment.
5. Network split into: [SC-1, SC-2, SC-3, SC-4, SC-5] vs [SC-6, SC-7, SC-8, 
SC-9, SC-10]
6. SC-1 is rebooted (the Active controller holding active assignment for SI B).
7. Network merged back.
8. Verification: SI B should be FULLY_ASSIGNED — FAILS

The issue is due to: When an SI has only a standby assignment remaining (active 
was lost due to node reboot), the function fails to promote the standby SU to 
active. Instead, it creates a duplicate standby assignment, leaving the SI 
permanently in PARTIALLY_ASSIGNED state.

The execution flow when SI B has only a standby (no active):
1. avd_sg_2n_act_susi() scans the SG and finds:
    2. SI B has only one SU assigned (SU2 with standby state).
    3. Since SU2 is standby-only, returns: a_susi = NULL, s_susi = SU2's 
standby SUSI.
3. Back in avd_sg_2n_su_chose_asgn(), enters the a_susi == NULL branch.
4. Calls avd_sg_2n_assign_act_si() for each in-service SU.
5. avd_sg_2n_assign_act_si() checks: i_si->list_of_sisu == AVD_SU_SI_REL_NULL
    6. But SI B already has SU2 as standby → list_of_sisu != NULL
    7. Condition is false → SI B is skipped
7. l_flag remains false, falls through to standby assignment section.
8. Standby section: i_si->list_of_sisu->si_next == NULL → true (only one SUSI).
9. Creates another standby for SI B → 2 standby, 0 active!



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to