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-remote: build: RUN causes [unwanted] debug output on client #6579

Closed
edsantiago opened this issue Jun 11, 2020 · 28 comments
Closed

podman-remote: build: RUN causes [unwanted] debug output on client #6579

edsantiago opened this issue Jun 11, 2020 · 28 comments
Assignees
Labels
HTTP API Bug is in RESTful API kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@edsantiago
Copy link
Member

Run podman server with debug enabled:

$ ./bin/podman --log-level=debug system service --timeout=0 $MYSOCK

Then, in another window, run a podman build using a Containerfile with a RUN:

$ mkdir a
$ echo 'FROM docker.io/library/alpine:latest' >a/Containerfile
$ echo 'RUN echo hi' >>a/Containerfile
$ ./bin/podman-remote --url $MYSOCK build a
[lots and lots of debug output from podman server]
@mheon mheon added HTTP API Bug is in RESTful API kind/bug Categorizes issue or PR as related to a bug. labels Jun 11, 2020
@baude
Copy link
Member

baude commented Jun 15, 2020

@edsantiago I do not see the debug that you see i guess... can you post an example.

$ sudo podman-remote --url unix:/run/podman/podman.sock build a
--> a24bb401329
a24bb4013296f61e89ba57005a7b3e52274d8edd3ae2077d04395f806b63d83e

FROM docker.io/library/alpine:latest
COMMIT
Successfully built a24bb4013296f61e89ba57005a7b3e52274d8edd3ae2077d04395f806b63d83e

@edsantiago
Copy link
Member Author

@baude did you run the server with --log-level=debug?

@baude
Copy link
Member

baude commented Jun 15, 2020

always do!

@edsantiago
Copy link
Member Author

I left out this because I was filing so many bugs:

$ export MYSOCK=unix:/tmp/mypodmansock

Could that be it? I am still seeing it on current master

@edsantiago
Copy link
Member Author

I can't find any way NOT to reproduce this, so I'll give a full recipe and will include logs.

In window 1:

$ ./bin/podman --log-level=debug system service --timeout=0 unix:/tmp/mypodmansock

Window 2:

$ cat a/Containerfile
FROM docker.io/library/alpine:latest
RUN echo hi
$ ./bin/podman-remote --url unix:/tmp/mypodmansock build a >6579-stdout 2>6579-stderr

All output, including debug messages, goes to 6579-stdout.txt, none to stderr.

One fact I had not noticed before is that the build (with or without --log-level=debug) results in an AVC:

type=AVC msg=audit(1592325652.218:113778): avc:  denied  { read write } for  pid=2547114 comm="sh" path="/dev/ptmx" dev="devtmpfs" ino=15713 scontext=system_u:system_r:container_t:s0:c51,c1014 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file permissive=0

f32, kernel 5.6.7-300, container-selinux-2.135.0-1.fc32

@rhatdan
Copy link
Member

rhatdan commented Jun 17, 2020

If you put the machin in permissive mode, does it fix the issue?

@rhatdan
Copy link
Member

rhatdan commented Jun 17, 2020

I am getting DEBUG Also.

@edsantiago
Copy link
Member Author

setenforce 0 makes no difference to the output seen on the client

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Jul 20, 2020

@edsantiago are you still seeing this problem?

@edsantiago
Copy link
Member Author

Still seeing it on f32, master @ 17f9b80

@rhatdan
Copy link
Member

rhatdan commented Sep 10, 2020

@edsantiago a couple of months later still an issue?

@edsantiago
Copy link
Member Author

Issue is still present, but I see no non-team watchers on the issue, so perhaps this isn't important to anyone but me.

I'm not going to be the one to close it, but I'll accept a CLOSED_NOBODYCARES from the team.

@rhatdan
Copy link
Member

rhatdan commented Sep 11, 2020

Well @jwhonce Is doing a rewrite of this section of code, so maybe it will be fixed in his next pass.

@edsantiago
Copy link
Member Author

FWIW, issue still present after #7452

@jwhonce
Copy link
Member

jwhonce commented Sep 15, 2020

@edsantiago Thanks for attaching the output. That is coming up from buildah on stderr. At the podman/libpod layer I can either ignore stderr or display it. I cannot filter because of partial writes coming out of buildah.

@rhatdan
Copy link
Member

rhatdan commented Dec 24, 2020

@edsantiago @jwhonce Is this still an issue?

@edsantiago
Copy link
Member Author

Yes, I still consider this an issue. It violates POLA for a debug flag on the server to cause debug output on the client. But as I mentioned in my September 10 comment, I will accept CLOSED_NOBODYCARES; I'm just not willing to be the one closing it.

@baude
Copy link
Member

baude commented Jan 29, 2021

@umohnani8 do you think your work on fixing the stderr/stdout munging will fix this? or completely unrelated?

@umohnani8
Copy link
Member

@baude no that doesn't target the debug level logs. Do we want those logs to output to stderr instead of stdout? I can look into fixing that if that is what we want.

@github-actions
Copy link

github-actions bot commented Mar 1, 2021

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Mar 1, 2021

@umohnani8 have you had a chance to look at this?

@umohnani8
Copy link
Member

Yeah, this was not related to the issue we had filed in buildah containers/buildah#2423. Buildah writes all debug and extra output to stderr. Maybe something to do with remote here?

@github-actions
Copy link

github-actions bot commented Apr 2, 2021

A friendly reminder that this issue had no activity for 30 days.

@github-actions
Copy link

github-actions bot commented May 6, 2021

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented May 7, 2021

I just tried this experiment and saw no output. Reopen if you have a new repeater.

@rhatdan rhatdan closed this as completed May 7, 2021
@edsantiago
Copy link
Member Author

Problem still exists on my end, but it looks like I'm the only one who finds this objectionable. I'll leave it closed until someone in the community comments.

@rhatdan
Copy link
Member

rhatdan commented May 10, 2021

Well we are having major discussions on this on another Issue or PR, between @nalind and @jwhonce on the best way to handle logrus messages in podman-remote build.

@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
HTTP API Bug is in RESTful API kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
Development

No branches or pull requests

6 participants