-
Notifications
You must be signed in to change notification settings - Fork 606
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
Fix panic when stdout is not a tty #3300
Conversation
Signed-off-by: apostasie <[email protected]>
0b6c787
to
7f05aad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
The case I have is using -t in a systemd unit: Sep 15 01:43:26 sbc21n1-mke dns-master-internal[157367]: panic: provided file is not a console |
@alitvak69 this here is a pull request, not an issue. Also, you do not mention a version, or any other os detail and info, or give a concrete way to reproduce your problem. Either way, suggesting you open a ticket if you have an issue, with enough info to make it actionnable. |
As outlined in containerd#3433, containerd/console will panic on a call to console.Current(). This patch provides a simple consoleutil wrapper that will return an error instead. Note that part of containerd#3300 is being reverted, as no longer necessary. This patch does not try to be "smart" and does not check the status of stdin/out/err otherwise or if it is consistent with user provided flags, but merely ensures we do not crash. Signed-off-by: apostasie <[email protected]>
As outlined in containerd#3433, containerd/console will panic on a call to console.Current(). This patch provides a simple consoleutil wrapper that will return an error instead. Note that part of containerd#3300 is being reverted, as no longer necessary. This patch does not try to be "smart" and does not check the status of stdin/out/err otherwise or if it is consistent with user provided flags, but merely ensures we do not crash. Signed-off-by: apostasie <[email protected]>
As outlined in containerd#3433, containerd/console will panic on a call to console.Current(). This patch provides a simple consoleutil wrapper that will return an error instead. Note that part of containerd#3300 is being reverted, as no longer necessary. This patch does not try to be "smart" and does not check the status of stdin/out/err otherwise or if it is consistent with user provided flags, but merely ensures we do not crash. Signed-off-by: apostasie <[email protected]>
As outlined in containerd#3433, containerd/console will panic on a call to console.Current(). This patch provides a simple consoleutil wrapper that will return an error instead. Note that part of containerd#3300 is being reverted, as no longer necessary. This patch does not try to be "smart" and does not check the status of stdin/out/err otherwise or if it is consistent with user provided flags, but merely ensures we do not crash. Signed-off-by: apostasie <[email protected]>
As outlined in containerd#3433, containerd/console will panic on a call to console.Current(). This patch provides a simple consoleutil wrapper that will return an error instead. Note that part of containerd#3300 is being reverted, as no longer necessary. This patch does not try to be "smart" and does not check the status of stdin/out/err otherwise or if it is consistent with user provided flags, but merely ensures we do not crash. Signed-off-by: apostasie <[email protected]>
Tentatively fix rootless-containers/usernetes#327 - if that PR unblocks it, my job is done here :).
And some of #3297 is likely fixed as well.
Now, I am pretty sure there are other conditions where we still panic.
I would rather leave this to someone who is more knowledgeable on these areas though (including writing exhaustive tests).