-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use get_hostname
instead of socket.getfqdn
#24260
Conversation
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Wondering . Would that be a reason why there are entries with "nul" hostname ? I was asking the question at the development channel in slack as we seem to have repeating case where "log cannot be retrieved as hostname is missing". |
The only thing I can think of is if the worker isn't actually able to set the hostname on the TI, so it falls back to trying to get the log from the worker with "null" in that column? The log hostname side of things already used the helper, so I don't think this would help. |
Also - the proposal I had - do we EVER imagine that hostname would change mid-flight for a running process? Should we maybe ... cache it :)? |
I think the reason why sometimes, intermittently we get a null hostname is that sometimes, intermittently the getfqdn might fail with a perfectly good system otherwise. I think this happens quite often that DNS is poorly configured or overloaded in K8S and I think this might be the root cause of the "missing hostname" problems. Remember ? |
54df77a
to
4f36e8d
Compare
Looks like GitHub is having some issues. |
Reopened - github seems to be back up |
We allow users to configure a different function to determine the hostname, so we should use that consistently when we need the hostname.
Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com>
345c90b
to
98a1480
Compare
We allow users to configure a different function to determine the hostname, so we should use that consistently when we need the hostname. (cherry picked from commit e29543e)
We allow users to configure a different function to determine the
hostname, so we should use that consistently when we need the hostname.