Merge "Use shared volume for side-car wrapper locks"

This commit is contained in:
Zuul 2020-05-06 10:41:46 +00:00 committed by Gerrit Code Review
commit a1a1f1e82d
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ function start_service {
jobs_file="{{ tripleo_systemd_wrapper_service_dir }}/{{ tripleo_systemd_wrapper_service_name }}/processes" jobs_file="{{ tripleo_systemd_wrapper_service_dir }}/{{ tripleo_systemd_wrapper_service_name }}/processes"
[ -s "$jobs_file" ] || exit 0 # nothing to do, no need for locking, just exit [ -s "$jobs_file" ] || exit 0 # nothing to do, no need for locking, just exit
exec {lock_fd}>/var/lock/{{ tripleo_systemd_wrapper_service_name }}-processes.lock || exit 1 exec {lock_fd}>/var/lock/containers/{{ tripleo_systemd_wrapper_service_name }}-processes.lock || exit 1
# In case service_wrapper script already locked the commands, we just wait for a 10 sec. # In case service_wrapper script already locked the commands, we just wait for a 10 sec.
flock -w 10 "$lock_fd" || exit 1 flock -w 10 "$lock_fd" || exit 1