At the moment the Ankaios agent calls podman ps once every second and uses this result to check if podman/podman-kube workloads are still running.
Hence it could take one seconds between an application stopping and Ankaios being informed about the state change.
To be immediately informed, once a workload stops, Ankaios agent can get the PID of the workload from the podman ps result and
use pidfd_open to get a file descriptor, which can be waited on using select, poll or epoll.
Description
At the moment the Ankaios agent calls
podman ps
once every second and uses this result to check if podman/podman-kube workloads are still running. Hence it could take one seconds between an application stopping and Ankaios being informed about the state change.To be immediately informed, once a workload stops, Ankaios agent can get the PID of the workload from the
podman ps
result and usepidfd_open
to get a file descriptor, which can be waited on usingselect
,poll
orepoll
.Final result
Summary
To be filled when the final solution is sketched.