Skip to content
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

Podman 2.x client on Windows keeps complaining about: "Failed to set console mode for cli" #9100

Closed
gbraad opened this issue Jan 26, 2021 · 2 comments
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@gbraad
Copy link
Member

gbraad commented Jan 26, 2021

When trying to use PowerShell with podman remote, I noticed the client will always error with: Failed to set console mode for cli. This doesn't happen when using the Command Prompt.

PS> ./podman ps
time="2021-01-26T14:28:58+08:00" level=error msg="Failed to set console mode for cli" error="The parameter is incorrect."
CONTAINER ID  IMAGE   COMMAND  CREATED  STATUS  PORTS   NAMES
PS> ./podman version
time="2021-01-26T14:29:15+08:00" level=error msg="Failed to set console mode for cli" error="The parameter is incorrect."
Client:
Version:      2.0.6
API Version:  1
Go Version:   go1.14.6
Git Commit:   27362ba1ad8879ea71610fa68a651a1651e0180f
Built:        Wed Sep  2 01:08:00 2020
OS/Arch:      windows/amd64

Server:
Version:      2.0.5
API Version:  0
Go Version:   go1.14.7
Built:        Thu Sep 24 00:18:02 2020
OS/Arch:      linux/amd64

func setConsoleMode(handle windows.Handle, flags uint32) error {
var mode uint32
err := windows.GetConsoleMode(handle, &mode)
if err != nil {
return err
}
if err := windows.SetConsoleMode(handle, mode|flags); err != nil {
// In similar code, it is not considered an error if we cannot set the
// console mode. Following same line of thinking here.
logrus.WithError(err).Error("Failed to set console mode for cli")
}
return nil
}

@gbraad
Copy link
Member Author

gbraad commented Jan 26, 2021

Should this message not be of the Debug or Info loglevel instead, as it does not seem to affect the usability of the client.

@gbraad
Copy link
Member Author

gbraad commented Jan 26, 2021

Did a find-module psreadline | install-module and this error seems to have disappeared. Though, this is not a default.

openshift-merge-robot added a commit that referenced this issue Jan 27, 2021
Fix #9100 Change console mode message to debug
mheon pushed a commit to mheon/libpod that referenced this issue Feb 4, 2021
[NO TESTS NEEDED]

Signed-off-by: Gerard Braad <me@gbraad.nl>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

1 participant