From ceb7d9019b64e28e3fe672d54cec46491a5f4d39 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 3 Oct 2018 14:39:23 +0100 Subject: [PATCH] roles: bifrost-ironic-install: Make epmd listen to all addresses on SUSE epmd on SUSE only listens on the localhost address leading to rabbitmq-server failures when it listens to multiple addresses. We can fix that by overriding the default ListenStream option in the epmd.socket unit file to listen to all addresses. Change-Id: I190530e8e3b5a1e3062a670e40a29417d94c1963 Link: https://bugzilla.suse.com/show_bug.cgi?id=1003085 --- .../tasks/bootstrap.yml | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml index b10cce400..6c0d17da6 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml @@ -44,13 +44,25 @@ # NOTE(hwoarang): The erlang SUSE package forces epmd to listen on localhost # address which breaks rabbitmq-server when listening on a different address. -# Make sure the systemd service and socket are stopped so rabbitmq-server will -# start epmd on its own (https://bugzilla.suse.com/show_bug.cgi?id=1003085) -- name: "Stop and disable the epmd service and socket on SUSE" - service: name={{ item }} state=stopped enabled=no - with_items: - - epmd.socket - - epmd +# https://build.opensuse.org/package/view_file/devel:languages:erlang:Factory/erlang/README.SUSE?expand=1 +- name: "Make epmd listen to all addresses on SUSE" + block: + - blockinfile: + dest: "/etc/systemd/system/epmd.socket.d/port.conf" + content: | + [Socket] + ListenStream= + ListenStream=0.0.0.0:4369 + create: yes + marker: "# {mark} ANSIBLE MANAGED BLOCK" + + - systemd: daemon_reload=yes + + - service: name={{ item }} state=stopped enabled=no + with_items: + - epmd.socket + - epmd + when: ansible_os_family == 'Suse' - name: "Start rabbitmq-server" service: name=rabbitmq-server state=started enabled=yes