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

Keys are not automatically loaded and mismanaged between providers #101

Open
blokhin opened this issue Nov 29, 2022 · 4 comments
Open

Keys are not automatically loaded and mismanaged between providers #101

blokhin opened this issue Nov 29, 2022 · 4 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@blokhin
Copy link
Member

blokhin commented Nov 29, 2022

A normal connection succeeds:

root@aiida9:~# ssh X.X.X.X
Linux labs 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64

...
root@labs:~# logout
Connection to X.X.X.X closed.

but scheduler connection fails:

root@aiida9:~# yasetnode X.X.X.X~4
Traceback (most recent call last):
  File "/usr/local/bin/yasetnode", line 8, in <module>
    sys.exit(manage_node())
  File "/usr/local/lib/python3.9/dist-packages/yascheduler/utils.py", line 430, in manage_node
    asyncio.run(_manage_node())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/dist-packages/yascheduler/utils.py", line 411, in _manage_node
    machine = await RemoteMachine.create(
  File "/usr/local/lib/python3.9/dist-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/yascheduler/remote_machine/remote_machine.py", line 192, in create
    conn = await asyncssh.connection.connect(
  File "/usr/local/lib/python3.9/dist-packages/asyncssh/connection.py", line 7834, in connect
    return await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
    return await fut
  File "/usr/local/lib/python3.9/dist-packages/asyncssh/connection.py", line 447, in _connect
    await options.waiter
asyncssh.misc.PermissionDenied: Permission denied
@blokhin blokhin added the bug Something isn't working label Nov 29, 2022
@issuelabeler issuelabeler bot added the aiida AiiDA interface label Nov 29, 2022
@blokhin blokhin added enhancement New feature or request and removed aiida AiiDA interface labels Nov 29, 2022
@blokhin
Copy link
Member Author

blokhin commented Nov 29, 2022

Another case, very frustrating:

  • allocate and connect one machine manually
  • launch a long-running task there
  • setup an API key e.g. for Hetzner
  • launch another long-running task, so that the new machine is allocated at Hetzner
  • the keys are loaded erroneously and the connection to the first machine fails:
root@aiida9:~# yastatus -v
..................................................ID68 CRYSTAL by AiiDA at [email protected]::data/tasks/20221128_235115_68
Traceback (most recent call last):
  File "/usr/local/bin/yastatus", line 8, in <module>
    sys.exit(check_status())
  File "/usr/local/lib/python3.9/dist-packages/yascheduler/utils.py", line 237, in check_status
    asyncio.run(_check_status())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/dist-packages/yascheduler/utils.py", line 148, in _check_status
    machine = await RemoteMachine.create(
  File "/usr/local/lib/python3.9/dist-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/yascheduler/remote_machine/remote_machine.py", line 192, in create
    conn = await asyncssh.connection.connect(
  File "/usr/local/lib/python3.9/dist-packages/asyncssh/connection.py", line 7834, in connect
    return await asyncio.wait_for(
  File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
    return await fut
  File "/usr/local/lib/python3.9/dist-packages/asyncssh/connection.py", line 447, in _connect
    await options.waiter
asyncssh.misc.PermissionDenied: Permission denied

@blokhin
Copy link
Member Author

blokhin commented Dec 2, 2022

@knopki please could you have a look?

@blokhin
Copy link
Member Author

blokhin commented Apr 26, 2024

Solution (FIXME?): delete keys from data_dir and retry.

@blokhin blokhin changed the title Keys are not automatically loaded Keys are not automatically loaded and mismanaged between providers Apr 27, 2024
@issuelabeler issuelabeler bot added the aiida AiiDA interface label Apr 27, 2024
@blokhin blokhin added documentation Improvements or additions to documentation help wanted Extra attention is needed and removed aiida AiiDA interface labels Apr 27, 2024
@blokhin
Copy link
Member Author

blokhin commented Jun 21, 2024

also #127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Development

No branches or pull requests

2 participants