Rack controller fails to refresh due to 50-maas-01-commissioning post-processing failure

Bug #1848822 reported by Lee Trager on 2019-10-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Newell Jensen

Bug Description

I built master as a set of Debian packages and am running it in an LXD container. I noticed the following exception being raised in my MAAS logs.

There appears to be two bugs here

1. The LXD commissioning code always returns a blocksize of 0 when run in a container or not as root. This may be a permissions issue but could be something LXD could allow to be passed through.
2. Since all the other data is fine MAAS should be able to handle this case. One possible way would be to just default to 512 when 0 is returned.

machine-resources output in LXD container: http://paste.ubuntu.com/p/xQZXJkZhXH/
machine-resources output as a user on host: http://paste.ubuntu.com/p/dvyxk9VnVf/
machine-resource output as root on host: http://paste.ubuntu.com/p/vQ6DJfd4GT/

2019-10-18 23:28:46 metadataserver.api: [critical] maas-bionic.maas(sxaf3e): commissioning script '50-maas-01-commissioning' failed during post-processing.
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/metadataserver/api.py", line 799, in signal
     target_status = process(node, request, status)
   File "/usr/lib/python3/dist-packages/metadataserver/api.py", line 619, in _process_commissioning
     node, node.current_commissioning_script_set, request, status
   File "/usr/lib/python3/dist-packages/metadataserver/api.py", line 512, in _store_results
     **args, timedout=(status == SIGNAL_STATUS.TIMEDOUT)
   File "/usr/lib/python3/dist-packages/metadataserver/models/scriptresult.py", line 388, in store_result
     exit_status=self.exit_status,
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/metadataserver/api.py", line 438, in try_or_log_event
     func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/metadataserver/builtin_scripts/hooks.py", line 475, in process_lxd_results
     update_node_physical_block_devices(node, data, numa_nodes)
   File "/usr/lib/python3/dist-packages/metadataserver/builtin_scripts/hooks.py", line 716, in update_node_physical_block_devices
     firmware_version=firmware_version,
   File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 85, in manager_method
     return getattr(self.get_queryset(), name)(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 394, in create
     obj.save(force_insert=True, using=self.db)
   File "/usr/lib/python3/dist-packages/maasserver/models/cleansave.py", line 185, in save
     exclude=exclude_clean_fields, validate_unique=False
   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 1250, in full_clean
     raise ValidationError(errors)
 django.core.exceptions.ValidationError: {'block_size': ['Ensure this value is greater than or equal to 512.']}

Related branches

Lee Trager (ltrager) on 2019-10-18
description: updated
Changed in maas:
milestone: none → 2.7.0alpha1
assignee: nobody → Newell Jensen (newell-jensen)
importance: Undecided → High
status: New → Triaged
Changed in maas:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers