I found https://snapcraft.io/docs/snap-try and was able to use this procedure to get a tree based on the latest 3.4/edge (maas_33732.snap) that I could hack up and run.
I added the following tracing:
--- ./lib/python3.10/site-packages/provisioningserver/utils/network.py.orig 2024-02-26 18:12:45.469928677 +0000
+++ ./lib/python3.10/site-packages/provisioningserver/utils/network.py 2024-02-26 18:23:53.355421849 +0000
@@ -768,6 +768,9 @@ def safe_getaddrinfo(hostname, port, fam
def _v6_lookup():
resolver = getResolver()
answers = yield resolver.lookupIPV6Address(hostname)
+ import logging
+ for ans in answers[0]:
+ logging.error('_v6_lookup ans: %r', ans)
return [ (AF_INET6, sock_type, proto, "", (ans.address, port, 0, 0))
for ans in answers[0]
@@ -827,6 +830,17 @@ def resolve_hostname(hostname, ip_versio
# The contents of sockaddr differ for IPv6 and IPv4, but the
# first element is always the address, and that's all we care
# about.
+ import logging
+ for address_info_rec in address_info:
+ logging.error('one item in address_info: %r', address_info_rec)
+ for one_entry in address_info_rec:
+ logging.error(' - %r', one_entry)
+ try:
+ family, socktype, proto, canonname, sockaddr = address_info_rec
+ logging.error('%r, %r, %r, %r, %r', family, socktype, proto, canonname, sockaddr)
+ except Exception as e:
+ logging.error(e)
+
return { IPAddress(sockaddr[0])
for family, socktype, proto, canonname, sockaddr in address_info
The result:
2024-02-26 18:28:42 root: [error] one item in address_info: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.21.66.4', 0))
2024-02-26 18:28:42 root: [error] - <AddressFamily.AF_INET: 2>
2024-02-26 18:28:42 root: [error] - <SocketKind.SOCK_STREAM: 1>
2024-02-26 18:28:42 root: [error] - 6
2024-02-26 18:28:42 root: [error] - ''
2024-02-26 18:28:42 root: [error] - ('172.21.66.4', 0)
2024-02-26 18:28:42 root: [error] <AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.21.66.4', 0)
2024-02-26 18:28:42 root: [error] one item in address_info: <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] _v6_lookup ans: <RR name=ci-maas.eng.exagrid.com type=AAAA class=IN ttl=3468s auth=False>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0 current result: <twisted.python.failure.Failure builtins.AttributeError: 'RRHeader' object has no attribute 'address'>>
Not sure why the twisted DNS resolver is getting that result. The name in question resolves fine:
root@smaasc1008:~/squashfs-root# host ci-maas.eng.exagrid.com
ci-maas.eng.exagrid.com has address 172.21.66.4
ci-maas.eng.exagrid.com has IPv6 address 2602:fbab:e0:1066::4
I found https:/ /snapcraft. io/docs/ snap-try and was able to use this procedure to get a tree based on the latest 3.4/edge (maas_33732.snap) that I could hack up and run.
I added the following tracing:
--- ./lib/python3. 10/site- packages/ provisioningser ver/utils/ network. py.orig 2024-02-26 18:12:45.469928677 +0000 10/site- packages/ provisioningser ver/utils/ network. py 2024-02-26 18:23:53.355421849 +0000 o(hostname, port, fam lookupIPV6Addre ss(hostname) error(' _v6_lookup ans: %r', ans)
( AF_INET6, sock_type, proto, "", (ans.address, port, 0, 0)) hostname( hostname, ip_versio
IPAddress( sockaddr[ 0])
+++ ./lib/python3.
@@ -768,6 +768,9 @@ def safe_getaddrinf
def _v6_lookup():
resolver = getResolver()
answers = yield resolver.
+ import logging
+ for ans in answers[0]:
+ logging.
return [
for ans in answers[0]
@@ -827,6 +830,17 @@ def resolve_
# The contents of sockaddr differ for IPv6 and IPv4, but the
# first element is always the address, and that's all we care
# about.
+ import logging
+ for address_info_rec in address_info:
+ logging.error('one item in address_info: %r', address_info_rec)
+ for one_entry in address_info_rec:
+ logging.error(' - %r', one_entry)
+ try:
+ family, socktype, proto, canonname, sockaddr = address_info_rec
+ logging.error('%r, %r, %r, %r, %r', family, socktype, proto, canonname, sockaddr)
+ except Exception as e:
+ logging.error(e)
+
return {
for family, socktype, proto, canonname, sockaddr in address_info
The result:
2024-02-26 18:28:42 root: [error] one item in address_info: (<AddressFamily .AF_INET: 2>, <SocketKind. SOCK_STREAM: 1>, 6, '', ('172.21.66.4', 0)) AF_INET: 2> SOCK_STREAM: 1> AF_INET: 2>, <SocketKind. SOCK_STREAM: 1>, 6, '', ('172.21.66.4', 0) maas.eng. exagrid. com type=AAAA class=IN ttl=3468s auth=False> python. failure. Failure builtins. AttributeError: 'RRHeader' object has no attribute 'address'>>
2024-02-26 18:28:42 root: [error] - <AddressFamily.
2024-02-26 18:28:42 root: [error] - <SocketKind.
2024-02-26 18:28:42 root: [error] - 6
2024-02-26 18:28:42 root: [error] - ''
2024-02-26 18:28:42 root: [error] - ('172.21.66.4', 0)
2024-02-26 18:28:42 root: [error] <AddressFamily.
2024-02-26 18:28:42 root: [error] one item in address_info: <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0>
2024-02-26 18:28:42 root: [error] _v6_lookup ans: <RR name=ci-
2024-02-26 18:28:42 root: [error] - <Deferred at 0x7fddd7bf01c0 current result: <twisted.
Not sure why the twisted DNS resolver is getting that result. The name in question resolves fine:
root@smaasc1008 :~/squashfs- root# host ci-maas. eng.exagrid. com eng.exagrid. com has address 172.21.66.4 eng.exagrid. com has IPv6 address 2602:fbab: e0:1066: :4
ci-maas.
ci-maas.