start_up uses database lock outside of transaction

Bug #1325759 reported by Gavin Panella
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Gavin Panella
1.5
Fix Released
Critical
Gavin Panella
maas (Ubuntu)
Fix Released
Critical
Unassigned
Trusty
Fix Released
Critical
Greg Lutostanski

Bug Description

[Impact]
 * When using new locking code, this is used to prevent an error on maas server startup when asking for a lock when not in a transaction

[Testcase]
 * Run included tests in test_start_up.py

[Regression Potential]
 * Minimal

mod_wsgi (pid=26521): Exception occurred processing WSGI script '/usr/share/maas/wsgi.py'.
Traceback (most recent call last):
  File "/usr/share/maas/wsgi.py", line 32, in <module>
    start_up()
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 54, in start_up
    with locks.startup:
  File "/usr/lib/python2.7/dist-packages/maasserver/utils/dblocks.py", line 77, in __enter__
    raise DatabaseLockAttemptOutsideTransaction(self)
DatabaseLockAttemptOutsideTransaction: <DatabaseLock classid=20120116 objid=1>
mod_wsgi (pid=26522): Target WSGI script '/usr/share/maas/wsgi.py' cannot be loaded as Python module.
mod_wsgi (pid=26522): Exception occurred processing WSGI script '/usr/share/maas/wsgi.py'.
Traceback (most recent call last):
  File "/usr/share/maas/wsgi.py", line 32, in <module>
    start_up()
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 54, in start_up
    with locks.startup:
  File "/usr/lib/python2.7/dist-packages/maasserver/utils/dblocks.py", line 77, in __enter__
    raise DatabaseLockAttemptOutsideTransaction(self)
DatabaseLockAttemptOutsideTransaction: <DatabaseLock classid=20120116 objid=1>

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maas - 1.6.1+bzr2550-0ubuntu1

---------------
maas (1.6.1+bzr2550-0ubuntu1) utopic; urgency=medium

  * New upstream bugfix release:
    - Auto-link node MACs to Networks (LP: #1341619)

  [ Julian Edwards ]
  * debian/maas-region-controller.postinst: Don't restart RabbitMQ on
    upgrades, just ensure it's running. Should prevent a race with the
    cluster celery restarting.
  * debian/rules: Pull upstream branch from the right place.

  [ Andres Rodriguez ]
  * debian/maas-region-controller.postinst: Ensure cluster celery is
    started if it also runs on the region.
 -- Julian Edwards <email address hidden> Thu, 21 Aug 2014 18:38:27 +1000

Changed in maas (Ubuntu):
status: New → Fix Released
description: updated
Changed in maas (Ubuntu Trusty):
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Greg Lutostanski (lutostag)
milestone: none → trusty-updates
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Gavin, or anyone else affected,

Accepted maas into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/maas/1.5.4+bzr2294-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Tested as part of other bug and this has been verified

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maas - 1.5.4+bzr2294-0ubuntu1.1

---------------
maas (1.5.4+bzr2294-0ubuntu1.1) trusty-proposed; urgency=medium

  * Add hardware enablement for armhf/keystone (LP: #1350103)
 -- Greg Lutostanski <email address hidden> Thu, 18 Sep 2014 16:43:56 -0500

Changed in maas (Ubuntu Trusty):
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
Changed in maas (Ubuntu):
importance: Undecided → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.