Fix Celery worker liveness probe hostname lookup#67471
Merged
jscheffl merged 3 commits intoMay 26, 2026
Merged
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
henry3260
requested changes
May 25, 2026
ashb
reviewed
May 25, 2026
This was referenced May 26, 2026
jscheffl
approved these changes
May 26, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Contributor
Backport successfully created: chart/v1-2x-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
jscheffl
pushed a commit
that referenced
this pull request
May 26, 2026
…67471) (#67558) * Fix Celery worker liveness probe hostname lookup * Add chart newsfragment for Celery liveness probe fix * Address review feedback for Celery liveness probe fix (cherry picked from commit eacbd69) Co-authored-by: Manan Bhatt <[email protected]>
29 tasks
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.
Description
The default Celery worker liveness probe currently builds the Celery node name with the OS-level
hostnameexecutable:celery inspect ping -d celery@$(hostname)Some minimal container images do not include that executable, which makes the probe fail before it can check whether the Celery worker is alive.
This keeps the same behavior of targeting the worker container's hostname, but reads it with Python's standard
socket.gethostname()instead:celery inspect ping -d celery@$(python -c 'import socket; print(socket.gethostname())')The probe already depends on Python to run Celery, so this avoids adding another OS binary requirement. Kubernetes also documents that the container hostname is available through the
gethostnamefunction call: https://kubernetes.io/docs/concepts/containers/container-environment/Testing
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI assistant following https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions