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

please add --log-driver for podman exec #14594

Open
allisonkarlitskaya opened this issue Jun 15, 2022 · 16 comments
Open

please add --log-driver for podman exec #14594

allisonkarlitskaya opened this issue Jun 15, 2022 · 16 comments

Comments

@allisonkarlitskaya
Copy link

As per #6555 (comment)

For now, I'm going to force log-driver off for podman exec; we can add the flag at a later date

The issue got closed with the hard-wiring of "none" but there was no follow-up to add the flag, as planned.

@Luap99
Copy link
Member

Luap99 commented Jun 15, 2022

While adding the log options is easy, I am not sure how you want to read the logs then?

@mheon PTAL

@mheon
Copy link
Member

mheon commented Jun 15, 2022

We can add logging without that much difficulty - just a bit of plumbing required to get the appropriate flags to Conmon. Question is really how do you read those logs, as podman logs isn't going to do it.

@allisonkarlitskaya
Copy link
Author

I actually just want to set the driver to passthrough.

@Luap99
Copy link
Member

Luap99 commented Jun 16, 2022

What would be the advantage of the passthrough driver compared to the normal podman exec?

@allisonkarlitskaya
Copy link
Author

I want my file descriptors going through to the inside, without podman acting as an intermediary.

@rhatdan
Copy link
Member

rhatdan commented Jun 17, 2022

Does this work for you?

man podman exec
...
   --preserve-fds=N
       Pass down to the process N additional file descriptors (in addition to 0, 1, 2).  The total FDs will be 3+N.

@allisonkarlitskaya
Copy link
Author

Does this work for you?

man podman exec
...
   --preserve-fds=N
       Pass down to the process N additional file descriptors (in addition to 0, 1, 2).  The total FDs will be 3+N.

Yes. That's what I'm using now. 😅

It actually works fine. It just seemed odd to me that it was necessary when there's the passthrough option on run but not exec. And then I found the issue saying that there was an eventual intent to add the option for exec as well, so I opened the issue.

@Luap99
Copy link
Member

Luap99 commented Jun 17, 2022

I think adding passthrough support is fine, journald could also be added since users could read the logs via journalctl.

But keep in mind that passthrough is only supported when the fds are not connected to a terminal.

@allisonkarlitskaya
Copy link
Author

I'd be using it with an AF_UNIX socketpair.

@rhatdan
Copy link
Member

rhatdan commented Jun 17, 2022

Interested in opening a PR to make this happen?

@github-actions
Copy link

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

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Aug 22, 2022

@flouthoc Interested in taking a look at this?

@flouthoc
Copy link
Collaborator

flouthoc commented Aug 24, 2022

Looks a small change ,can add this flag but I am not sure if this is even easily testable in CI or not @mheon WDYT ?

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Sep 28, 2022

@flouthoc Reminding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants