What's given in the logs is incorrect json, not sure if that's just the logger output.
function call stack
# we start here:
@inlineCallbacks
def do_action(self):
"""Update interfaces, catching and logging errors.
This can be overridden by subclasses to conditionally update based on
some external configuration.
"""
interfaces = None
try: interfaces = yield maybeDeferred(self.getInterfaces)
yield self._updateInterfaces(interfaces)
except BaseException as e:
msg = ( "Failed to update and/or record network interface " "configuration: %s; interfaces: %r" % (e, interfaces)
) log.err(None, msg)
# go get the interfaces:
def getInterfaces(self):
"""Get the current network interfaces configuration.
This can be overridden by subclasses.
"""
return deferToThread(get_all_interfaces_definition)
# get_all_interfaces_definition:
interfaces = {}
....
for name, details in ipaddr_info.items():
# ipaddr_info comes from ipaddr.py
ifaces = parse_lxd_networks(json.loads(output)["networks"])
_update_interface_type(ifaces)
# parse_lxd_networks() comes from lxd.py and returns a dictionary of interfaces
# then we call _updateInterfaces(interfaces) script_stdout = Path(stdout_path)
with script_stdout.open() as fp: lxd_data = json.load(fp) # we die here, fp is None
After upgrading to jammy and maas 3.3.4 rackd is throwing a stacktrace.
using debian package version/build 3.3.4-13189- g.f88272d1e- 0ubuntu1~ 22.04.1
Jul 30 01:31:46 infra-2 sh[1588]: 2023-07-30 01:31:46 RegionServer, 3237,:: ffff:10. 100.45. 11: [info] RegionServer connection lost (HOST:IPv6Addre ss(type= 'TCP', host=': :ffff:10. 100.45. 12', port=5251, flowInfo=0, scopeID=0) PEER:IPv6Addres s(type= 'TCP', host=': :ffff:10. 100.45. 11', port=35660, flowInfo=0, scopeID=0)) ver.utils. services: [critical] Failed to update and/or record network interface configuration: Expecting value: line 1 column 1 (char 0); interfaces: {'bondM': {<omitted for brevity..} python3/ dist-packages/ twisted/ internet/ defer.py" , line 857, in _runCallbacks python3/ dist-packages/ twisted/ internet/ defer.py" , line 1750, in gotResult context. run(_inlineCall backs, r, gen, status) python3/ dist-packages/ twisted/ internet/ defer.py" , line 1656, in _inlineCallbacks context. run( python3/ dist-packages/ twisted/ python/ failure. py", line 489, in throwExceptionI ntoGenerator python3/ dist-packages/ provisioningser ver/utils/ services. py", line 1092, in do_action erfaces( interfaces) python3/ dist-packages/ twisted/ internet/ defer.py" , line 1656, in _inlineCallbacks context. run( python3/ dist-packages/ twisted/ python/ failure. py", line 489, in throwExceptionI ntoGenerator python3/ dist-packages/ provisioningser ver/utils/ services. py", line 1176, in _updateInterfaces python3/ dist-packages/ twisted/ internet/ defer.py" , line 1656, in _inlineCallbacks context. run( python3/ dist-packages/ twisted/ python/ failure. py", line 489, in throwExceptionI ntoGenerator python3/ dist-packages/ provisioningser ver/utils/ services. py", line 1208, in _run_refresh python3/ dist-packages/ twisted/ python/ threadpool. py", line 244, in inContext attr-defined] python3/ dist-packages/ twisted/ python/ threadpool. py", line 260, in <lambda> attr-defined] python3/ dist-packages/ twisted/ python/ context. py", line 117, in callWithContext text(). callWithContext (ctx, func, *args, **kw) python3/ dist-packages/ twisted/ python/ context. py", line 82, in callWithContext python3/ dist-packages/ provisioningser ver/utils/ twisted. py", line 203, in wrapper python3/ dist-packages/ provisioningser ver/refresh/ __init_ _.py", line 56, in refresh python3/ dist-packages/ provisioningser ver/refresh/ __init_ _.py", line 170, in runscripts python3/ dist-packages/ provisioningser ver/utils/ services. py", line 1233, in _annotate_ commissioning python3. 10/json/ __init_ _.py", line 293, in load python3. 10/json/ __init_ _.py", line 346, in loads decoder. decode( s) python3. 10/json/ decoder. py", line 337, in decode python3. 10/json/ decoder. py", line 355, in raw_decode ("Expecting value", s, err.value) from None decoder. JSONDecodeError : Expecting value: line 1 column 1 (char 0)
Jul 30 01:31:46 infra-2 sh[1588]: 2023-07-30 01:31:46 maasserver.ipc: [info] Worker pid:4138 lost RPC connection to ('6d4nq6', '10.100.45.12', 5251).
Jul 30 01:31:49 infra-2 sh[1611]: 2023-07-30 01:31:49 provisioningser
Jul 30 01:31:49 infra-2 sh[1611]: #011Traceback (most recent call last):
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 current.result = callback( # type: ignore[misc]
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 current_
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 result = current_
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 return g.throw(self.type, self.value, self.tb)
Jul 30 01:31:49 infra-2 sh[1611]: #011--- <exception caught here> ---
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 yield self._updateInt
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 result = current_
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 return g.throw(self.type, self.value, self.tb)
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 yield self._run_refresh(
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 result = current_
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 return g.throw(self.type, self.value, self.tb)
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 yield deferToThread(
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 result = inContext.theWork() # type: ignore[
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 inContext.theWork = lambda: context.call( # type: ignore[
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 return self.currentCon
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 return func(*args, **kw)
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 result = func(*args, **kwargs)
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 failed_scripts = runscripts(
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 post_process_hook(
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 lxd_data = json.load(fp)
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 return loads(fp.read(),
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 return _default_
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jul 30 01:31:49 infra-2 sh[1611]: #011 File "/usr/lib/
Jul 30 01:31:49 infra-2 sh[1611]: #011 raise JSONDecodeError
Jul 30 01:31:49 infra-2 sh[1611]: #011json.
That line comes from here: https:/ /github. com/maas/ maas/blob/ 3.3.0-rc2/ src/provisionin gserver/ utils/services. py#L1219 where it tries to json load a filepath, but the filepath is None, and there is no where to see where stdout_path is being set.
What's given in the logs is incorrect json, not sure if that's just the logger output.
function call stack
# we start here: backs
@inlineCall
def do_action(self):
"""Update interfaces, catching and logging errors.
This can be overridden by subclasses to conditionally update based on
interfaces = yield maybeDeferred( self.getInterfa ces) erfaces( interfaces)
"Failed to update and/or record network interface "
"configuratio n: %s; interfaces: %r" % (e, interfaces)
log. err(None, msg)
some external configuration.
"""
interfaces = None
try:
yield self._updateInt
except BaseException as e:
msg = (
)
# go get the interfaces:
def getInterfaces( self):
"""Get the current network interfaces configuration.
This can be overridden by subclasses. get_all_ interfaces_ definition)
"""
return deferToThread(
# get_all_ interfaces_ definition: info.items( ):
interfaces = {}
....
for name, details in ipaddr_
# ipaddr_info comes from ipaddr.py networks( json.loads( output) ["networks" ]) interface_ type(ifaces)
ifaces = parse_lxd_
_update_
# parse_lxd_ networks( ) comes from lxd.py and returns a dictionary of interfaces
# then we call _updateInterfac es(interfaces)
script_ stdout = Path(stdout_path) stdout. open() as fp:
lxd_ data = json.load(fp) # we die here, fp is None
with script_
_get_resources_ bin_path( ): maas/machine- resources
/usr/share/
# interfaces is a dictionary
path = f"{prefix} /usr/share/ maas/machine- resources"