[2.3] Unhandled error in deferred when tgt fails to start

Bug #1735025 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Lee Trager
2.3
Fix Released
High
Lee Trager

Bug Description

The snap sometimes fails to start tgt, but this seems to be crashing twisted and the error is not handled properly.

2017-11-29 00:37:13 twisted.internet.defer: [critical] Unhandled error in Deferred:
2017-11-29 00:37:13 twisted.internet.defer: [critical]

Traceback (most recent call last):
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 434, in errback
    self._startRunCallbacks(fail)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 501, in _startRunCallbacks
    self._runCallbacks()
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 588, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1184, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/rpc/boot_images.py", line 145, in _import_boot_images
    imported = yield deferToThread(_run_import, sources, **proxies)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
    result = inContext.theWork()
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/utils/twisted.py", line 232, in wrapper
    result = func(*args, **kwargs)
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/rpc/boot_images.py", line 119, in _run_import
    imported = boot_resources.import_images(sources)
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/import_images/boot_resources.py", line 310, in import_images
    update_iscsi_targets(os.path.join(storage, 'current'))
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/import_images/boot_resources.py", line 258, in update_iscsi_targets
    update_targets_conf(snapshot_path)
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/import_images/boot_resources.py", line 208, in update_targets_conf
    service_monitor.ensureService("tgt").wait(30)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/crochet/_eventloop.py", line 231, in wait
    result.raiseException()
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/python/failure.py", line 368, in raiseException
    raise self.value.with_traceback(self.tb)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/utils/service_monitor.py", line 567, in _ensureService
    yield self._performServiceAction(service, action)
  File "/snap/maas/1315/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
    result = g.send(result)
  File "/snap/maas/1315/lib/python3.5/site-packages/provisioningserver/utils/service_monitor.py", line 422, in _performServiceAction
    raise ServiceActionError(error_msg)
provisioningserver.utils.service_monitor.ServiceActionError: Service 'tgt' failed to start:

Related branches

Changed in maas:
milestone: none → 2.4.x
importance: Undecided → High
status: New → Triaged
Changed in maas:
assignee: nobody → Lee Trager (ltrager)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.4.x → 2.4.0alpha1
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.