-
Notifications
You must be signed in to change notification settings - Fork 147
Populating the host_name field with cluster-local-ips. #1173
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
Populating the host_name field with cluster-local-ips. #1173
Conversation
|
@johnwhumphreys has exported this pull request. If you are a Meta employee, you can view the originating Diff in D88567449. |
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Differential Revision: D88567449
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Differential Revision: D88567449
3be7d89 to
6e88773
Compare
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Differential Revision: D88567449
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1173 +/- ##
==========================================
+ Coverage 91.70% 91.71% +0.01%
==========================================
Files 86 86
Lines 6653 6665 +12
==========================================
+ Hits 6101 6113 +12
Misses 552 552
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Reviewed By: AbishekS Differential Revision: D88567449
6e88773 to
b04d132
Compare
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Reviewed By: AbishekS Differential Revision: D88567449
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Reviewed By: AbishekS Differential Revision: D88567449
b04d132 to
17e1ac7
Compare
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Reviewed By: AbishekS Differential Revision: D88567449
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Note: adding extra test and resubmitting to avoid GitHub coverage block. Reviewed By: AbishekS Differential Revision: D88567449
17e1ac7 to
092156f
Compare
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Note: adding extra test and resubmitting to avoid GitHub coverage block. Reviewed By: AbishekS Differential Revision: D88567449
…1173) Summary: In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function (basically it's an implementation gap). This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns <dashed-ip>.<namespace>.cluster.local and return it. If the pod IP is not available yet, this version of the diff will simply return an empty hostname since the k8s hostname is derived from the IP. The describe API is intended to quickly return the actual state from the scheduler's POV; so returning an empty host name when the IP is not yet assigned is better than blocking until it is, which could take an arbitrary amount of time. Existing users of the API should be fine as the hostname was not populuated anyway. New users will need to implement polling until the host name is ready, if they have not already. Note: adding extra test and resubmitting to avoid GitHub coverage block. Reviewed By: AbishekS Differential Revision: D88567449
Summary:
In the current implementation, the hostname is set to empty-string in the k8s scheduler's describe function. This diff uses the k8s client to map the pod-name to its ip, and generate the pop cluster-dns ..cluster.local and return it. If it fails, it makes a best attempt at a fallback.
Note: The fallback does not match prior functionality; but diff #4 in this stack makes it fall back to empty-string and adds tests to cover this diff.
Differential Revision: D88567449