Activity log for bug #1848822

Date Who What changed Old value New value Message
2019-10-18 23:38:58 Lee Trager bug added bug
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.']}
2019-10-18 23:41:40 Lee Trager maas: milestone 2.7.0alpha1
2019-10-18 23:41:56 Lee Trager maas: assignee Newell Jensen (newell-jensen)
2019-10-18 23:41:59 Lee Trager maas: importance Undecided High
2019-10-18 23:42:07 Lee Trager maas: status New Triaged
2019-10-21 23:29:21 Launchpad Janitor merge proposal linked https://code.launchpad.net/~newell-jensen/maas/+git/maas/+merge/374483
2019-10-22 00:45:57 MAAS Lander maas: status Triaged Fix Committed
2019-12-04 17:50:20 Adam Collard maas: status Fix Committed Fix Released