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

[BUG] empty stdout/stderr for exec_run on macOS #506

Open
aparcar opened this issue Jan 27, 2025 · 2 comments
Open

[BUG] empty stdout/stderr for exec_run on macOS #506

aparcar opened this issue Jan 27, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@aparcar
Copy link
Contributor

aparcar commented Jan 27, 2025

Hi, I'm running Podman Machine on a MacBook and everything works fine except the exec_run, the output is always empty. Below an example which works on Linux machines:

>>> import podman
>>> client = podman.PodmanClient()
>>> client.images.list()
[<Image: 'docker.io/library/alpine:latest'>]
>>> client.version()
{'Platform': {'Name': 'linux/arm64/fedora-41'}, 'Components': [{'Name': 'Podman Engine', 'Version': '5.4.0-dev-234c41c80', 'Details': {'APIVersion': '5.4.0-dev-234c41c80', 'Arch': 'arm64', 'BuildTime': '2025-01-22T00:00:00Z', 'Experimental': 'false', 'GitCommit': '', 'GoVersion': 'go1.23.4', 'KernelVersion': '6.12.7-200.fc41.aarch64', 'MinAPIVersion': '4.0.0', 'Os': 'linux'}}, {'Name': 'Conmon', 'Version': 'conmon version 2.1.12, commit: ', 'Details': {'Package': 'conmon-2.1.12-3.fc41.aarch64'}}, {'Name': 'OCI Runtime (crun)', 'Version': 'crun version UNKNOWN\ncommit: b143d9ea7cfea9de44222d7fcfb7f55c21ba8060\nrundir: /run/user/501/crun\nspec: 1.0.0\n+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL', 'Details': {'Package': 'crun-1.19.1-1.20250121161049663014.main.23.ga2d140d.fc41.aarch64'}}], 'Version': '5.4.0-dev-234c41c80', 'ApiVersion': '1.41', 'MinAPIVersion': '1.24', 'GitCommit': '', 'GoVersion': 'go1.23.4', 'Os': 'linux', 'Arch': 'arm64', 'KernelVersion': '6.12.7-200.fc41.aarch64', 'BuildTime': '2025-01-22T00:00:00Z'}
>>> container = client.containers.create("alpine", command=["sleep", "1000"])
>>> container.start()
>>> ret, out = container.exec_run("echo 42", demux=True)
>>> ret
0
>>> out
(b'', b'')

Any ideas?

@aparcar
Copy link
Contributor Author

aparcar commented Jan 27, 2025

Generally stdout works when using the example below:

>>> client.containers.run("alpine", ["echo", "42"])
b'42\n'

@inknos
Copy link
Contributor

inknos commented Jan 27, 2025

hey @aparcar , thanks for the report. I can try to investigate it on Windows (since podman is provided via machine), but I don't have a mac, so it will take more time if it's mac only. I'll follow up if I can get it on Windows or I'll ask for more info :)

@Edward5hen do you have a mac?

@inknos inknos added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants