- **status**: assigned --> fixed
- **Comment**:
commit b6a168ab084725fc571ad02d7257b9921cef0934 (HEAD -> develop,
origin/develop, ticket-3401)
Author: Thang Duc Nguyen <[email protected]>
Date: Fri Jun 26 02:38:33 2026 +0000
amf: Remove CSIs at the same rank in parallel within an SI [#3401]
When removing an SI with many CSIs, the CSI removal was done
sequentially one at a time, each waiting for saAmfResponse() before
proceeding to the next. This could cause the total removal time to
exceed the default systemd TimeoutStopSec (90s) during opensafd stop.
Remove all CSIs at the same rank in parallel, similar to how CSI
assignment already handles same-rank CSIs via assign_all_csis_at_rank().
Add helper functions:
- all_csis_at_rank_removed(): check if all CSIs at a rank are done.
- remove_all_csis_at_rank(): issue removal for all CSIs at a rank.
- find_highest_rank_to_remove(): find next rank to process.
Modify avnd_su_si_remove() to call remove_all_csis_at_rank() and
find_highest_rank_to_remove() for starting the initial removal batch,
keeping a single source of truth for the rank-based removal logic.
Modify avnd_comp_csi_remove_done() to trigger the next rank batch
when the current rank batch completes using the same helpers.
For the common case where all CSIs have no dependencies (rank=1), this
reduces removal time from O(N * callback_time) to O(callback_time).
---
**[tickets:#3401] amf: CSI removal is sequential even when CSIs are at the same
rank within an SI**
**Status:** fixed
**Milestone:** 5.27.01
**Created:** Thu Jun 18, 2026 10:46 AM UTC by Thang Duc Nguyen
**Last Updated:** Thu Jun 18, 2026 10:58 AM UTC
**Owner:** Thang Duc Nguyen
Currently when amfnd removes CSI assignments from an SI, it removes CSIs one at
a time sequentially — even when multiple CSIs are at the same rank (no CSI
dependencies between them). The removal only proceeds to the next CSI after the
previous component responds to the CSI Remove callback.
For example, with 5 CSIs at the same rank assigned to 5 different components,
if each component takes 2s to respond to the CSI Remove callback, the total
removal time is ~10s (5 x 2s sequential). Since these CSIs have no dependency
relationship, they can safely be removed in parallel, reducing the total time
to ~2s.
This sequential behavior affects:
1. SI lock operations (amf-adm lock <SI>).
2. SU lock operations (amf-adm lock <SU>).
3. Node shutdown (systemctl stop opensafd).
---
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