MAAS version: 2.9.2 (9165-g.c3e7848d1)
Commissioning of servers (Huawei CH121 V5) is successfull from the first try.
However if I try to re-commission the server the process fails, saying that 50-maas-commissioning script failed, however the script is ok and I can see the output in stdout.
But in the logs I find the error (see below)
Then if I try again a few times, eventually they all succeed to re-commission.
Tried checking the database - didn't find any duplicate machines.
So it's not another machine with the same interface/MAC, it is complaining about the exact same machine.
full regiond: https://private-fileshare.canonical.com/~alitvinov/random/fg-regiond.txt
regiond.log:
2021-05-26 12:35:53 metadataserver.api: [critical] u0400s2enthc03.maas(yr6bfp): commissioning script '50-maas-01-commissioning' failed during post-processing.
Traceback (most recent call last):
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/api.py", line 820, in signal
target_status = process(node, request, status)
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/api.py", line 641, in _process_commissioning
self._store_results(
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/api.py", line 529, in _store_results
script_result.store_result(
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/models/scriptresult.py", line 384, in store_result
signal_status = try_or_log_event(
--- <exception caught here> ---
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/api.py", line 447, in try_or_log_event
func(*args, **kwargs)
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/builtin_scripts/hooks.py", line 767, in process_lxd_results
_process_lxd_resources(node, data["resources"])
File "/snap/maas/12555/lib/python3.8/ site-packages/metadataserver/builtin_scripts/hooks.py", line 515, in _process_lxd_resources
update_node_network_information(node, data, numa_nodes)
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/builtin_scripts/hooks.py", line 316, in update_node_network_information
update_interface_details(interface, interfaces_info)
File "/snap/maas/12555/lib/python3.8/site-packages/metadataserver/builtin_scripts/hooks.py", line 231, in update_interface_details
interface.save(update_fields=["updated", *update_fields])
File "/snap/maas/12555/lib/python3.8/site-packages/maasserver/models/interface.py", line 1640, in save
return super().save(*args, **kwargs)
File "/snap/maas/12555/lib/python3.8/site-packages/maasserver/models/cleansave.py", line 186, in save
self.validate_unique(exclude=[self._meta.pk.name])
File "/snap/maas/12555/usr/lib/python3/dist-packages/django/db/models/base.py", line 987, in validate_unique
raise ValidationError(errors)
django.core.exceptions.ValidationError: {'__all__': ['Interface with this Node and Name already exists.']}
Workaround is to delete and re-add machine, then it will commission from the first try.A