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
This commit is contained in:
Markos Chandras 2018-10-03 14:39:23 +01:00
parent 6ed567abc0
commit ceb7d9019b
1 changed files with 19 additions and 7 deletions

View File

@ -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