-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
SSH exception after reboot #1194
Comments
Also having this issue and it is quite blocking (unless you know some workarounds). |
Took a look at the stack trace and pyinfra sources. I see once the reboot happens the /tmp pyinfra files are lost. So I'm not sure if the pyinfra client keeps the state locally or it relies on the remote host's /tmp files to reload it but the reboot causes it to be lost. As the next operation following the reboot cannot access the hosts anymore, it thinks the facts are empty. Found this workaround:
Since this looks like a workaround to me, is there any way to refresh the state while still in the initial CLI call? |
Describe the bug
After a successful reboot the next operation fails with:
Command socket/SSH error: SSHException('SSH session not active',)
To Reproduce
In my case:
Target system information:
both have the same problem
Expected behavior
After successful reboot, follow operations succeed, too.
Meta
System: Linux
Platform: Linux-6.8.0-41-generic-x86_64-with-glibc2.39
Release: 6.8.0-41-generic
Machine: x86_64
pyinfra: v3.1
click: v8.1.7
configparser: v7.1.0
distro: v1.9.0
gevent: v24.2.1
jinja2: v3.1.4
packaging: v24.1
paramiko: v3.4.1
python-dateutil: v2.9.0.post0
pywinrm: v0.5.0
setuptools: v74.0.0
typeguard: v4.3.0
typing-extensions: v4.12.2
Executable: venv/bin/pyinfra
Python: 3.12.3 (CPython, GCC 13.2.0)
pyinfra installed via: pip
Include debug.log(if one was created)
The text was updated successfully, but these errors were encountered: