This started happening to me out of the blue since yesterday. I am not using IPv6 with any of my subnets, however even with network discovery being off, the IPv6 address on the Rack Controllers (I have two) was added under fabric-0 and this was causing the Region Controllers (Two again on separate machines) go completely haywire!
The initial workaround was to configure the untagged subnet to only use one Rack Controller for DHCP services and then I went ahead and deleted the IPv6 auto-added subnet from fabric-0.
After that re-added the second Rack controller to restore HA and everything seems to be normal so far.
The trace looks the same as what was originally reported:
2024-02-19 03:16:46 maasserver.dhcp: [info] Successfully configured DHCPv4 on rack controller 'maas-rack-2 (6ks83s)'.
2024-02-19 03:16:46 maasserver.rack_controller: [critical] Failed configuring DHCP on rack controller 'id:2'.
Traceback (most recent call last):
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1750, in gotResult
current_context.run(_inlineCallbacks, r, gen, status)
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1740, in _inlineCallbacks
status.deferred.errback()
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 700, in errback
self._startRunCallbacks(fail)
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 763, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 857, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/rack_controller.py", line 281, in <lambda>
d.addErrback(lambda f: f.trap(NoConnectionsAvailable))
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/failure.py", line 451, in trap
self.raiseException()
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/failure.py", line 475, in raiseException
raise self.value.with_traceback(self.tb)
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 857, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/rack_controller.py", line 300, in unwatch_if_does_not_exist
f.trap(RackController.DoesNotExist)
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/failure.py", line 451, in trap
self.raiseException()
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/failure.py", line 475, in raiseException
raise self.value.with_traceback(self.tb)
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1656, in _inlineCallbacks
result = current_context.run(
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/failure.py", line 489, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/dhcp.py", line 867, in configure_dhcp
config = yield deferToDatabase(get_dhcp_configuration, rack_controller)
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 244, in inContext
result = inContext.theWork() # type: ignore[attr-defined]
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 260, in <lambda>
inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/snap/maas/33524/usr/lib/python3/dist-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/snap/maas/33524/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 857, in callInContext
return func(*args, **kwargs)
File "/snap/maas/33524/lib/python3.10/site-packages/provisioningserver/utils/twisted.py", line 203, in wrapper
result = func(*args, **kwargs)
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/utils/orm.py", line 771, in call_within_transaction
return func_outside_txn(*args, **kwargs)
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/utils/orm.py", line 574, in retrier
return func(*args, **kwargs)
File "/usr/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/dhcp.py", line 786, in get_dhcp_configuration
config = get_dhcp_configure_for(
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/dhcp.py", line 639, in get_dhcp_configure_for
peer_name, peer_config, peer_rack = make_failover_peer_config(
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/dhcp.py", line 508, in make_failover_peer_config
interface_ip_address = get_ip_address_for_rack_controller(
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/dhcp.py", line 258, in get_ip_address_for_rack_controller
return get_ip_address_for_interface(interface, vlan, ip_version)
File "/snap/maas/33524/lib/python3.10/site-packages/maasserver/dhcp.py", line 232, in get_ip_address_for_interface
for ip_address in interface.ip_addresses.all():
builtins.AttributeError: 'NoneType' object has no attribute 'ip_addresses'
This started happening to me out of the blue since yesterday. I am not using IPv6 with any of my subnets, however even with network discovery being off, the IPv6 address on the Rack Controllers (I have two) was added under fabric-0 and this was causing the Region Controllers (Two again on separate machines) go completely haywire!
The initial workaround was to configure the untagged subnet to only use one Rack Controller for DHCP services and then I went ahead and deleted the IPv6 auto-added subnet from fabric-0.
After that re-added the second Rack controller to restore HA and everything seems to be normal so far.
The trace looks the same as what was originally reported:
2024-02-19 03:16:46 maasserver.dhcp: [info] Successfully configured DHCPv4 on rack controller 'maas-rack-2 (6ks83s)'. rack_controller : [critical] Failed configuring DHCP on rack controller 'id:2'. maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ internet/ defer.py" , line 1750, in gotResult context. run(_inlineCall backs, r, gen, status) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ internet/ defer.py" , line 1740, in _inlineCallbacks deferred. errback( ) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ internet/ defer.py" , line 700, in errback _startRunCallba cks(fail) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ internet/ defer.py" , line 763, in _startRunCallbacks _runCallbacks( ) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ internet/ defer.py" , line 857, in _runCallbacks maas/33524/ lib/python3. 10/site- packages/ maasserver/ rack_controller .py", line 281, in <lambda> addErrback( lambda f: f.trap( NoConnectionsAv ailable) ) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ failure. py", line 451, in trap raiseException( ) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ failure. py", line 475, in raiseException with_traceback( self.tb) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ internet/ defer.py" , line 857, in _runCallbacks maas/33524/ lib/python3. 10/site- packages/ maasserver/ rack_controller .py", line 300, in unwatch_ if_does_ not_exist trap(RackContro ller.DoesNotExi st) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ failure. py", line 451, in trap raiseException( ) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ failure. py", line 475, in raiseException with_traceback( self.tb) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ internet/ defer.py" , line 1656, in _inlineCallbacks context. run( maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ failure. py", line 489, in throwExceptionI ntoGenerator maas/33524/ lib/python3. 10/site- packages/ maasserver/ dhcp.py" , line 867, in configure_dhcp (get_dhcp_ configuration, rack_controller) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ threadpool. py", line 244, in inContext attr-defined] maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ threadpool. py", line 260, in <lambda> theWork = lambda: context.call( # type: ignore[ attr-defined] maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ context. py", line 117, in callWithContext text(). callWithContext (ctx, func, *args, **kw) maas/33524/ usr/lib/ python3/ dist-packages/ twisted/ python/ context. py", line 82, in callWithContext maas/33524/ lib/python3. 10/site- packages/ provisioningser ver/utils/ twisted. py", line 857, in callInContext maas/33524/ lib/python3. 10/site- packages/ provisioningser ver/utils/ twisted. py", line 203, in wrapper maas/33524/ lib/python3. 10/site- packages/ maasserver/ utils/orm. py", line 771, in call_within_ transaction txn(*args, **kwargs) maas/33524/ lib/python3. 10/site- packages/ maasserver/ utils/orm. py", line 574, in retrier python3. 10/contextlib. py", line 79, in inner maas/33524/ lib/python3. 10/site- packages/ maasserver/ dhcp.py" , line 786, in get_dhcp_ configuration configure_ for( maas/33524/ lib/python3. 10/site- packages/ maasserver/ dhcp.py" , line 639, in get_dhcp_ configure_ for peer_config( maas/33524/ lib/python3. 10/site- packages/ maasserver/ dhcp.py" , line 508, in make_failover_ peer_config ip_address = get_ip_ address_ for_rack_ controller( maas/33524/ lib/python3. 10/site- packages/ maasserver/ dhcp.py" , line 258, in get_ip_ address_ for_rack_ controller address_ for_interface( interface, vlan, ip_version) maas/33524/ lib/python3. 10/site- packages/ maasserver/ dhcp.py" , line 232, in get_ip_ address_ for_interface ip_addresses. all(): AttributeError: 'NoneType' object has no attribute 'ip_addresses'
2024-02-19 03:16:46 maasserver.
Traceback (most recent call last):
File "/snap/
current_
File "/snap/
status.
File "/snap/
self.
File "/snap/
self.
--- <exception caught here> ---
File "/snap/
current.result = callback( # type: ignore[misc]
File "/snap/
d.
File "/snap/
self.
File "/snap/
raise self.value.
File "/snap/
current.result = callback( # type: ignore[misc]
File "/snap/
f.
File "/snap/
self.
File "/snap/
raise self.value.
File "/snap/
result = current_
File "/snap/
return g.throw(self.type, self.value, self.tb)
File "/snap/
config = yield deferToDatabase
File "/snap/
result = inContext.theWork() # type: ignore[
File "/snap/
inContext.
File "/snap/
return self.currentCon
File "/snap/
return func(*args, **kw)
File "/snap/
return func(*args, **kwargs)
File "/snap/
result = func(*args, **kwargs)
File "/snap/
return func_outside_
File "/snap/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/snap/
config = get_dhcp_
File "/snap/
peer_name, peer_config, peer_rack = make_failover_
File "/snap/
interface_
File "/snap/
return get_ip_
File "/snap/
for ip_address in interface.
builtins.