[2.0 beta 2] builtins.TypeError: cannot use a bytes pattern on a string-like object

Bug #1570609 reported by Andres Rodriguez on 2016-04-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Gavin Panella

Bug Description

==> /var/log/maas/rackd.log <==
2016-04-14 17:39:26-0400 [-] 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'PowerQuery' command. [maas00:pid=1513:cmd=PowerQuery:ask=14]
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1184, in gotResult
     _inlineCallbacks(r, g, deferred)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1174, in _inlineCallbacks
     deferred.errback()
   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/twisted/protocols/amp.py", line 1149, 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/internet/defer.py", line 1126, in _inlineCallbacks
     result = result.throwExceptionIntoGenerator(g)
   File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
     return g.throw(self.type, self.value, self.tb)
   File "/usr/lib/python3/dist-packages/provisioningserver/power/query.py", line 103, in get_power_state
     raise exc_type(exc_value).with_traceback(exc_trace)
   File "/usr/lib/python3/dist-packages/provisioningserver/power/query.py", line 92, in get_power_state
     system_id, hostname, power_type, context)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
     result = result.throwExceptionIntoGenerator(g)
   File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
     return g.throw(self.type, self.value, self.tb)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/power/__init__.py", line 240, in query
     self.power_query, system_id, context)
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, 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/drivers/power/amt.py", line 374, in power_query
     return self.wsman_query_state(ip_address, power_pass)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/power/amt.py", line 196, in wsman_query_state
     state = self.get_power_state(output)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/power/amt.py", line 88, in get_power_state
     for doc in self._parse_multiple_xml_docs(xml)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/power/amt.py", line 72, in _parse_multiple_xml_docs
     xmldecls = xmldecl.finditer(xml)
 builtins.TypeError: cannot use a bytes pattern on a string-like object

Related branches

summary: - [2.0 beta 2] wsman cli issue
+ [2.0 beta 2] builtins.TypeError: cannot use a bytes pattern on a
+ string-like object
Changed in maas:
milestone: none → 2.0.0
importance: Undecided → Critical
Changed in maas:
status: New → Triaged
assignee: nobody → Andres Rodriguez (andreserl)
status: Triaged → In Progress
Gavin Panella (allenap) on 2016-04-18
Changed in maas:
status: In Progress → Fix Committed
assignee: Andres Rodriguez (andreserl) → Gavin Panella (allenap)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers