Merge lp:~joetalbott/qa-dashboard/fix_script_locking into lp:qa-dashboard

Proposed by Joe Talbott
Status: Merged
Approved by: Chris Johnston
Approved revision: 662
Merged at revision: 674
Proposed branch: lp:~joetalbott/qa-dashboard/fix_script_locking
Merge into: lp:qa-dashboard
Diff against target: 58 lines (+7/-9)
3 files modified
deployment/apache-mod-wsgi/README (+2/-2)
scripts/branch-update.sh (+4/-6)
scripts/qa-dashboard-update-fast.sh (+1/-1)
To merge this branch: bzr merge lp:~joetalbott/qa-dashboard/fix_script_locking
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
PS Jenkins bot continuous-integration Approve
Joe Talbott Needs Resubmitting
Review via email: mp+192235@code.launchpad.net

Commit message

Don't allow update and branch-update scripts to run at the same time.

Description of the change

Don't allow update and branch-update scripts to run at the same time.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:660
http://10.97.0.26:8080/job/dashboard-ci/227/
Executed test runs:

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/dashboard-ci/227/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) wrote :

i found it odd the locks were numbered:

  200, 202, 201

But not a big deal.

do we really need to call "scripts/qa-dashboard-update.sh" for a branch-update?

review: Approve
Revision history for this message
Joe Talbott (joetalbott) wrote :

On Tue, Oct 22, 2013 at 09:31:49PM -0000, Andy Doan wrote:
> Review: Approve
>
> i found it odd the locks were numbered:
>
> 200, 202, 201
>
> But not a big deal.
>
> do we really need to call "scripts/qa-dashboard-update.sh" for a branch-update?

I was wondering the same thing. If there is consensus I'll remove it
here too.

Though I think the case could happen where an update-branch runs and
blocks an update (which exits) so the update won't run for another hour
which makes a 2 hour gap without new results. But it's not smoke so it
might be okay. Though smoke could take 30 minutes.

Comments?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:661
http://10.97.0.26:8080/job/dashboard-ci/228/
Executed test runs:

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/dashboard-ci/228/rebuild

review: Approve (continuous-integration)
Revision history for this message
Joe Talbott (joetalbott) :
review: Needs Resubmitting
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:662
http://10.97.0.26:8080/job/dashboard-ci/240/
Executed test runs:

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/dashboard-ci/240/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) wrote :

+1

review: Approve
Revision history for this message
Chris Johnston (cjohnston) wrote :

The attempt to merge lp:~joetalbott/qa-dashboard/fix_script_locking into lp:qa-dashboard failed. Below is the output from the failed tests.

Creating test database for alias 'default'...
Type 'yes' if you would like to try deleting the test database 'test_qa_dashboard', or 'no' to cancel:
Got an error creating the test database: database "test_qa_dashboard" already exists

EOFError: EOF when reading a line

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deployment/apache-mod-wsgi/README'
2--- deployment/apache-mod-wsgi/README 2013-10-11 02:58:58 +0000
3+++ deployment/apache-mod-wsgi/README 2013-10-28 15:38:02 +0000
4@@ -145,7 +145,7 @@
5 ###
6
7 ########################## Start ######################################
8-vim $REPO_DIR/scripts/qa-dashboard-update.sh
9+vim $REPO_DIR/scripts/qa-dashboard-update-slow.sh
10
11 Update the HOME= line to match $REPO_DIR
12 ########################## End ######################################
13@@ -155,5 +155,5 @@
14 ###
15 {
16 crontab -l 2>/dev/null
17- echo '42 * * * * $REPO_DIR/scripts/qa-dashboard-update.sh'
18+ echo '42 * * * * $REPO_DIR/scripts/qa-dashboard-update-slow.sh'
19 } | crontab -
20
21=== modified file 'scripts/branch-update.sh'
22--- scripts/branch-update.sh 2013-10-22 20:25:25 +0000
23+++ scripts/branch-update.sh 2013-10-28 15:38:02 +0000
24@@ -14,9 +14,9 @@
25
26 cd $basedir/..
27 (
28- flock 202 # wait for this lock
29+ flock 201 # wait for this lock
30 (
31- flock 201 # wait for this lock
32+ flock 202 # wait for this lock
33 if ! bzr missing >/dev/null; then
34 bzr pull
35 python manage.py syncdb
36@@ -26,8 +26,6 @@
37 fi
38 # update plugins
39 python manage.py plugin_sync
40- # run the update script
41- ) 201>/var/lock/$project-qa-dashboard-update
42- ) 202>/var/lock/$project-qa-dashboard-update-15-min
43- scripts/qa-dashboard-update.sh $1
44+ ) 202>/var/lock/$project-qa-dashboard-update
45+ ) 201>/var/lock/$project-qa-dashboard-update-fast
46 ) 200>/var/lock/$project-update-code
47
48=== renamed file 'scripts/qa-dashboard-update-15-min.sh' => 'scripts/qa-dashboard-update-fast.sh'
49--- scripts/qa-dashboard-update-15-min.sh 2013-07-24 13:29:43 +0000
50+++ scripts/qa-dashboard-update-fast.sh 2013-10-28 15:38:02 +0000
51@@ -23,4 +23,4 @@
52 # run the update scripts
53 python manage.py jenkins_pull_smokeng $DAYS
54 python manage.py launchpad_pull_bugs
55-) 200>/var/lock/$project-qa-dashboard-update-15-min
56+) 200>/var/lock/$project-qa-dashboard-update-fast
57
58=== renamed file 'scripts/qa-dashboard-update.sh' => 'scripts/qa-dashboard-update-slow.sh'

Subscribers

People subscribed via source and target branches