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_COMPOSE_WARNING_LOGS is not respected #23441

Closed
legobeat opened this issue Jul 30, 2024 · 1 comment · Fixed by #23442
Closed

PODMAN_COMPOSE_WARNING_LOGS is not respected #23441

legobeat opened this issue Jul 30, 2024 · 1 comment · Fixed by #23442
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

@legobeat
Copy link

legobeat commented Jul 30, 2024

Issue Description

By default, each invocation of podman compose outputs a notice to stderr regardless of configured log-level:

$ podman compose --log-level=error --progress=quiet run --rm --quiet-pull foobar
>>>> Executing external compose provider "/usr/libexec/docker/cli-plugins/docker-compose". Please refer to the documentation for details. <<<<

We would like to silence these without swallowing the stderr from the attached container itself and without editing configuration files on the client or host.

According to podman compose manpage, this line should be possible to disable via the PODMAN_COMPOSE_WARNING_LOGS environment variable but this does not seem effective.

Steps to reproduce the issue

None of these work:

PODMAN_COMPOSE_WARNING_LOGS=false podman compose --log-level=error --progress=quiet run --rm --quiet-pull foobar
PODMAN_COMPOSE_WARNING_LOGS=0     podman compose --log-level=error --progress=quiet run --rm --quiet-pull foobar

(Also tried variations PODMAN_COMPOSE_ENGINE_WARNING_LOGS, COMPOSE_ENGINE_WARNING_LOGS, COMPOSE_WARNING_LOGS)

Neither does attempting to shell around via CONTAINERS_CONF_OVERRIDE:

$ CONTAINERS_CONF_OVERRIDE=<(cat <<EOT
[engine]
compose_warning_logs=false
EOT
) sh -c 'cat ${CONTAINERS_CONF_OVERRIDE}'
[engine]
compose_warning_logs=false

$ CONTAINERS_CONF_OVERRIDE=<(cat <<EOT
[engine]
compose_warning_logs=false
EOT
) podman compose --log-level=error --progress=quiet run --rm --quiet-pull foobar

Forcing it via an actual configuration file does work:

$ cat <<EOT > ./containers-override.conf
[engine]
compose_warning_logs=false
EOT


$ CONTAINERS_CONF_OVERRIDE=$(pwd)/containers-override.conf podman compose --log-level=error --progress=quiet run --rm --quiet-pull foobar

Describe the results you received

Banner is still output regardless of environment variables

Describe the results you expected

Banner is silenced like when setting [engine]\ncompose_warning_logs=false in configuration file.

podman info output

podman version 5.1.2

Linux 6.1 LTS (Fedora 40)

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

Additional information

Nothing relevant to the issue shows up by changing --log-level=error to --log-level=trace.

@legobeat legobeat added the kind/bug Categorizes issue or PR as related to a bug. label Jul 30, 2024
@legobeat
Copy link
Author

@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Oct 29, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Oct 29, 2024
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.

1 participant