Create locking on experimental flow

Description

In order to make experimental flow atomic, we need to do as follows:
in deploy.sh script and in start_testing_latest.sh we need to add a loop in the beginning of each script that does the following:
*while 1:
do
is_locked=$((echo aaa > my.lock) 2> /dev/null || echo is locked)
if [[ -z $is_locked ]]; then
break
else
sleep 5
fi
done*

Wrap the whole script with a trap so in the end if each script we will be able to remove my.lock no matter what happened.

Activity

Show:

Former user February 1, 2017 at 4:22 PM

Sent the following patch to try and improve the priority mechanism:
https://gerrit.ovirt.org/71532

Barak Korren February 1, 2017 at 3:11 PM

We need to check how often this happen.

Easiest solution - increase timeout - it is 10m now, can be easily increased to 15 or 20m.
More complex solution - use different lock files for different oVirt versions.

Eyal Edri January 23, 2017 at 12:23 PM

please submit the changes also to the puppet repo where we backup the files now.

Barak Korren December 2, 2016 at 7:52 AM

As we've talked, the code will probably work better over time if the loop is not infinite, like so:

Barak Korren December 1, 2016 at 3:48 PM
Edited

The script as you wrote it above is more complex then it should be.
Try this:

Fixed

Details

Assignee

Reporter

Priority

Created December 1, 2016 at 3:30 PM
Updated February 28, 2017 at 2:33 PM
Resolved February 5, 2017 at 9:26 AM