Bug #2086707 “RabbitMQ pid file sometimes not present for task “…” : Bugs : kolla-ansible

Occasionally we’ve seen the following error:

TASK [rabbitmq : Waiting for rabbitmq to start] *******************************************************************************
Tuesday 05 November 2024 14:39:28 +0000 (0:00:01.197) 0:09:38.753 ******
fatal: [omitted>]: FAILED! => changed=true
  cmd:
  – docker
  – exec
  – rabbitmq
  – rabbitmqctl
  – wait
  – –timeout
  – ’60’
  – /var/lib/rabbitmq/mnesia/rabbitmq.pid
  delta: ‘0:00:06.177517’
  end: ‘2024-11-05 14:39:34.731930’
  msg: non-zero return code
  rc: 137
  start: ‘2024-11-05 14:39:28.554413’
  stderr: ”
  stderr_lines:
  stdout: Waiting for pid file ‘/var/lib/rabbitmq/mnesia/rabbitmq.pid’ to appear
  stdout_lines:

This seems to be because we try calling this rabbitmqctl command just before the pid file is created. Can be solved by adding retries to the task.

Read more here: Source link