Project

General

Profile

Bug #43224

Fix traceback when creating a Docker or bhyve clone in the new UI

Added by Michael Reynolds over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
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

Virtual Machines Click Options (3 veritcal dots) -> Edit on existing VM
(Docker or bhyve) -> Click Clone

The card flips back over and there is a message "creating clone" but the
clone is never created.
Have left the UI at this screen for 10+ minutes and the clone is never created

No error or traceback provided in the WebUI

Checked /var/log/middlewared.log
[2018/08/28 16:41:23] (WARNING) application.call_method():182 - Exception while calling vm.clone(*[2])
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 155, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1023, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 963, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 664, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 1271, in clone
vm['name'] = await self.__next_clone_name(vm['name'])
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 1252, in __next_clone_name
for i in await self.middleware.call('vm.query', [('name', '~', rf'{name}_clone\d+')])
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1027, in call
return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 963, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 664, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/service.py", line 269, in query
filter_list, result, filters, options
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 923, in run_in_io_thread
return await self.loop.run_in_executor(executor, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/utils/__init__.py", line 145, in filter_list
raise ValueError('Invalid operation: {}'.format(op))
ValueError: Invalid operation: ~

This looks like a middelware issue to me.

I tried to check "Edit" on the VM while it was in the "creating clone" state and the card flipped over to a blank box.

This is more than likely do to the state the VM is in, but reporting for the sake of being complete.

[2018/08/28 16:43:21] (WARNING) middlewared._loop_monitor_thread():1116 - Task seems blocked: File "/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 78, in impl
return await handler(request)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1090, in ws_handler
await connection.on_message(x)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 316, in on_message
asyncio.ensure_future(self.call_method(message))
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 85, in debug_wrapper
return CoroWrapper(gen, None)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 95, in __init__
self._source_traceback = events.extract_stack(sys._getframe(1))
File "/usr/local/lib/python3.6/asyncio/events.py", line 93, in extract_stack
lookup_lines=False)
File "/usr/local/lib/python3.6/traceback.py", line 354, in extract
linecache.checkcache(filename)
File "/usr/local/lib/python3.6/linecache.py", line 74, in checkcache
stat = os.stat(fullname)

CannotCreateVM-Clone-2018-08-28.png (131 KB) CannotCreateVM-Clone-2018-08-28.png Michael Reynolds, 08/28/2018 09:48 AM
VM-PropertiesBlankCard-2018-08-28.png (123 KB) VM-PropertiesBlankCard-2018-08-28.png Michael Reynolds, 08/28/2018 09:51 AM
26305
26312

Related issues

Related to FreeNAS - Bug #40181: Do not allow multiple VMs with same nameDone

Associated revisions

Revision 88545c3b (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/vm): ensure snapshot/clone worked and remove device id Ticket: #43224

Revision 11644368 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/vm): ensure snapshot/clone worked and remove device id Ticket: #43224

History

#1 Updated by Michael Reynolds over 1 year ago

  • File 43224-debug.tgz added
  • Private changed from No to Yes

Attached a debug

#2 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Not Started
  • Severity changed from New to Medium

#3 Updated by William Grzybowski over 1 year ago

  • Related to Bug #40181: Do not allow multiple VMs with same name added

#4 Updated by Dru Lavigne over 1 year ago

  • Target version changed from Backlog to 11.2-BETA3

#5 Updated by Bug Clerk over 1 year ago

  • Status changed from Not Started to In Progress

#6 Updated by Bug Clerk over 1 year ago

  • Status changed from In Progress to Ready for Testing

#7 Updated by Dru Lavigne over 1 year ago

  • File deleted (43224-debug.tgz)

#8 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Cannot create a Docker or bhyve clone in the new UI to Fix traceback when creating a Docker or bhyve clone in the new UI
  • Private changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#9 Updated by Michael Reynolds over 1 year ago

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

Created a new bhyve VM named BUG-43224
Edit -> Clone
A new clone is created named BUG-43224_clone0

#10 Updated by Dru Lavigne over 1 year ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF