Create /etc/init.d/glusterd symlink unconditionally
It fixes change introduced in https://gerrit.mcp.mirantis.com/#/c/38901/
and always adds glusterd service. For newer glusterfs packages systemd's
unit takes precedents so having this symlink is pretty safe.
Change-Id: I5ec9a1139afd95f6a21584b06cf3f5f871c09973
Related: PROD-29356
diff --git a/glusterfs/server/service.sls b/glusterfs/server/service.sls
index e12f660..0a659ff 100644
--- a/glusterfs/server/service.sls
+++ b/glusterfs/server/service.sls
@@ -7,7 +7,6 @@
- names: {{ server.pkgs }}
{# Backward compatibility issue, remove when old versions (<3.11.3) are not used any more #}
- {% if salt['file.file_exists']('/etc/init.d/glusterfs-server') %}
glusterfs_service_symlink:
file.symlink:
- name: /etc/init.d/glusterd
@@ -23,7 +22,11 @@
- enable: False
- onchanges:
- file: glusterfs_service_symlink
- {% endif %}
+ - require_in:
+ - service: glusterfs_service
+ - onlyif:
+ ls /etc/init.d/glusterfs-server
+{# end of backward compatibility change #}
{%- if server.recover_peers is defined %}
{%- for peer_name, peer_data in server.recover_peers.iteritems() %}