* feat: support stdin_open and tty
This can be useful to leave a container running without specifying a
command like `sleep`, and probably in other situations as well.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Complete full spec test case
Signed-off-by: Miek Gieben <miek@miek.nl>
* fix container log streaming for containers with TTY
---------
Signed-off-by: Miek Gieben <miek@miek.nl>
Co-authored-by: Pasha Sviderski <me@psviderski.name>
For feature parity with uc. Only _really_ usefull for ucind cluster rm,
but still useful, and not many lines of code.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Allow for argument completion
This shows for a single command on how to complete service names in the
cluster: `uc inspect <TAB>` will complete using ListServices
See: #307
Signed-off-by: Miek Gieben <miek@miek.nl>
* All cluster interactions can be completed
Signed-off-by: Miek Gieben <miek@miek.nl>
* Machines -m flag completion
Signed-off-by: Miek Gieben <miek@miek.nl>
* Add completion for "ctx use"
Signed-off-by: Miek Gieben <miek@miek.nl>
* Complete from compose file too
Signed-off-by: Miek Gieben <miek@miek.nl>
* Allow for argument completion
This shows for a single command on how to complete service names in the
cluster: `uc inspect <TAB>` will complete using ListServices
See: #307
Signed-off-by: Miek Gieben <miek@miek.nl>
* All cluster interactions can be completed
Signed-off-by: Miek Gieben <miek@miek.nl>
* Machines -m flag completion
Signed-off-by: Miek Gieben <miek@miek.nl>
* Add completion for "ctx use"
Signed-off-by: Miek Gieben <miek@miek.nl>
* Complete from compose file too
Signed-off-by: Miek Gieben <miek@miek.nl>
* Move to better place
Signed-off-by: Miek Gieben <miek@miek.nl>
* Adjust imports
Signed-off-by: Miek Gieben <miek@miek.nl>
* prefix match for context too
Signed-off-by: Miek Gieben <miek@miek.nl>
---------
Signed-off-by: Miek Gieben <miek@miek.nl>
* fix: call cmd.Wait()
Even though the context is cancelled we still need to call cmd.Wait()
after a cmd.Start() to clean up the child (reap) process. Not doing so
results in a zombie journalctl.
I have manually tested this, as I'm still not sure how to e2e test for
this in a simple manner.
Before:
```
root@uncloud2:~# ps aux|grep jou
root 313 0.0 1.2 42272 23352 ? S<s Apr20 0:10 /usr/lib/systemd/systemd-journald
root 15751 0.0 0.0 0 0 pts/0 Z+ 07:02 0:00 [journalctl] <defunct>
root 15754 0.0 0.0 0 0 pts/0 Z+ 07:02 0:00 [journalctl] <defunct>
```
After:
```
root 313 0.0 1.2 42272 23592 ? S<s Apr20 0:10 /usr/lib/systemd/systemd-journald
```
* follow() doesnt need wait
We can keep the wait function more contraint, as follow does not need it
Signed-off-by: Miek Gieben <miek@miek.nl>
---------
Signed-off-by: Miek Gieben <miek@miek.nl>