Test scenario:
- Cluster starts with SC-1 as Active controller, SC-3 as Standby.
- Two applications deployed: osaftest0 (SI A) and osaftest1 (SI B).
- For safSi=B,safApp=osaftest1:
- safSu=1 (on SC-1) has Active assignment.
- safSu=2 (on SC-2) has Standby assignment.
- Network split into: [SC-1, SC-2, SC-3, SC-4, SC-5] vs [SC-6, SC-7, SC-8, SC-9, SC-10]
- SC-1 is rebooted (the Active controller holding active assignment for SI B).
- Network merged back.
- 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):
- avd_sg_2n_act_susi() scans the SG and finds:
- SI B has only one SU assigned (SU2 with standby state).
- Since SU2 is standby-only, returns: a_susi = NULL, s_susi = SU2's standby SUSI.
- Back in avd_sg_2n_su_chose_asgn(), enters the a_susi == NULL branch.
- Calls avd_sg_2n_assign_act_si() for each in-service SU.
- avd_sg_2n_assign_act_si() checks: i_si->list_of_sisu == AVD_SU_SI_REL_NULL
- But SI B already has SU2 as standby → list_of_sisu != NULL
- Condition is false → SI B is skipped
- l_flag remains false, falls through to standby assignment section.
- Standby section: i_si->list_of_sisu->si_next == NULL → true (only one SUSI).
- Creates another standby for SI B → 2 standby, 0 active!