containers / containers/podman-compose
logging.driver: none applies to all services instead of where it is used
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
having
```
logging:
driver: none
```
on a service seems to apply it to the whole pod
**To Reproduce**
1. add logging.driver: none to a service
2. bring all services up with podman-compose up -d
minimal reproducible example
```
services:
bashhi:
image: 'docker.io/library/alpine:latest'
command: 'sh -c "while true; do sleep 1; echo hi; done"'
yessir:
image: 'docker.io/library/alpine:latest'
command: 'yes'
logging:
driver: none
```
**Expected behavior**
the services with logging.driver: none don't log, I can see the logs from the other services
**Actual behavior**
on the podman-compose up tty, I can see the logs of all services if I didn't -d.
`podman pod logs podname` returns _Error: this container is using the 'none' log driver, cannot read logs: this container is not logging output_
**Output**
```
$ podman-compose version
podman-compose version 1.5.0
podman version 5.7.1
podman --version
podman version 5.7.1
$ podman-compose up
...
c309f288f548c06f211529a749bd66287a4157f2839a1bd3752fb87b297db6af
29e2c25f5beee63639d63a9628b1168d2e08ef33945c5051db5bcc73e8ea62ec
67cc2f09d5432e9bfd20094bf70af846515d37773c13bf1e76abc953d4bb7e9a
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
[yessir] | y
*snip*
```
**Environment:**
- OS: Linux, openSUSE Tumbleweed
- podman version: 5.1.7
- podman compose version: 1.5.0
**Additional context**
could be a bug in podman itself where it sees that one container in the pod has logging disabled and comes upon it and decides it's for all the pod. I believe this could be because doing podman logs does let me see the logs for that service, and doing podman logs returns the same as podman pod logs
Contributor guide
Assessment
This issue has not been assessed yet.