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 --quiet outputs containers build's stderr ouput in client's stdout #14315

Closed
Romain-Geissler-1A opened this issue May 23, 2022 · 1 comment · Fixed by #14319
Labels
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.

Comments

@Romain-Geissler-1A
Copy link
Contributor

Romain-Geissler-1A commented May 23, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When using a remote client, it seems that anything logged in stderr when building the container is being logged to the stdout of the client, even if --quiet was used. This result in an unuseable container image id. Note that without using a remote client, it works as expected (stderr of the container is logged in the stderr stream of the client)

Steps to reproduce the issue:

Tested from a quay.io/podman/upstream image run with privileged mode:

[root@b561b4a44dcf /]# mkdir /src
[root@b561b4a44dcf /]# cat >/src/Dockerfile <<END_OF_FILE
FROM quay.io/fedora/fedora
RUN echo 'some error' >&2
END_OF_FILE
[root@b561b4a44dcf /]# podman system service -t 0 &
[1] 23
  1. When trying to build without the remote mode, it works fine:
[root@b561b4a44dcf /]# podman build --quiet --no-cache src | sed -e 's/^/Log from stdout: /'
some error
Log from stdout: e3979e0a57b619d9e6d2035e9fb0c4f8df7c9eed480ba93d6c23b730ef24ce43
  1. However when trying to build with the remote mode, stdout is being corrupted by "some error" while it should not:
[root@b561b4a44dcf /]# podman --remote build --quiet --no-cache src | sed -e 's/^/Log from stdout: /'
Log from stdout: some error
Log from stdout: e5431e43fc7a867e33f83475f5a2fe7ab47c6747d9eef736d11d18e8b677669c

Describe the results you received:

stdout is corrupted in remote mode.

Describe the results you expected:

stdout should contain only the final built image id.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

[root@b561b4a44dcf /]# podman version
Client:       Podman Engine
Version:      4.2.0-dev
API Version:  4.2.0-dev
Go Version:   go1.16.15
Git Commit:   68e45555b3dfc9662ce71b6ff548b43c9ea8d50c
Built:        Mon May  9 18:23:55 2022
OS/Arch:      linux/amd64
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label May 23, 2022
@flouthoc
Copy link
Collaborator

flouthoc commented May 23, 2022

@Romain-Geissler-1A Docker API suppress step errors when quiet is set and build is still successful however shows step errors if build failes irrespective of quiet flag , above PR matches API behavior with docker and should fix this for podman-remote as well.

flouthoc added a commit to flouthoc/podman that referenced this issue May 23, 2022
Match with docker API and suppress step errors when field quiet is set.

Closes: containers#14315

Signed-off-by: Aditya R <[email protected]>
Romain-Geissler-1A pushed a commit to Romain-Geissler-1A/podman that referenced this issue May 24, 2022
Match with docker API and suppress step errors when field quiet is set.

Closes: containers#14315

Signed-off-by: Aditya R <[email protected]>
cdoern pushed a commit to cdoern/podman that referenced this issue May 27, 2022
Match with docker API and suppress step errors when field quiet is set.

Closes: containers#14315

Signed-off-by: Aditya R <[email protected]>
mheon pushed a commit to mheon/libpod that referenced this issue Jun 14, 2022
Match with docker API and suppress step errors when field quiet is set.

Closes: containers#14315

Signed-off-by: Aditya R <[email protected]>
TomSweeneyRedHat pushed a commit to TomSweeneyRedHat/podman that referenced this issue Sep 1, 2022
Match with docker API and suppress step errors when field quiet is set.

Closes: containers#14315

Signed-off-by: Aditya R <[email protected]>
Signed-off-by: tomsweeneyredhat <[email protected]>
@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants