akash-network / support

Akash Support and Issue Tracking
5 stars 4 forks source link

akash provider lease-shell and the way it handles EOF #41

Open arno01 opened 2 years ago

arno01 commented 2 years ago

akash v0.16.4-rc2.

There are different use-cases getting broken due to the way akash provider lease-shell handles EOF.

  1. Can upload the data into the container using this command, despite the error:
$ tar -cf - -C /usr/share -- info | akash provider lease-shell --stdin app1 -- tar -xf - -C /root
Error: EOF: failed while reading from stdin
  1. When passing "z" flag (compressed tar), it just hangs until I Ctrl+C it:
$ tar -czf - -C /usr/share -- info | akash provider lease-shell --stdin app1 -- tar -xzf - -C /root
halted by signal: interrupt

even a small file:

$ tar -czf - -C /etc -- hosts | akash provider lease-shell --stdin app1 -- tar -xzf - -C /root
halted by signal: interrupt
  1. It is waiting forever on user input (neither Ctrl+D is helping):
$ echo hi30 | akash provider lease-shell --stdin app1 -- cat -
hi30
<prompt hangs in here>
tidrolpolelsef commented 2 years ago

I think the correct behavior here would be

  1. --stdin close when EOF is received by the local process
  2. --tty - expect interactive console with user input
andy108369 commented 1 year ago

Todo

andy108369 commented 1 year ago

Have tested provider & client both running provider-services 0.1.1-rc1, results are the same.

andy108369 commented 1 year ago

the issue still persists:

provider-services v0.2.1

[10390294-1-1-ssh]$ tar -cf - -C /usr/share -- info | provider-services lease-shell --stdin -- ssh tar -xf - -C /root
Error: EOF: failed while reading from stdin

[10390294-1-1-ssh]$ tar -czf - -C /usr/share -- info | provider-services lease-shell --stdin -- ssh tar -xf - -C /root
tar: Archive is compressed. Use -z option
tar: Error is not recoverable: exiting now
Error: lease shell failed: remote process exited with code 2
tar: -: Wrote only 8192 of 10240 bytes
tar: Child returned status 141
tar: Error is not recoverable: exiting now

[10390294-1-1-ssh]$ tar -czf - -C /etc -- hosts | provider-services lease-shell --stdin -- ssh tar -xf - -C /root
<hangs here>