crun
crun copied to clipboard
Inconsistent Error Reporting: runc vs crun for Stopped Containers
trafficstars
Description:
When attempting to kill a container that is not running, runc returns an error message indicating that the "container not running," while crun returns an error message stating "open pidfd: No such process." This inconsistency can lead to confusion for users who expect similar behavior from both runtimes.
Steps to Reproduce:
- Create a container using either runc or crun.
- Stop the container.
- Attempt to kill the stopped container using the respective command.
Expected Behavior:
crun should return a consistent error message indicating that the container is not running when attempting to kill a stopped container.
Actual Behavior:
- runc Output:
Error: container not running
- crun Output:
open pidfd: No such process
xref: https://github.com/cri-o/cri-o/pull/8434
consistency with runc error messages is not a goal, but I agree the error could be improved. Would you like to open a PR to address it?