[xenial, 1.10] Removing host maps fails

Bug #1525445 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Blake Rouse

Bug Description

Upon deleting a node, I saw the following exception on the cluster:

http://paste.ubuntu.com/13947680/

2015-12-11 16:08:50-0800 [-] Unhandled failure dispatching AMP command. This is probably a bug. Please ensure that this error is handled within application code or declared in the signature of the b'RemoveHostMaps' command. [maastest:pid=10973:cmd=RemoveHostMaps:ask=f]
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1203, in mainLoop
     self.runUntilCurrent()
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 798, in runUntilCurrent
     f(*a, **kw)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 434, in errback
     self._startRunCallbacks(fail)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 501, in _startRunCallbacks
     self._runCallbacks()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 588, in _runCallbacks
     current.result = callback(current.result, *args, **kw)
   File "/usr/lib/python3/dist-packages/provisioningserver/twisted/protocols/amp.py", line 1131, in checkKnownErrors
     key = error.trap(*command.allErrors)
   File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 342, in trap
     self.raiseException()
   File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 368, in raiseException
     raise self.value.with_traceback(self.tb)
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 241, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 257, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 197, in wrapper
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/rpc/dhcp.py", line 244, in remove_host_maps
     omshell.remove(identifier)
   File "/usr/lib/python3/dist-packages/provisioningserver/dhcp/omshell.py", line 219, in remove
     returncode, output = self._run(stdin)
   File "/usr/lib/python3/dist-packages/provisioningserver/dhcp/omshell.py", line 125, in _run
     stdout, stderr = proc.communicate(stdin)
   File "/usr/lib/python3.5/subprocess.py", line 1068, in communicate
     stdout, stderr = self._communicate(input, endtime, timeout)
   File "/usr/lib/python3.5/subprocess.py", line 1687, in _communicate
     input_view = memoryview(self._input)
 builtins.TypeError: memoryview: a bytes-like object is required, not 'str'

This also resulted in the following error in the UI:

The delete action for 1 node failed with error: (b'UNHANDLED', 'Unknown Error [maastest:pid=10973:cmd=RemoveHostMaps:ask=f]')

Tags: python3

Related branches

Revision history for this message
Blake Rouse (blake-rouse) wrote :

This is also an issue with commissioning. I am fixing this as part of fixing commissioning.

Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: none → 1.10.0
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.