-
Notifications
You must be signed in to change notification settings - Fork 716
[Docker] Add retry for docker pull due to daemon not ready #3218
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! it looks mostly great to me. Left a comment on exception type
'1> /dev/null 2>&1 || ' | ||
f'{self.docker_cmd} pull {specific_image}') | ||
break | ||
except click.ClickException as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it click.ClickException? Should we catch broad exception here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the exception raised by the underlying command runner when the command fails. It might be a better practice to only catch the exception that is raised by the underlying function.
sky/templates/gcp-ray.yml.j2
Outdated
{%- if docker_login_config is not none %} | ||
docker_login_config: | ||
username: {{docker_login_config.username}} | ||
password: {{docker_login_config.password}} | ||
server: {{docker_login_config.server}} | ||
{%- endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to make sure, we don't have gcp docker support w/ new provisioner until this PR..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea... the private docker support does not work for GCP and Azure before this. We should probably add a smoke test for private docker image. Could you help file an issue and look into this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…org#3218) * Add retry for docker pull due to daemon not ready * longer wait time * longer wait time * retry earlier * add retry for retries as well * longer wait time * change wait time * format * Add comment * Fix * Fix indent for azure docker config * Fix docker login config * Fix comments * More robust docker login config * Add retry for docker check * minor fix * Add additional test for stop and start with docker * Fix cancelled
* initial commit * newline * comments * run linter * reminder for down * tentatively done with example * formatting * yapf * [Storage] Storage mounting tool permissions fix (#3215) * fix permissions * fix permissions * [LLM] Example for Serving Gemma (#3207) * Add serve for gemma and fix mixtral dependency * Add hf token * fix model len * Add comment * Serve your private gemma * fix serve yaml * readme * Remove chat completion due to the wrong template * add readme * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * address comments * Update README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Change to it * Add chat API * use HF_TOKEN env * typo --------- Co-authored-by: Zongheng Yang <[email protected]> * [LLM] Add logo for Gemma (#3220) * Minor fixes for release 0.5.0 (#3212) * when removing cudo credential, sky check fails * remove tips * minor hint fix * fix cluster version for k8s * fix typo * [Docker] Add retry for docker pull due to daemon not ready (#3218) * Add retry for docker pull due to daemon not ready * longer wait time * longer wait time * retry earlier * add retry for retries as well * longer wait time * change wait time * format * Add comment * Fix * Fix indent for azure docker config * Fix docker login config * Fix comments * More robust docker login config * Add retry for docker check * minor fix * Add additional test for stop and start with docker * Fix cancelled * added comments * quick fix * finished pip issues * fix * fix storage error message, add example link to docs --------- Co-authored-by: Sheth <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]> Co-authored-by: Zhanghao Wu <[email protected]> Co-authored-by: Zongheng Yang <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]>
* initial commit * newline * comments * run linter * reminder for down * tentatively done with example * formatting * yapf * [Storage] Storage mounting tool permissions fix (#3215) * fix permissions * fix permissions * [LLM] Example for Serving Gemma (#3207) * Add serve for gemma and fix mixtral dependency * Add hf token * fix model len * Add comment * Serve your private gemma * fix serve yaml * readme * Remove chat completion due to the wrong template * add readme * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * address comments * Update README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Change to it * Add chat API * use HF_TOKEN env * typo --------- Co-authored-by: Zongheng Yang <[email protected]> * [LLM] Add logo for Gemma (#3220) * Minor fixes for release 0.5.0 (#3212) * when removing cudo credential, sky check fails * remove tips * minor hint fix * fix cluster version for k8s * fix typo * [Docker] Add retry for docker pull due to daemon not ready (#3218) * Add retry for docker pull due to daemon not ready * longer wait time * longer wait time * retry earlier * add retry for retries as well * longer wait time * change wait time * format * Add comment * Fix * Fix indent for azure docker config * Fix docker login config * Fix comments * More robust docker login config * Add retry for docker check * minor fix * Add additional test for stop and start with docker * Fix cancelled * added comments * quick fix * finished pip issues * fix * fix storage error message, add example link to docs * logging for SSH when doing kubernetes provision * romil edits * took out todo commnt * removed extra file * renamed file * restored right version of file * simplify things * newline * more formatting * formatting * minor fixes * set x and logging * fixes * docstr --------- Co-authored-by: Sheth <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]> Co-authored-by: Zhanghao Wu <[email protected]> Co-authored-by: Zongheng Yang <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]>
* initial commit * newline * comments * run linter * reminder for down * tentatively done with example * formatting * yapf * [Storage] Storage mounting tool permissions fix (#3215) * fix permissions * fix permissions * [LLM] Example for Serving Gemma (#3207) * Add serve for gemma and fix mixtral dependency * Add hf token * fix model len * Add comment * Serve your private gemma * fix serve yaml * readme * Remove chat completion due to the wrong template * add readme * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * address comments * Update README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Change to it * Add chat API * use HF_TOKEN env * typo --------- Co-authored-by: Zongheng Yang <[email protected]> * [LLM] Add logo for Gemma (#3220) * Minor fixes for release 0.5.0 (#3212) * when removing cudo credential, sky check fails * remove tips * minor hint fix * fix cluster version for k8s * fix typo * [Docker] Add retry for docker pull due to daemon not ready (#3218) * Add retry for docker pull due to daemon not ready * longer wait time * longer wait time * retry earlier * add retry for retries as well * longer wait time * change wait time * format * Add comment * Fix * Fix indent for azure docker config * Fix docker login config * Fix comments * More robust docker login config * Add retry for docker check * minor fix * Add additional test for stop and start with docker * Fix cancelled * added comments * quick fix * finished pip issues * fix * fix storage error message, add example link to docs * changed error message if default nc installed on mac * refactored check_port_forward_mode_dependencies function * update comment --------- Co-authored-by: Sheth <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]> Co-authored-by: Zhanghao Wu <[email protected]> Co-authored-by: Zongheng Yang <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]>
* initial commit * newline * comments * run linter * reminder for down * tentatively done with example * formatting * yapf * [Storage] Storage mounting tool permissions fix (#3215) * fix permissions * fix permissions * [LLM] Example for Serving Gemma (#3207) * Add serve for gemma and fix mixtral dependency * Add hf token * fix model len * Add comment * Serve your private gemma * fix serve yaml * readme * Remove chat completion due to the wrong template * add readme * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * address comments * Update README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Update llm/gemma/README.md Co-authored-by: Zongheng Yang <[email protected]> * Change to it * Add chat API * use HF_TOKEN env * typo --------- Co-authored-by: Zongheng Yang <[email protected]> * [LLM] Add logo for Gemma (#3220) * Minor fixes for release 0.5.0 (#3212) * when removing cudo credential, sky check fails * remove tips * minor hint fix * fix cluster version for k8s * fix typo * [Docker] Add retry for docker pull due to daemon not ready (#3218) * Add retry for docker pull due to daemon not ready * longer wait time * longer wait time * retry earlier * add retry for retries as well * longer wait time * change wait time * format * Add comment * Fix * Fix indent for azure docker config * Fix docker login config * Fix comments * More robust docker login config * Add retry for docker check * minor fix * Add additional test for stop and start with docker * Fix cancelled * added comments * quick fix * finished pip issues * fix * fix storage error message, add example link to docs * prototype for gcs * removed non git files * rclone support for aws * minor formatting fix * fixed merge conflict * fixed merge conflict * fixed merge conflict * reset perf example * reset perf example * added tests for rclone functionality * update rclone vfs options * testing * test * test * update rclone config and rclone command options * nit refactor * rclone refactor * nit * update MOUNT_CACHE mode to MOUNT_CACHED mode * update smoke test * additional comments for mount cached command explaining options for rclone vfs mode * rclone class doc-string fix * nit format * update step 7 of maybe_translate_local_file_mounts_and_sync_up * Run rclone in the background so it does not hang with rclone log * update log path * R2 support * Support Azure Blob Storage * format * minor fixes * add max cache size, correctly mount cached in managed jobs * change log to info level * wip script to check for if vfs cache is flushed * flushed out design for flush wait logic * use hashed mount path for cache/logs to avoid collision * review feedback, test just running rclone as daemon * remainder of feedback * Update sky/data/mounting_utils.py Co-authored-by: Christopher Cooper <[email protected]> * change storage test bucket name * remove cached code outside of if * only test rclone cmd when cached mount is there * add cached mount to storage md * one more test refactor * nofail * better match * use deterministic hashing * more refactor --------- Co-authored-by: Sheth <[email protected]> Co-authored-by: Hriday Sheth <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]> Co-authored-by: Zhanghao Wu <[email protected]> Co-authored-by: Zongheng Yang <[email protected]> Co-authored-by: Romil Bhardwaj <[email protected]> Co-authored-by: Seung Jin <[email protected]> Co-authored-by: Christopher Cooper <[email protected]>
pytest tests/test_smoke.py::test_job_queue_with_docker --azure
fails becauseray cluster
fail to start on the remote machine. Logs: https://gist.github.com/Michaelvll/4528e47faa9a008e1b204ea8b6873947The main reason is that the
docker pull
fails due to the docker daemon not ready when the cluster is just up, and our retry in cloud_vm_ray_backend triesray up
again with--no-restart
passed, which causes the ray cluster fail to start due to some bug in ray.skypilot/sky/backends/cloud_vm_ray_backend.py
Lines 1832 to 1843 in ad755df
In this PR, we retry the
docker pull
when the cluster is just up, so it does not error out and trigger that retry.Future TODO:
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
pytest tests/test_smoke.py::test_job_queue_with_docker --azure
for three times and checked that there is no retrypytest tests/test_smoke.py::test_job_queue_with_docker --aws
pytest tests/test_smoke.py::test_job_queue_with_docker --gcp
sky launch -c test-docker --cloud azure --cpus 2 ./test.yaml
with private docker image on awssky launch -c test-docker --cloud gcp --cpus 2 ./test.yaml
with private docker image on awsbash tests/backward_comaptibility_tests.sh