Failed configuring DHCP on rack controller - too many values to unpack (expected 5)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Committed
|
High
|
Christian Grabowski | ||
3.3 |
Fix Released
|
High
|
Christian Grabowski | ||
3.4 |
Fix Released
|
High
|
Christian Grabowski | ||
3.5 |
Fix Released
|
High
|
Christian Grabowski |
Bug Description
I just upgraded from 3.3 to to maas --channel 3.4/stable/hotfix-bug-2053033 to pick up a fix for https:/
After that upgrade, the virsh connection issue is resolved, but now I'm seeing DHCP problems (e.g. servers get new addresses, but do not update DNS in MAAS). The /var/snap/
2024-02-25 07:01:32 maasserver.
Traceback (most recent call last):
File "/snap/
File "/snap/
File "/snap/
File "/snap/
--- <exception caught here> ---
File "/snap/
File "/snap/
File "/snap/
File "/snap/
raise self.value.
File "/snap/
File "/snap/
File "/snap/
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/
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/
File "/snap/
File "/snap/
ips = get_maas_
File "/snap/
File "/snap/
return {
File "/snap/
for family, socktype, proto, canonname, sockaddr in address_info
2024-02-25 07:01:32 twisted.
2024-02-25 07:01:32 twisted.
Traceback (most recent call last):
File "/snap/
File "/snap/
File "/snap/
File "/snap/
--- <exception caught here> ---
File "/snap/
result = current_
File "/snap/
return [
File "/snap/
(Btw, what is the best way to debug this? I can't edit the code in place and restart because the snap is read-only.)
Related branches
- MAAS Lander: Approve
- Christian Grabowski: Approve
-
Diff: 227 lines (+131/-7)2 files modifiedsrc/provisioningserver/utils/network.py (+49/-4)
src/provisioningserver/utils/tests/test_network.py (+82/-3)
- MAAS Lander: Approve
- Christian Grabowski: Approve
-
Diff: 106 lines (+41/-9)2 files modifiedsrc/provisioningserver/utils/network.py (+15/-5)
src/provisioningserver/utils/tests/test_network.py (+26/-4)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 3.4.x |
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Christian Grabowski (cgrabowski) |
Changed in maas: | |
status: | In Progress → Fix Committed |
milestone: | 3.4.x → 3.6.0 |
Some additional info: The maas_url has a hostname for which there is a A and AAAA record in DNS. The region controller has both addresses. As far as I can see, with that config, we end up calling provisioningser ver.utils. network. safe_getaddrinf o and take the short path that simply calls socket.getaddrinfo. If I run through this codepath in an interactive shell, everything seems to work fine:
root@smaasc1008:~# sudo snap run --shell maas :/root# python3 'hostname. from.url' EAI_NODATA, EAI_NONAME, gaierror, getaddrinfo, IPPROTO_ TCP,) hostname, port, family=0, proto=IPPROTO_TCP)
root@smaasc1008
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> hostname=
>>> port=0
>>> from socket import (
... AF_INET, AF_INET6,
>>> addr_info = getaddrinfo(
>>> {sockaddr[0] for family, socktype, proto, canonname, sockaddr in addr_info}
{'172.21.66.4', '1234:5678:9:a::4'}