No reason visible in Web UI when a commissioning step fails in the central processing by regiond

Bug #1910411 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
New
Undecided
Unassigned

Bug Description

MAAS Version 2.8.2 installed from snap

We recently hit a curious problem that was rooted in two machines having the same hardware UUID.

While this is probably a fault of the hardware manufacturer, it would be great if MAAS could make errors happening in the central processing in regoind visible in the Web UI to help users avoid spending unnecessary time debugging commissioning errors.

After a long time we eventually stumbled upon this in regiond.log:
2021-01-06 06:16:06 metadataserver.api: [critical] ps5-ra1-n5.maas(7ehyrm): commissioning script '50-maas-01-commissioning' failed during post-processing.
        Traceback (most recent call last):
          File "/snap/maas/8980/lib/python3.6/site-packages/metadataserver/api.py", line 800, in signal
            target_status = process(node, request, status)
          File "/snap/maas/8980/lib/python3.6/site-packages/metadataserver/api.py", line 622, in _process_commissioning
            node, node.current_commissioning_script_set, request, status
          File "/snap/maas/8980/lib/python3.6/site-packages/metadataserver/api.py", line 515, in _store_results
            **args, timedout=(status == SIGNAL_STATUS.TIMEDOUT)
          File "/snap/maas/8980/lib/python3.6/site-packages/metadataserver/models/scriptresult.py", line 391, in store_result
            exit_status=self.exit_status,
        --- <exception caught here> ---
          File "/snap/maas/8980/lib/python3.6/site-packages/metadataserver/api.py", line 441, in try_or_log_event
            func(*args, **kwargs)
          File "/snap/maas/8980/lib/python3.6/site-packages/metadataserver/builtin_scripts/hooks.py", line 728, in process_lxd_results
            node.save()
          File "/snap/maas/8980/lib/python3.6/site-packages/maasserver/models/node.py", line 1954, in save
            super(Node, self).save(*args, **kwargs)
          File "/snap/maas/8980/lib/python3.6/site-packages/maasserver/models/cleansave.py", line 216, in save
            self.validate_unique(exclude=exclude_unique_fields)
          File "/snap/maas/8980/usr/lib/python3/dist-packages/django/db/models/base.py", line 1041, in validate_unique
            raise ValidationError(errors)
        django.core.exceptions.ValidationError: {'hardware_uuid': ['Node with this Hardware uuid already exists.']}

It would be great if this was logged together with the failed commissining script or in the Event log in the UI.

Apparently we are not the only one hitting this issue: https://discourse.maas.io/t/maas-2-8-edge-modifying-uuid-reported-by-enlisting-node/1965/2

Tags: ps5
Frode Nordahl (fnordahl)
description: updated
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Frode Nordahl (fnordahl) wrote :

> Sounds like a dup of https://bugs.launchpad.net/maas/+bug/1893690

For that specific issue, yes, but I wonder if there is an opportunity to add some generic representation of server-side processing errors in the UI for the next situation we do not know about yet.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.