[2.1] 'NoneType' object has no attribute 'external_dhcp'

Bug #1627363 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Mike Pontillo
2.0
Won't Fix
Undecided
Unassigned

Bug Description

2016-09-24 18:41:47 [-] Unhandled failure dispatching AMP command. This is probably a bug. Please ensure that this error is handled within application code or declared in the signature of the b'
ReportForeignDHCPServer' command. [xenial-maas20:pid=22275:cmd=ReportForeignDHCPServer:ask=4]
        Traceback (most recent call last):
          File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1203, in mainLoop
            self.runUntilCurrent()
          File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 798, in runUntilCurrent
            f(*a, **kw)
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 434, in errback
            self._startRunCallbacks(fail)
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 501, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 588, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 1149, in checkKnownErrors
            key = error.trap(*command.allErrors)
          File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 342, in trap
            self.raiseException()
          File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 368, in raiseException
            raise self.value.with_traceback(self.tb)
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
            result = inContext.theWork()
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
            inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 827, in callInContext
            return func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 603, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 422, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.5/contextlib.py", line 30, in inner
            return func(*args, **kwds)
          File "/usr/lib/python3/dist-packages/maasserver/rpc/rackcontrollers.py", line 182, in update_foreign_dhcp
            if interface.vlan.external_dhcp != dhcp_ip:
        builtins.AttributeError: 'NoneType' object has no attribute 'external_dhcp'

Related branches

Changed in maas:
milestone: none → 2.1.0
importance: Undecided → Critical
summary: - 'NoneType' object has no attribute 'external_dhcp'
+ [2.1] 'NoneType' object has no attribute 'external_dhcp'
Gavin Panella (allenap)
Changed in maas:
status: New → Triaged
Revision history for this message
Mike Pontillo (mpontillo) wrote :

This is an interesting bug. We are getting a notification about an external DHCP server for an interface that appears to have no VLAN.

It's possible that this could occur if there is a race condition where the interface was disconnected for awhile, and the notification occurred in the 30-second window of time between when the interface was reconnected and when the MAAS region was notified of the change. But this seems unlikely.

I can put in a quick fix for the crash, but we should also look at the interfaces on your system, how they're modeled in MAAS, and which one would most likely report an external DHCP address.

Changed in maas:
status: Triaged → Incomplete
status: Incomplete → Triaged
Revision history for this message
Mike Pontillo (mpontillo) wrote :

I decided to log a warning if this happens so we can further investigate the circumstances if this happens again. We should hold off on backporting this to 2.0 (if deemed necessary) until we fully understand the cause.

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
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.