Snap build request changes cause snap builds to fail with DB permission errors

Bug #1828089 reported by Colin Watson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Matias Bordese

Bug Description

Following r18956, dispatching snap builds fails as follows:

2019-05-07 12:47:07+0000 [-] Traceback (most recent call last):
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 500, in errback
2019-05-07 12:47:07+0000 [-] self._startRunCallbacks(fail)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
2019-05-07 12:47:07+0000 [-] self._runCallbacks()
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
2019-05-07 12:47:07+0000 [-] current.result = callback(current.result, *args, **kw)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1442, in gotResult
2019-05-07 12:47:07+0000 [-] _inlineCallbacks(r, g, deferred)
2019-05-07 12:47:07+0000 [-] --- <exception caught here> ---
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
2019-05-07 12:47:07+0000 [-] result = result.throwExceptionIntoGenerator(g)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/python/failure.py", line 422, in throwExceptionIntoGenerator
2019-05-07 12:47:07+0000 [-] return g.throw(self.type, self.value, self.tb)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/buildmaster/interactor.py", line 515, in findAndStartJob
2019-05-07 12:47:07+0000 [-] candidate, vitals, builder, slave, new_behaviour, logger)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
2019-05-07 12:47:07+0000 [-] result = result.throwExceptionIntoGenerator(g)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/python/failure.py", line 422, in throwExceptionIntoGenerator
2019-05-07 12:47:07+0000 [-] return g.throw(self.type, self.value, self.tb)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/buildmaster/interactor.py", line 488, in _startBuild
2019-05-07 12:47:07+0000 [-] yield behaviour.dispatchBuildToSlave(logger)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
2019-05-07 12:47:07+0000 [-] result = result.throwExceptionIntoGenerator(g)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/python/failure.py", line 422, in throwExceptionIntoGenerator
2019-05-07 12:47:07+0000 [-] return g.throw(self.type, self.value, self.tb)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/buildmaster/model/buildfarmjobbehaviour.py", line 116, in dispatchBuildToSlave
2019-05-07 12:47:07+0000 [-] self.composeBuildRequest(logger))
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
2019-05-07 12:47:07+0000 [-] result = result.throwExceptionIntoGenerator(g)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/python/failure.py", line 422, in throwExceptionIntoGenerator
2019-05-07 12:47:07+0000 [-] return g.throw(self.type, self.value, self.tb)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/buildmaster/model/buildfarmjobbehaviour.py", line 98, in composeBuildRequest
2019-05-07 12:47:07+0000 [-] args = yield self.extraBuildArgs(logger=logger)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
2019-05-07 12:47:07+0000 [-] result = g.send(result)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/snappy/model/snapbuildbehaviour.py", line 161, in extraBuildArgs
2019-05-07 12:47:07+0000 [-] timestamp = format_as_rfc3339(build_request.date_requested)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/snappy/model/snap.py", line 213, in date_requested
2019-05-07 12:47:07+0000 [-] return self._job.date_created
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/services/propertycache.py", line 115, in __get__
2019-05-07 12:47:07+0000 [-] value = self.populate(instance)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/snappy/model/snap.py", line 208, in _job
2019-05-07 12:47:07+0000 [-] return job_source.getBySnapAndID(self.snap, self.id)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/lib/lp/snappy/model/snapjob.py", line 231, in getBySnapAndID
2019-05-07 12:47:07+0000 [-] SnapJob.job_type == cls.class_job_type).one()
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/storm/store.py", line 1179, in one
2019-05-07 12:47:07+0000 [-] result = self._store._connection.execute(select)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/storm/databases/postgres.py", line 306, in execute
2019-05-07 12:47:07+0000 [-] return Connection.execute(self, statement, params, noresult)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/storm/database.py", line 241, in execute
2019-05-07 12:47:07+0000 [-] raw_cursor = self.raw_execute(statement, params)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/storm/databases/postgres.py", line 316, in raw_execute
2019-05-07 12:47:07+0000 [-] return Connection.raw_execute(self, statement, params)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/storm/database.py", line 374, in raw_execute
2019-05-07 12:47:07+0000 [-] self._run_execution(raw_cursor, args, params, statement)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/storm/database.py", line 388, in _run_execution
2019-05-07 12:47:07+0000 [-] self._check_disconnect(raw_cursor.execute, *args)
2019-05-07 12:47:07+0000 [-] File "/srv/launchpad.net/codelines/soyuz-production-rev-18958/env/local/lib/python2.7/site-packages/storm/database.py", line 454, in _check_disconnect
2019-05-07 12:47:07+0000 [-] return function(*args, **kwargs)
2019-05-07 12:47:07+0000 [-] psycopg2.ProgrammingError: permission denied for relation snapjob

Related branches

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson)
Changed in launchpad:
status: Fix Committed → Fix Released
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.