dhcpd.conf not written due to byte size of hosts value in rpc

Bug #1980000 reported by Cory
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned
3.3
Triaged
Medium
Unassigned

Bug Description

I am using version 2.8.7-8611-g.f2514168f-0ubuntu1~18.04.1

MaaS stops being able to write the dhcpd.conf and never starts the dhcpd service.

Taking a look at the python module used by MaaS it appears there is a 64k byte limit.

2022-06-17 16:33:30 maasserver.dhcp: [critical] Error configuring DHCPv4 on rack controller 'maas-server (7gyesb)':
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/provisioningserver/prometheus/utils.py", line 126, in wrapper
     result = func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 142, in wrapper
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/rpc/common.py", line 178, in __call__
     timeout, self._conn.callRemote, cmd, **kwargs
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 340, in deferWithTimeout
     d = maybeDeferred(func, *args, **kwargs)
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 150, in maybeDeferred
     result = f(*args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 971, in callRemote
     return co._doCommand(self)
   File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 2002, in _doCommand
     self.requiresAnswer)
   File "/usr/lib/python3/dist-packages/provisioningserver/rpc/common.py", line 263, in _sendBoxCommand
     command, box, requiresAnswer=requiresAnswer
   File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 902, in _sendBoxCommand
     box._sendTo(self.boxSender)
   File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 723, in _sendTo
     proto.sendBox(self)
   File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 2386, in sendBox
     self.transport.write(box.serialize())
   File "/usr/lib/python3/dist-packages/twisted/protocols/amp.py", line 701, in serialize
     raise TooLong(False, True, v, k)
 twisted.protocols.amp.TooLong:

Tags: dhcp amp
Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

Hi,

can you share some characteristics of your setup?

1) number of subnets
2) number of hosts
3) are you using DHCP snippets?

Changed in maas:
status: New → Incomplete
Revision history for this message
Cory (user195182) wrote (last edit ):

1) 2 Subnets
2) 3300
3) Yes a global snippet which doesn't appear in the UI anymore since we started experiencing the mentioned issue.

Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

MAAS RPC protocol has a 64kB limitation but usually the compression we use avoids hitting this limit. We need to add pagination to this request.

Changed in maas:
status: Incomplete → Triaged
importance: Undecided → Critical
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

This issue appears to happen on clusters with large DHCP config, and needs to be investigated & resolved.

Note: MAAS 2.8 is no longer supported, so we encourage to upgrade to the latest MAAS version.

Changed in maas:
importance: Critical → Medium
milestone: none → 3.3.0
Changed in maas:
milestone: 3.3.0 → 3.4.0
tags: added: amp dhcp
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
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.