Merge lp:~rvb/maas/component-bug-1307415 into lp:maas/trunk

Proposed by Raphaël Badin on 2014-04-14
Status: Merged
Approved by: Raphaël Badin on 2014-04-15
Approved revision: 2259
Merged at revision: 2265
Proposed branch: lp:~rvb/maas/component-bug-1307415
Merge into: lp:maas/trunk
Diff against target: 18 lines (+3/-3)
1 file modified
src/maasserver/start_up.py (+3/-3)
To merge this branch: bzr merge lp:~rvb/maas/component-bug-1307415
Reviewer Review Type Date Requested Status
Graham Binns (community) 2014-04-14 Approve on 2014-04-14
Review via email: mp+215665@code.launchpad.net

Commit message

Move the registration of components errors into the critical section. This is part of the start up code and thus outside of transaction management so moving this code inside the critical section avoids race conditions between WSGI processes.

To post a comment you must log in.
Graham Binns (gmb) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/start_up.py'
2--- src/maasserver/start_up.py 2014-03-25 19:21:59 +0000
3+++ src/maasserver/start_up.py 2014-04-14 13:35:29 +0000
4@@ -86,11 +86,11 @@
5 # Regenerate MAAS's DNS configuration. This should be reentrant, really.
6 write_full_dns_config(reload_retry=True)
7
8+ # Check whether we have boot images yet.
9+ update_import_script_error()
10+
11
12 def post_start_up():
13 """Startup jobs that can run after the critical section."""
14- # Check whether we have boot images yet.
15- update_import_script_error()
16-
17 # Send secrets etc. to workers.
18 NodeGroup.objects.refresh_workers()