Is there a rationale for rabbitmq-server being PID 1 in the pods ? Makes it ignore SIGKILL #2012
Replies: 3 comments 6 replies
-
|
I'm assuming you're using this docker image. I started it in one shell via: ... then in another shell I ran |
Beta Was this translation helpful? Give feedback.
-
|
I'm personally a bit against approaches like tiny, because, in my opinion, it's an attempt to convert a container into a VM, which sort of defeats the purpose of a container. RabbitMQ PID does not exactly run as PID 1 in the system, runs as PID 1 inside the container thanks to PID namespaces. Quoting from that documentation link:
I guess you exec'ed into the container with a IMHO, I believe you took the wrong approach. When you want to forcibly kill a container, you don't "enter" the container and start firing shots; instead, you would use the tooling "from the outside" (e.g. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @mgarstecki - I've had this issue in the back of my head ever since you reported it. I'm not a k8s expert by any means, so I had a discussion with "the genie" (i.e. ChatGPT) about this issue. Here is what it had to say. I do agree with the genie that the fact that RabbitMQ running as PID 1 is not the issue, because, external to the container, everything runs in a cgroup that the kernel can easily can kill. I did find it interesting what the AI had to say about the load on the system and how, perhaps, it could have lead to the appearance that SIGKILL is being ignored when it's something else in the k8s internals. You certainly know more about that so I hope you find it interesting. Finally, there is a pretty easy way to run the Erlang VM ( I tested this out locally via this command: Since the Erlang VM traps The reason I'm suggesting this is that, maybe, running RabbitMQ as PID 1 could avoid any issues that could arise by the I think there's a case to be made for the docker container's behavior to change so that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
During an incident where we wanted to force a restart of a RabbitMQ cluster managed by the cluster-operator, we had a hard time forcing a restart of the pods. SIGKILL was getting ignored, and it turns out that's because
rabbitmq-serveris started as PID 1 in the container, which is allowed to ignore SIGKILL. We resorted to killing the subprocesses of the pod, which pushedrabbitmq-serverto crash.Is there a delibarate rationale to having
rabbitmq-serveras PID 1, and be able to ignore being killed ? Otherwise, could it be a good idea to wrap it in a simple init process, like tini ?Beta Was this translation helpful? Give feedback.
All reactions