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

A bug of detecting key pairs on cloud #44

Closed
infwinston opened this issue Nov 19, 2021 · 2 comments
Closed

A bug of detecting key pairs on cloud #44

infwinston opened this issue Nov 19, 2021 · 2 comments
Assignees

Comments

@infwinston
Copy link
Member

infwinston commented Nov 19, 2021

I was trying to launch sky from a local server but got the below error for 30mins and autoscaler failed.

ubuntu@34.219.82.43: Permission denied (publickey).                      
    SSH still not available (SSH command failed.), retrying in 5 seconds.

I investigated and found a bug in sky/authentication.py where we wrongly assume that the same sky-key is used when key.name matches.
https://github.com/concretevitamin/sky-experiments/blob/master/prototype/sky/authentication.py#L85
Turns out that sky-key is a wrong one that was uploaded from my local macbook (which I used before for running sky and generated a different sky-key than the one on the current server). We may need to identify the key by its public key value rather than its name.
@michaelzhiluo

@michaelzhiluo
Copy link
Collaborator

@infwinston After some investigation, it impossible to extract the public key from the key-pair feature in Amazon EC2, but it seems that this method could work instead: https://serverfault.com/questions/934413/how-to-verify-the-private-key-i-have-matches-aws-keypair

@michaelzhiluo
Copy link
Collaborator

This issue is technically fixed, but it raises another issue which is deleting the AWS key also mentioned in the PR.

Michaelvll added a commit that referenced this issue Dec 9, 2024
* [perf] use uv for venv creation and pip install (#4414)

* Revert "remove `uv` from runtime setup due to azure installation issue (#4401)"

This reverts commit 0b20d56.

* on azure, use --prerelease=allow to install azure-cli

* use uv venv --seed

* fix backwards compatibility

* really fix backwards compatibility

* use uv to set up controller dependencies

* fix python 3.8

* lint

* add missing file

* update comment

* split out azure-cli dep

* fix lint for dependencies

* use runpy.run_path rather than modifying sys.path

* fix cloud dependency installation commands

* lint

* Update sky/utils/controller_utils.py

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

---------

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* [Minor] README updates. (#4436)

* [Minor] README touches.

* update

* update

* make --fast robust against credential or wheel updates (#4289)

* add config_dict['config_hash'] output to write_cluster_config

* fix docstring for write_cluster_config

This used to be true, but since #2943, 'ray' is the only provisioner.
Add other keys that are now present instead.

* when using --fast, check if config_hash matches, and if not, provision

* mock hashing method in unit test

This is needed since some files in the fake file mounts don't actually exist,
like the wheel path.

* check config hash within provision with lock held

* address other PR review comments

* rename to skip_if_no_cluster_updates

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* add assert details

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* address PR comments and update docstrings

* fix test

* update docstrings

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* address PR comments

* fix lint and tests

* Update sky/backends/cloud_vm_ray_backend.py

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* refactor skip_if_no_cluster_update var

* clarify comment

* format exception

---------

Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>

* format

* format

* format

* fix

---------

Co-authored-by: Christopher Cooper <cooperc@assemblesys.com>
Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
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

No branches or pull requests

2 participants