Skip to content

No exec or trap in rabbitmq-script-wrapper? #47

@pikeas

Description

@pikeas

When starting RabbitMQ, the flow looks like this:

  1. /usr/sbin/rabbitmq-server (https://github.com/rabbitmq/rabbitmq-server/blob/master/packaging/common/rabbitmq-script-wrapper)
  2. /usr/lib/rabbitmq/bin/rabbitmq-server
  3. Erlang

Step 2 calls step 3 with exec. However, step 1 does not use exec when calling step 2. It also doesn't trap SIGTERM. This causes an issue downstream in dockerfile/rabbitmq, which adds a step 0 script at /usr/local/bin/rabbitmq-start:

#!/bin/bash

ulimit -n 1024
chown -R rabbitmq:rabbitmq /data
exec rabbitmq-server $@

Is there any reason why exec is missing at step 1(/usr/sbin/rabbitmq-server)? It breaks the chain, causing issues with SIGTERM handling when RabbitMQ is run in a container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions