dump_offload: prevent connection rejection from terminating active of… - #1513
Open
abhilashraju wants to merge 1 commit into
Open
dump_offload: prevent connection rejection from terminating active of…#1513abhilashraju wants to merge 1 commit into
abhilashraju wants to merge 1 commit into
Conversation
Contributor
|
Changes looks good. |
Contributor
|
https://jazz07.rchland.ibm.com:13443/jazz/web/projects/CSSD#action=com.ibm.team.workitem.viewWorkItem&id=807208 is the defect this fix is for. |
Contributor
|
@abhilashraju there seems to be clang formatting issues that CI is reporting. Can you check and resolve? |
…fload When a dump offload is already in progress, any subsequent offload request is rejected with a "503 Service Unavailable" error and the rejected connection is closed. However, since `bmcweb` runs on a single thread and uses a shared static `systemHandlers` pointer, the `.onclose` callback (which is registered for all connections on the dump attachment route) gets triggered when the newly rejected connection is closed. Since `systemHandlers` is not null, the callback would execute the cleanup logic, cancel active async socket reads, remove socket files, and nullify `systemHandlers`. This abruptly terminates the ongoing (first) offload transfer and leaves subsequent attempts wedged. This commit resolves the issue by verifying if the connection being closed (`conn`) matches the active connection registered in the active handler (`systemHandlers->connection`). If the closed connection is a non-active connection (such as a rejected parallel request), the cleanup logic is skipped and the handler remains active. Tested: 1. Initiated a non-disruptive system dump offload from ASMI. 2. Attempted a second offload from a new ASMI tab/browser. 3. Verified the second request is gracefully rejected with a 503 Service Unavailable without interrupting the first active offload which continues to completion. 4. Subsequent offloads can be successfully initiated and completed. Signed-off-by: Abhilash Raju <abhilash.kollam@gmail.com>
abhilashraju
force-pushed
the
fix_for_807208_dump_offload
branch
from
August 19, 2026 17:19
da39e01 to
712f382
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…fload
When a dump offload is already in progress, any subsequent offload request is rejected with a "503 Service Unavailable" error and the rejected connection is closed.
However, bmcweb uses a shared static
systemHandlerspointer, the.onclosecallback (which is registered for all connections on the dump attachment route) gets triggered when the newly rejected connection is closed. SincesystemHandlersis not null, the callback would execute the cleanup logic, cancel active async socket reads, remove socket files, and nullifysystemHandlers. This abruptly terminates the ongoing (first) offload transfer and leaves subsequent attempts wedged.This commit resolves the issue by verifying if the connection being closed (
conn) matches the active connection registered in the active handler (systemHandlers->connection). If the closed connection is a non-active connection (such as a rejected parallel request), the cleanup logic is skipped and the handler remains active.Tested: