-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[WIP] Implement additional OCI Runtime functionality for Conmon-rs #14930
[WIP] Implement additional OCI Runtime functionality for Conmon-rs #14930
Conversation
Currently the create functionality of the OCI Runtime Interface is working at the bare minimum. It only works for rootful execution. However, the currently lines that integrate Podman with Conmon-rs have been commented out to prevent breaking main. Additionally, there is a significant issue with CPU utilization that I need to figure out. I also moved shared code between `libpod/oci_conmon_linux.go` and `libpod/oci_conmon_rs_linux.go` into `libpod/conmon_utils.go`. Additional Notes: - Arguments need to get passed to either ConmonServerConfig or CreateContainerConfig. If an argument does nothing, it is indicative of functionality required on the conmon-rs side. - There is currently no way to configure the environment of the conmon-rs process. This will need to be added on the conmon-rs side. Similar situation exists with storing extra files dealt with by the conmon-rs process. - [This](https://github.com/containers/podman/blob/b00e65aa9c071428579a55f91a92f3702765ed85/libpod/oci_conmon_linux.go#L1199-L1228) code is going to need some pretty significant adapting - Need to wire [startCommand](https://github.com/containers/podman/blob/b00e65aa9c071428579a55f91a92f3702765ed85/libpod/oci_conmon_linux.go#L1233) into conmon-rs as well. - [readConmonPipeData](https://github.com/containers/podman/blob/b00e65aa9c071428579a55f91a92f3702765ed85/libpod/oci_conmon_linux.go#L1250) is going to have to be put in conmon-rs, most likely the `ConmonServerConfig` struct. - I speculate the CLI sets the old conmon path by default, and this is causing issues with finding the conmon-rs path. - users will need to install conmon-rs using their `get` script to get the binary Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
948b396
to
4abf10a
Compare
@jakecorrenti: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
4abf10a
to
b8a9c28
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jakecorrenti The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
} | ||
defer errorhandling.CloseQuiet(parentSyncPipe) | ||
|
||
childStartPipe, parentStartPipe, err := newPipe() |
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 think these are completely unused now. Can probably be removed.
libpod/oci_conmon_rs_linux.go
Outdated
// client. | ||
func (r *ConmonRsOCIRuntime) HTTPAttach(ctr *Container, req *http.Request, w http.ResponseWriter, streams *HTTPAttachStreams, detachKeys *string, cancel <-chan bool, hijackDone chan<- bool, streamAttach, streamLogs bool) error { | ||
//return httpAttach(ctr, req, w, streams, detachKeys, cancel, hijackDone, streamAttach, streamLogs) | ||
return nil |
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.
Can you make all the not-implemented stuff return define.ErrNotImplemented
?
Few comments but on the whole looking good. |
Current functionality implemented: - StartContainer - StopContainer - KillContainer - UpdateContainerStatus - PauseContainer - UnpauseContainer - DeleteContainer - Attach There is an issue where when you run and start a container, do `podman inspect <ctr>`, it throws the error `Error: could not find any cgroup in "/proc/$PID/cgroup"` even though `/proc/$PID/cgroup` contains a path. However, the above problem does not occur when you start the container, stop it, and then do `podman inspect`. Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
b8a9c28
to
6d8d492
Compare
A friendly reminder that this PR had no activity for 30 days. |
@giuseppe Could you take this over? |
reworking the original conmon-rs work. relates to containers#14930 Signed-off-by: Charlie Doern <cdoern@redhat.com>
reworking the original conmon-rs work. relates to containers#14930 Signed-off-by: Charlie Doern <cdoern@redhat.com>
reworking the original conmon-rs work. relates to containers#14930 Signed-off-by: Charlie Doern <cdoern@redhat.com>
reworking the original conmon-rs work. relates to containers#14930 Signed-off-by: Charlie Doern <cdoern@redhat.com>
reworking the original conmon-rs work. relates to containers#14930 Signed-off-by: Charlie Doern <cdoern@redhat.com>
reworking the original conmon-rs work. relates to containers#14930 Signed-off-by: Charlie Doern <cdoern@redhat.com>
reworking the original conmon-rs work. relates to containers#14930 Signed-off-by: Charlie Doern <cdoern@redhat.com> Signed-off-by: Charlie Doern <cbddoern@gmail.com>
So far I have implemented start, stop, and kill. There is an issue where
when you run and start a container, do
podman inspect <ctr>
, it throwsthe error
Error: could not find any cgroup in "/proc/$PID/cgroup"
eventhough
/proc/$PID/cgroup
contains a path.Additionally, when stopping a container, it times-out every time:
Does this PR introduce a user-facing change?