Skip to content

fix: wait_for_termination returns actual exit status - #1265

Open
sweb wants to merge 2 commits into
mainfrom
fix/wait-for-term-exit-code
Open

fix: wait_for_termination returns actual exit status#1265
sweb wants to merge 2 commits into
mainfrom
fix/wait-for-term-exit-code

Conversation

@sweb

@sweb sweb commented Aug 21, 2026

Copy link
Copy Markdown
Member

Description

since set -e is the last part of wait_for_termination it always has exit code 0. With this, it returns the exit code of the process it is waiting for instead. [ "${term_child_pid}" ] blows up when the child pid is not set yet, so gets changed to [ -n "${term_child_pid:-}" ].

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added

@sweb
sweb force-pushed the fix/wait-for-term-exit-code branch from 84f3d65 to 399c93f Compare August 21, 2026 11:42
@sweb
sweb force-pushed the fix/wait-for-term-exit-code branch from dd6cb82 to 4e5b186 Compare August 21, 2026 12:27
@sweb sweb moved this to Development: Waiting for Review in Stackable Engineering Aug 21, 2026
@lfrancke

Copy link
Copy Markdown
Member

Ah...we just had the same/similar in stackabletech/stackable-utils#130

It's an annoying trap.

@sweb

sweb commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

Ah...we just had the same/similar in stackabletech/stackable-utils#130

It's an annoying trap.

in this context, it is not a huge deal - from what I checked it does not interfere with OOM based restarts or something like that - but getting the actual exit codes may be nice and should be an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

2 participants