-
Notifications
You must be signed in to change notification settings - Fork 64
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
Exec support using libpod api #87
Conversation
@drewbailey PTAL. I think it's low risk to merge because it adds a totally new feature without changing any of the existing functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this out locally and it works great! Excellent work 🎉 Just a few comments, Some tests would be good too
@drewbailey : i rebased this branch to include the latest changes from main. Please check my earlier reply on your review. Are we good to go? I think it would be worth a release. |
api/exec_start.go
Outdated
for { | ||
select { | ||
case <-ctx.Done(): | ||
c.logger.Warn("Resize handler is done") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if an operator would find this something that they need to act upon or be notified about, Trace seems better
c.logger.Warn("Resize handler is done") | |
c.logger.Trace("Resize handler is done") |
@towe75 this looks really great! A few tests would be great to ensure everything works as expected as new podman versions roll out. There should be a few good examples in the Nomad repo |
@drewbailey : thank you for feedback. I'll try to add some tests. |
@towe75 We can also merge this and do a follow up PR with some tests before releasing if you prefer, I'll approve the PR and leave it up to you. If we can fix those two log levels that would be great |
@drewbailey i started to derive a test from the other task driver and only two sub-tests from StreamingConformingTests fail: --- FAIL: TestPodmanDriver_execTaskStreaming (76.20s) notty:children_processes has to be tackled, could be potential bug. But "isolation" test has a hardcoded docker assumption in exec_testing.go . Should this become a bug in the nomad repo? I did not commit the test yet to not break the build. |
@towe75 that is great news! sounds like |
I looked into the other failing test and it seems to be a podman problem OR wrong assumption.
A plain run without a container acts differently:
Should i raise a podman issue? Seems they handle it differently compared to docker. |
@towe75 fyi we are removing this test hashicorp/nomad#10291 from nomad |
@drewbailey thank you for keeping me posted. I will file a follow-up issue to add the tests later because there is still the TestExecFSIsolation blocker. |
Alternative implementation to #85
It uses libpod api directly, following the minimal client strategy of our 0.2.0 release.
It's pretty complete and support both interactive use and scripted health checks. The only known issue is related to terminal resize events due to containers/podman#7102 which should be fixed in the upcoming podman 3.0 release.