Hi Team,
We are using MAAS 3.2.6 and tried to commission a node(physical machine) and it always fails on 50-maas-01-commissioning
Please find the exception below in the regiond logs.
2023-02-04 06:19:45 metadataserver.api: [critical] enough-bull.drut(yrcey3): commissioning script ‘50-maas-01-commissioning’ failed during post-processing.
Traceback (most recent call last):
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/api.py”, line 866, in signal
target_status = process(node, request, status)
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/api.py”, line 690, in _process_commissioning
self._store_results(
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/api.py”, line 575, in _store_results
script_result.store_result(
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/models/scriptresult.py”, line 372, in store_result
signal_status = try_or_log_event(
— —
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/api.py”, line 493, in try_or_log_event
func(*args, **kwargs)
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/builtin_scripts/hooks.py”, line 1092, in process_lxd_results
_process_lxd_resources(node, data)
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/builtin_scripts/hooks.py”, line 611, in _process_lxd_resources
network_devices = update_node_network_information(node, data, numa_nodes)
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/builtin_scripts/hooks.py”, line 227, in update_node_network_information
update_node_interfaces(node, data)
File “/snap/maas/x1/lib/python3.8/site-packages/provisioningserver/utils/twisted.py”, line 202, in wrapper
result = func(*args, **kwargs)
File “/snap/maas/x1/lib/python3.8/site-packages/maasserver/utils/orm.py”, line 740, in call_within_transaction
return func_within_txn(*args, **kwargs)
File “/usr/lib/python3.8/contextlib.py”, line 75, in inner
return func(*args, **kwds)
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/builtin_scripts/network.py”, line 116, in update_node_interfaces
interface = update_interface(
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/builtin_scripts/network.py”, line 195, in update_interface
return update_physical_interface(
File “/snap/maas/x1/lib/python3.8/site-packages/metadataserver/builtin_scripts/network.py”, line 236, in update_physical_interface
interface, created = PhysicalInterface.objects.get_or_create(
File “/snap/maas/x1/lib/python3.8/site-packages/maasserver/models/interface.py”, line 436, in get_or_create
interface, created = super().get_or_create(*args, **kwargs)
File “/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/manager.py”, line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/query.py”, line 538, in get_or_create
return self.get(**kwargs), False
File “/snap/maas/x1/usr/lib/python3/dist-packages/django/db/models/query.py”, line 410, in get
raise self.model.MultipleObjectsReturned(
maasserver.models.interface.MultipleObjectsReturned: get() returned more than one PhysicalInterface – it returned 2!
From the exception, I understood that two records were found in the maasserver_interface table for the mac_address of the machine.
I checked the maasserver_interface table by filtering with the mac_address of the machine and could see only one entry for the mac_address.
This is the first-time commissioning the machine.
Could you please have a look and let us know the reason for the failure and provide a solution or workaround?
Regards,
Rohit