Skip to content
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

Add error message for rsync not found in image #2250

Merged
merged 4 commits into from
Jul 20, 2023

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Jul 16, 2023

This PR partially fixes #1603 by adding an error message that indicates rsync is not found in the specified image, so that users don't need to dive deep into SkyPilot code to figure out why.

#1641 and #1910 will add cloud-init support for GCP and Azure. After these two are merged, we could have a new PR to add the installation of rsync.

An example of the error message:

(sky-dev) ➜  skypilot git:(fix-rsync-not-exist) ✗ sky launch --cloud gcp --image-id projects/skypilot-375900/global/images/no-rsync-centos
I 07-16 14:41:11 optimizer.py:636] == Optimizer ==
I 07-16 14:41:11 optimizer.py:648] Target: minimizing cost
I 07-16 14:41:11 optimizer.py:659] Estimated cost: $0.4 / hour
I 07-16 14:41:11 optimizer.py:659] 
I 07-16 14:41:11 optimizer.py:733] Considered resources (1 node):
I 07-16 14:41:11 optimizer.py:781] --------------------------------------------------------------------------------------------
I 07-16 14:41:11 optimizer.py:781]  CLOUD   INSTANCE        vCPUs   Mem(GB)   ACCELERATORS   REGION/ZONE   COST ($)   CHOSEN   
I 07-16 14:41:11 optimizer.py:781] --------------------------------------------------------------------------------------------
I 07-16 14:41:11 optimizer.py:781]  GCP     n2-standard-8   8       32        -              us-central1   0.39          ✔     
I 07-16 14:41:11 optimizer.py:781] --------------------------------------------------------------------------------------------
I 07-16 14:41:11 optimizer.py:781] 
Launching a new cluster 'sky-aae9-memory'. Proceed? [Y/n]: 
I 07-16 14:41:20 cloud_vm_ray_backend.py:3884] Creating a new cluster: "sky-aae9-memory" [1x GCP(n2-standard-8, image_id={'us-central1': 'projects/skypilot-375900/global/images/no-rsync-centos'})].
I 07-16 14:41:20 cloud_vm_ray_backend.py:3884] Tip: to reuse an existing cluster, specify --cluster (-c). Run `sky status` to see existing clusters.
I 07-16 14:41:23 cloud_vm_ray_backend.py:1390] To view detailed progress: tail -n100 -f /home/memory/sky_logs/sky-2023-07-16-14-40-38-712846/provision.log
I 07-16 14:41:26 cloud_vm_ray_backend.py:1743] Launching on GCP us-central1 (us-central1-a)
I 07-16 14:42:10 cloud_vm_ray_backend.py:1802] Skipping retry due to `rsync` not found in the specified image.
Clusters
NAME             LAUNCHED     RESOURCES                                                                  STATUS  AUTOSTOP  COMMAND                       
sky-aae9-memory  45 secs ago  1x GCP(n2-standard-8, image_id={'us-central1': 'projects/skypilot-3759...  INIT    -         sky launch --cloud gcp --...  

RuntimeError: rsync is not installed on the specific image. Please install rsync and try again.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • sky launch --cloud gcp --image-id <some image without rsync>
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

@cblmemo cblmemo changed the title Add error message for rsync not found in image & install rsync through cloud-init on supported cloud Add error message for rsync not found in image Jul 16, 2023
Copy link
Collaborator

@Michaelvll Michaelvll 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 the improvement of the UX @cblmemo! Left two comments.

sky/backends/cloud_vm_ray_backend.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Michaelvll Michaelvll 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 adding this @cblmemo! LGTM.

@cblmemo cblmemo merged commit 3ae63b2 into skypilot-org:master Jul 20, 2023
@cblmemo cblmemo deleted the fix-rsync-not-exist branch July 20, 2023 06:22
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.

sky launch fails when rsync is not installed in the custom image
2 participants