Ensure mounts are present only when they are expected to exist

At the moment there is a check, which ensures for race condition to
not happen between asking for a mount and mounting the point.
However, it tries to check for the mount when there is no mount
defined for the directory.

We add extra check to wait for the mount only when mounts are defined.

Change-Id: I900a55a6f4edce3d3fe419821c47cf56d641192f
This commit is contained in:
Dmitriy Rabotyagov 2023-10-23 14:30:48 +02:00 committed by Dmitriy Rabotyagov
parent 2f8dc163a2
commit 6a2affb1a5
1 changed files with 1 additions and 0 deletions

View File

@ -87,6 +87,7 @@
retries: 5
delay: 2
until: _repo_folder_is_mounted.rc == 0
when: repo_server_systemd_mounts | length > 0
# NOTE(jrosser) remove this task in release after Z
- name: Restore repo content from archive into new shared filesystem