Project

General

Profile

Bug #50401

Fix a handful of API calls to accept null values

Added by Marcelo Araujo about 1 year ago. Updated 8 months ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I'm trying to update RancherOS to its latest release and seems it is broken in different parts.

Trying to create it using wizard: [EFAULT] Failed to create VM: [devices] Item#0 is not valid per list types: [order] null not allowed

[2018/10/09 06:22:56] (TRACE) middlewared.send_event():1086 - Sending event "CHANGED":{'id': 3, 'fields': {'id': 3, 'method': 'vm.create_container', 'arguments': [{'type': 'RancherOS', 'memory': '2048', 'name': 'TestDocker', 'vcpus': '1', 'autostart': True, 'root_password': 'docker', 'devices': [{'dtype': 'NIC', 'attributes': {'type': 'E1000', 'mac': '00:a0:98:50:81:48', 'nic_attach': 'igb0'}}, {'dtype': 'RAW', 'attributes': {'path': '/mnt/ssd/docker//docker_TestDocker', 'exists': False, 'type': 'AHCI', 'size': 20, 'sectorsize': 0}}]}], 'logs_path': None, 'logs_excerpt': None, 'progress': {'percent': 80, 'description': 'Creating Docker VM', 'extra': None}, 'result': None, 'error': '[EFAULT] Failed to create VM: [devices] Item#0 is not valid per list types: [order] null not allowed', 'exception': 'Traceback (most recent call last):\n  File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/vm.py", line 1243, in create_container\n    vm = await self.middleware.call(\'vm.create\', vmdata)\n  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1049, in call\n    return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)\n  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 986, in _call\n    return await methodobj(*args)\n  File "/usr/local/lib/python3.7/site-packages/middlewared/service.py", line 284, in create\n    f\'{self._config.namespace}.create\', self, self.do_create, [data]\n  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 986, in _call\n    return await methodobj(*args)\n  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 735, in nf\n    args, kwargs = clean_and_validate_args(args, kwargs)\n  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 693, in clean_and_validate_args\n    value = attr.clean(args[args_index + i])\n  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 456, in clean\n    data[key] = attr.clean(value)\n  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 361, in clean\n    raise Error(self.name, \'Item#{0} is not valid per list types: {1}\'.format(index, found))\nmiddlewared.schema.Error: [devices] Item#0 is not valid per list types: [order] null not allowed\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 333, in run\n    await self.future\n  File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 362, in __run_body\n    rv = await self.method(*([self] + args))\n  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 736, in nf\n    return await f(*args, **kwargs)\n  File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/vm.py", line 1245, in create_container\n    raise CallError(f\'Failed to create VM: {e}\')\nmiddlewared.service_exception.CallError: [EFAULT] Failed to create VM: [devices] Item#0 is not valid per list types: [order] null not allowed\n', 'exc_info': {'type': 'CallError', 'extra': None}, 'state': 'FAILED', 'time_started': datetime.datetime(2018, 10, 9, 6, 22, 43, 701333), 'time_finished': datetime.datetime(2018, 10, 9, 6, 22, 56, 141305)}}


Related issues

Has duplicate FreeNAS - Bug #50420: [DOCKER/VM] Failed to create sharefsClosed

Associated revisions

Revision 8eaf7b5b (diff)
Added by William Grzybowski about 1 year ago

fix(middlewared): allow null values for most Str attributes For backward compatibility. Ticket: #50401

Revision 26743083 (diff)
Added by William Grzybowski about 1 year ago

fix(middlewared): allow null values for most Str attributes For backward compatibility. Ticket: #50401

Revision 3a648375 (diff)
Added by William Grzybowski about 1 year ago

fix(middlewared): allow null values for most Str attributes For backward compatibility. Ticket: #50401

History

#1 Updated by Bug Clerk about 1 year ago

  • Status changed from Unscreened to In Progress

#2 Updated by Dru Lavigne about 1 year ago

  • Target version set to 11.3

#3 Updated by Bug Clerk about 1 year ago

  • Status changed from In Progress to Ready for Testing

#4 Updated by William Grzybowski about 1 year ago

  • Has duplicate Bug #50420: [DOCKER/VM] Failed to create sharefs added

#5 Updated by William Grzybowski about 1 year ago

  • Subject changed from [Docker/VM] Failed to create VM. to Fix a handful of API calls to accept null values

#6 Updated by Dru Lavigne about 1 year ago

  • Needs Merging changed from Yes to No

#7 Updated by Dru Lavigne about 1 year ago

  • Needs Doc changed from Yes to No

#8 Updated by Dru Lavigne 10 months ago

  • Target version changed from 11.3 to 11.3-BETA1

#9 Updated by William Grzybowski 9 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Cannot be tested by QA team.

#10 Updated by Dru Lavigne 9 months ago

  • Status changed from Passed Testing to Done

#11 Updated by Dru Lavigne 8 months ago

  • Target version changed from 11.3-BETA1 to 11.3-ALPHA1

Also available in: Atom PDF