Project

General

Profile

Bug #58860

Fix orphan VM devices

Added by William Grzybowski almost 2 years ago. Updated almost 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Seen in:
Severity:
Low Medium
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

TypeError: 'NoneType' object is not subscriptable
  File "middlewared/main.py", line 161, in call_method
    result = await self.middleware.call_method(self, message)
  File "middlewared/main.py", line 1109, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "middlewared/main.py", line 1049, in _call
    return await methodobj(*args)
  File "middlewared/schema.py", line 664, in nf
    return await f(*args, **kwargs)
  File "middlewared/service.py", line 266, in query
    'datastore.query', self._config.datastore, [], datastore_options
  File "middlewared/main.py", line 1113, in call
    return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
  File "middlewared/main.py", line 1063, in _call
    return await run_method(methodobj, *args)
  File "middlewared/main.py", line 1009, in run_in_thread
    return await self.loop.run_in_executor(executor, functools.partial(method, *args, **kwargs))
  File "concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "plugins/datastore.py", line 175, in query
    select=options.get('select'),
  File "plugins/datastore.py", line 90, in __queryset_serialize
    self.middleware, i, extend=extend, field_prefix=field_prefix, select=select
  File "middlewared/utils/__init__.py", line 58, in django_modelobj_serialize
    data = middleware.call_sync(extend, data)
  File "middlewared/main.py", line 1139, in call_sync
    return fut.result()
  File "concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "middlewared/main.py", line 1049, in _call
    return await methodobj(*args)
  File "plugins/vm.py", line 608, in _extend_vm
    for device in await self.middleware.call('vm.device.query', [('vm', '=', vm['id'])]):
  File "middlewared/main.py", line 1113, in call
    return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
  File "middlewared/main.py", line 1049, in _call
    return await methodobj(*args)
  File "middlewared/schema.py", line 664, in nf
    return await f(*args, **kwargs)
  File "middlewared/service.py", line 266, in query
    'datastore.query', self._config.datastore, [], datastore_options
  File "middlewared/main.py", line 1113, in call
    return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
  File "middlewared/main.py", line 1063, in _call
    return await run_method(methodobj, *args)
  File "middlewared/main.py", line 1009, in run_in_thread
    return await self.loop.run_in_executor(executor, functools.partial(method, *args, **kwargs))
  File "concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "plugins/datastore.py", line 175, in query
    select=options.get('select'),
  File "plugins/datastore.py", line 90, in __queryset_serialize
    self.middleware, i, extend=extend, field_prefix=field_prefix, select=select
  File "middlewared/utils/__init__.py", line 58, in django_modelobj_serialize
    data = middleware.call_sync(extend, data)
  File "middlewared/main.py", line 1139, in call_sync
    return fut.result()
  File "concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "middlewared/main.py", line 1049, in _call
    return await methodobj(*args)
  File "plugins/vm.py", line 1513, in extend_device
    device['vm'] = device['vm']['id']

https://sentry.ixsystems.com/ixsystems/freenas-middleware/issues/18852/


Related issues

Copied to FreeNAS - Bug #58878: Fix orphan VM devicesDone

Associated revisions

Revision 70924450 (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/vm): make sure device VM exists Ticket: #58860

Revision d033f666 (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/vm): make sure device VM exists Ticket: #58860

Revision 12dc4034 (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/vm): make sure device VM exists Ticket: #58860 (cherry picked from commit 7092445087f8e52c41da21780663b2f0af4db934)

History

#1 Updated by Bug Clerk almost 2 years ago

  • Status changed from Not Started to In Progress

#2 Updated by Bug Clerk almost 2 years ago

  • Status changed from In Progress to Ready for Testing

#3 Updated by Bug Clerk almost 2 years ago

  • Copied to Bug #58878: Fix orphan VM devices added

#4 Updated by William Grzybowski almost 2 years ago

  • Status changed from Ready for Testing to Done
  • Target version changed from 11.3 to Master - FreeNAS Nightlies
  • Needs QA changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

No way for QA to test this.

Also available in: Atom PDF