devpod
devpod copied to clipboard
DevPod ssh provider not working after tlog is enabled
What happened?
DevPod ssh provider not working after tlog is enabled for user session, by replacing '/bin/bash' with '/usr/bin/tlog-rec-session' in /etc/passwd file.
Got this error at the very end: [10:03:59] debug execute inject script [10:03:59] debug download agent from https://github.com/loft-sh/devpod/releases/download/v0.3.7 [10:03:59] debug Run command provider command: ${SSH_PROVIDER} command [10:04:00] debug Received line after pong: done [10:04:00] info ATTENTION! Your session is being recorded! [10:04:00] debug done inject [10:04:00] debug done injecting [10:04:00] debug Done executing up command [10:04:00] debug Done InjectAgentAndExecute [10:04:00] debug Done creating devcontainer [10:04:00] fatal didn't receive a result back from agent
What did you expect to happen instead?
DevPod ssh provider should work even if 'tlog' is enabled.
How can we reproduce the bug? (as minimally and precisely as possible)
Any default devpod example project would fail the same with ssh provider.
'tlog' is this github project: https://github.com/Scribery/tlog. After installing tlog, enable it for testing userid by replacing its shell, for example, '/bin/bash' with '/usr/bin/tlog-rec-session' in the /etc/passwd file.
Local Environment:
- DevPod Version: 0.3.7
- Operating System: linux
- ARCH of the OS: AMD64
DevPod Provider:
- Cloud Provider: ssh
- Local/remote provider: ssh
Anything else we need to know?
N/A
@haiwu thanks for creating this issue! Is tlog POSIX compatible? Does it print ATTENTION! Your session is being recorded!
on stdout when opening it?
@FabianKramm: I am not sure if tlog is strictly POSIX compatible, it does call various Linux syscalls. Yes it does print ATTENTION! Your session is being recorded!
on stdout when ssh opening it.
@haiwu is there anyway to prevent tlog from printing that? Since Devpod uses stdout to inject itself into the host, it requires that the shell that is used is not printing anything initially on stdout
@FabianKramm : I just tested, there's no way to prevent tlog from printing that. It would fail even if I set its config entry in /etc/tlog/tlog-rec-session.conf
like this:
"notice" : "",
Is it possible to configure DevPod to ignore certain printout like this in stdout?
Hi @haiwu ,
I found that commenting the line as //"notice" : "",
suppresses the notice on login. This does not fix the issue though, checking more into that,
This should now be fixed by https://github.com/loft-sh/devpod-provider-ssh/commit/b6212bf94fefc6886c19da1ca5ecdf4c4808d1d4