Skip to content

Commit

Permalink
Don't use tty in remote exec
Browse files Browse the repository at this point in the history
virtctl vnc didn't work with CRI-O, because the remote exec command in
virt-api converted LFs into CR + LF, which broke the VNC network protocol.
The root cause for this is that this seems to be a default behaviour
of tty, see moby/moby#8513 (comment).
The solution is to not use tty, we don't need it.
(Still unclear why this only happened with CRI-O)

Signed-off-by: Marc Sluiter <[email protected]>
  • Loading branch information
slintes authored and Marc Sluiter committed Sep 17, 2018
1 parent 852421e commit 566065a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cmd/virt-launcher/sock-connector
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ if ! [ -S "$SOCKET" ]; then
exit 1
fi

stty -echo
socat unix-connect:/$SOCKET stdio,cfmakeraw
socat unix-connect:/$SOCKET stdio
2 changes: 1 addition & 1 deletion pkg/virt-api/rest/subresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func remoteExecHelper(podName string, namespace string, cmd []string, in io.Read
Stdin: true,
Stdout: true,
Stderr: true,
TTY: true,
TTY: false,
}, scheme.ParameterCodec)

// execute request
Expand Down

0 comments on commit 566065a

Please sign in to comment.