Skip to content

Retry service name resolution socket.getaddrinfo several times#402

Merged
jacobtomlinson merged 4 commits intodask:mainfrom
erdnaavlis:fix-401
Feb 8, 2022
Merged

Retry service name resolution socket.getaddrinfo several times#402
jacobtomlinson merged 4 commits intodask:mainfrom
erdnaavlis:fix-401

Conversation

@erdnaavlis
Copy link
Copy Markdown
Contributor

Fixes #401


async def get_external_address_for_scheduler_service(
core_api, service, port_forward_cluster_ip=None
core_api, service, port_forward_cluster_ip=None, service_name_resolution_retries = 20
Copy link
Copy Markdown
Contributor Author

@erdnaavlis erdnaavlis Feb 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense and would like to expose service_name_resolution_retries as a config option when instantiating KubeCluster.

If you agree, any suggestion on the best way to do this is appreciated @jacobtomlinson ?

@erdnaavlis erdnaavlis marked this pull request as ready for review February 7, 2022 19:40
Copy link
Copy Markdown
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising this! I've made a few comments.

Dask has a config system that we can use.

  • Default values go in here.
  • We should also add a kwarg to the class.
  • Then set an attribute like this.
  • The attribute can then be passed on to our the get_external_address_for_scheduler_service call.

Copy link
Copy Markdown
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great thanks! Happy to merge on passing tests.

@jacobtomlinson jacobtomlinson enabled auto-merge (squash) February 8, 2022 12:27
@jacobtomlinson jacobtomlinson merged commit 812e403 into dask:main Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KubeCluster fails occasionally because it falls back to port forwarding

2 participants