conmon icon indicating copy to clipboard operation
conmon copied to clipboard

conmon exec not handling runtime failures

Open discordianfish opened this issue 2 years ago • 2 comments

Looks like at least when doing exec, conmon is ignoring the exit status of the runtime and returns 0. That made it really hard to pin point an issue we're having.

Using /bin/false to easily reproduce:

# conmon -c <id> -n /runtime.v1alpha2.RuntimeService/Exec -p /mnt/crio/overlay-containers/<id>/userdata/pidfile -e --socket-dir-path /var/run/crio --exec-process-spec exec-spec.json -r /bin/false --log-path /dev/stdout
# echo $?
0

discordianfish avatar Feb 24 '22 12:02 discordianfish

Sorry for the delay @discordianfish, this fell through the cracks. The problem is that conmon double forks to daemonize. The original child does not actually end up running the runtime command. Callers can specify a sync pipe to allow conmon to tell them the exit code of the runtime command, but that's a pain from the terminal. Can you remind me the case you were running conmon manually?

haircommander avatar Apr 06 '22 15:04 haircommander

@haircommander That was part of debugging another issue. But feel free to close this if crio/podman have another reliable way to determine the return code of the runtime binary.

discordianfish avatar Apr 11 '22 09:04 discordianfish