From 3b93fd23abd4e6605bbd77606cff36181f6d2169 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Wed, 28 Jul 2021 12:19:19 +0100 Subject: [PATCH] fix(service): set mnesia_base not mnesia_dir (derived) --- pillar.example | 5 ++--- rabbitmq/files/default/systemd.ini.jinja | 2 +- rabbitmq/service/running.sls | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pillar.example b/pillar.example index db51df5f..69e1beff 100644 --- a/pillar.example +++ b/pillar.example @@ -209,9 +209,8 @@ rabbitmq: environ: locale_all: en_US.UTF-8 values: {} - # https://www.rabbitmq.com/configure.html#supported-environment-variables - # rabbitmq_mnesia_base: /var/lib/rabbitmq - # RABBITMQ_BASE: /var/lib/rabbitmq + # https://www.rabbitmq.com/relocate.html + # rabbitmq_mnesia_base: /var/lib/rabbitmq/mnesia # RABBITMQ_USE_LONGNAME: true # not working in ci # https://www.rabbitmq.com/configure.html#supported-environment-variables # RABBITMQ_LOG_BASE: /var/log/rabbitmq diff --git a/rabbitmq/files/default/systemd.ini.jinja b/rabbitmq/files/default/systemd.ini.jinja index 703c05ab..a6c00bb7 100644 --- a/rabbitmq/files/default/systemd.ini.jinja +++ b/rabbitmq/files/default/systemd.ini.jinja @@ -17,7 +17,7 @@ Environment="RABBITMQ_NODENAME={{ 'rabbit' if nodename is not defined else noden Environment="RABBITMQ_NODE_PORT={{ '5672' if nodeport is not defined else nodeport }}" Environment="RABBITMQ_SERVER_START_ARGS=-rabbitmq_management listener [{port,{{ nodeport + 10000 }}}]" Environment="RABBITMQ_DIST_PORT={{ '25672' if distport is not defined else distport }}" -Environment="RABBITMQ_MNESIA_DIR={{ '/var/lib/rabbitmq' if mnesia_dir is not defined else mnesia_dir }}" +Environment="RABBITMQ_MNESIA_DIR={{ '/var/lib/rabbitmq/mnesia' if mnesia_dir is not defined else mnesia_dir }}" Environment="RABBITMQ_CONFIG_FILE={{ '/etc/rabbitmq/rabbitmq.conf' if cfgfile is not defined else cfgfile }}" # To override LimitNOFILE, create the following file: diff --git a/rabbitmq/service/running.sls b/rabbitmq/service/running.sls index baa25e82..75f55093 100644 --- a/rabbitmq/service/running.sls +++ b/rabbitmq/service/running.sls @@ -44,7 +44,7 @@ rabbitmq-service-running-managed-{{ name }}: nodeport: {{ '' if 'nodeport' not in node else node.nodeport }} distport: {{ '' if 'distport' not in node else node.distport }} nodename: {{ name }} - mnesia_dir: {{ rabbitmq.dir.data }}/{{ name }} + mnesia_dir: {{ rabbitmq.dir.data }}/{{ name }}/mnesia cfgfile: {{ rabbitmq.dir.config }}/{{ name }}/rabbitmq-server.conf - watch_in: - cmd: rabbitmq-service-running-daemon-reload