DHCP failure after upgrade to 2.9

We upgraded our MAAS 2.8.2 to 2.9 and since the upgrade our DHCP server is broken and won’t start and this we are unable to do a lot of what we need to with MAAS.

If I check in /var/snap/maas/common/maas the dhcpd.conf is missing. In the UI DHCP is not started.

In the regiond.log it spits out code as follows:

2020-12-17 07:42:51 maasserver.dhcp: [warn] No DNS servers found, DHCP defaulting to region IP.
2020-12-17 07:42:51 maasserver.rack_controller: [critical] Failed configuring DHCP on rack controller ‘id:2’.
Traceback (most recent call last):
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 1475, in gotResult
_inlineCallbacks(r, g, status)
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 1464, in _inlineCallbacks
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 501, in errback
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 568, in _startRunCallbacks
— —
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/rack_controller.py”, line 277, in
d.addErrback(lambda f: f.trap(NoConnectionsAvailable))
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 439, in trap
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 467, in raiseException
raise self.value.with_traceback(self.tb)
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/internet/defer.py”, line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/python/failure.py”, line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/dhcp.py”, line 864, in configure_dhcp
config = yield deferToDatabase(get_dhcp_configuration, rack_controller)
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/python/threadpool.py”, line 250, in inContext
result = inContext.theWork()
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/python/threadpool.py”, line 266, in
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/python/context.py”, line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File “/snap/maas/10851/usr/lib/python3/dist-packages/twisted/python/context.py”, line 85, in callWithContext
return func(*args,**kw)
File “/snap/maas/10851/lib/python3.8/site-packages/provisioningserver/utils/twisted.py”, line 860, in callInContext
return func(*args, **kwargs)
File “/snap/maas/10851/lib/python3.8/site-packages/provisioningserver/utils/twisted.py”, line 192, in wrapper
result = func(*args, **kwargs)
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/utils/orm.py”, line 737, in call_within_transaction
return func_outside_txn(*args, **kwargs)
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/utils/orm.py”, line 540, in retrier
return func(*args, **kwargs)
File “/usr/lib/python3.8/contextlib.py”, line 75, in inner
return func(*args, **kwds)
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/dhcp.py”, line 783, in get_dhcp_configuration
config = get_dhcp_configure_for(
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/dhcp.py”, line 663, in get_dhcp_configure_for
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/dhcp.py”, line 444, in make_subnet_config
dns_servers += [
File “/snap/maas/10851/lib/python3.8/site-packages/maasserver/dhcp.py”, line 447, in
if ipaddress in ip_network
File “/snap/maas/10851/usr/lib/python3/dist-packages/netaddr/ip/init.py”, line 1123, in contains
return IPAddress(other) in self
File “/snap/maas/10851/usr/lib/python3/dist-packages/netaddr/ip/init.py”, line 305, in init
raise AddrFormatError('failed to detect a valid IP ’
netaddr.core.AddrFormatError: failed to detect a valid IP address from None

I found this link with someone else who has the exact same problem.

I suspect the dhcpd.conf is not being generated by the maasserver/dhcp.py and this causing this problem.

We discovered that there was a new IPv6 network added and that was causing the problem, we removed it and once again all is working as it should be !!


@mikectza, that was good network detective work! i’m going to make a note to add this to our “tips, tricks, and traps” page as a potential gotcha. thanks for the update.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.