ansible-role-systemd_mount/templates
Damian Dabrowski 480bb0c871 Fix mount's systemd unit dependency logic
Improve logic for making systemd mount dependent on
network-online.target when network filesystem is being used.

This change improves feature implemented in commit [1].

Currently when device is specified by UUID or LABEL, dependency for
network-online.target is added even it's not a network filesystem.
We should be careful with this as it may create circular dependency.
In my case, circular dependency looked like this:

network.target ->
  network-pre.target ->
    netfilter-persistent.service ->
      local-fs.target ->
        var-lib-nova.mount ->
          network-online.target ->
            network.target

Additionally, this commit was originally supposed to add dependency also
for CIFS mounts(these ones starting from '//') but it never worked in my
opinion. It was also fixed by this change.

[1] 6a9dcb6886

Change-Id: I5d2d9c074aa0390a6f8b7c8c0ba1c839fe26f6c5
2022-12-28 09:46:48 +00:00
..
systemd-mount.j2 Fix mount's systemd unit dependency logic 2022-12-28 09:46:48 +00:00