[JIRA] (OVIRT-899) Create locking on experimental flow
Barak Korren (oVirt JIRA)
jira at ovirt-jira.atlassian.net
Thu Dec 1 15:48:02 UTC 2016
[ https://ovirt-jira.atlassian.net/browse/OVIRT-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=23631#comment-23631 ]
Barak Korren commented on OVIRT-899:
------------------------------------
The script as you wrote it above is more complex then it should be.
Try this:
{code}
while (> my.lock) 2> /dev/null; do
sleep 5
done
{code}
> Create locking on experimental flow
> -----------------------------------
>
> Key: OVIRT-899
> URL: https://ovirt-jira.atlassian.net/browse/OVIRT-899
> Project: oVirt - virtualization made easy
> Issue Type: Task
> Reporter: Gil Shinar
> Assignee: infra
>
> 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.
--
This message was sent by Atlassian JIRA
(v1000.606.0#100023)
More information about the Infra
mailing list