Skip to content

entrypoint.sh uses bash-only wait -n under #!/bin/sh shebang breaking Alpine/busybox containers #7803

@aashu2006

Description

@aashu2006

User Request

Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 2652ac39-2fc2-49c0-975d-cf6bd2bc3dfb

Description

What happened:
In entrypoint.sh:1 and 27, the script declares #!/bin/sh but uses wait -n $BACKEND_PID $WATCHDOG_PID 2>/dev/null || wait $BACKEND_PID. wait -n is a bash extension not in POSIX sh. On Alpine-based Docker images where /bin/sh is busybox or ash, wait -n is unrecognised and 2>/dev/null silently swallows the error, falling through to || wait $BACKEND_PID and breaking the intended "exit when either process dies" behavior.

What I expected:
Either change the shebang to #!/bin/bash or rewrite the wait logic using POSIX-compatible constructs.

Steps to reproduce:

  1. Run entrypoint.sh in an Alpine container where /bin/sh is busybox
  2. Observe incorrect shutdown behavior when either process dies

This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedai-processingAI is currently processing this issuekind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions