2019-10-18 23:41:37 |
Lee Trager |
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.
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.']} |
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.']} |
|