1.9 failed power query requests for SM15K servers

Bug #1532262 reported by Larry Michel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Unassigned
1.9
Critical
Unassigned

Bug Description

We upgraded to 1.9.0+bzr4533-0ubuntu1~trusty1 and maas is failing to do power queries for SM15K servers.

The REST API calls are failing for power actions on SM15K nodes and the issue is related to the maas node getting passed into the call instead of the System ID from power parameters.

For example, servers/node-7995ff76-b614-11e5-9e28-00163eca07b6/0 should be servers/0/0 for System ID 0.

==> /var/log/maas/clusterd.log <==
2016-01-08 14:37:23+0000 [-] 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 PowerQuery command. [maas-trusty-back-may22:pid=1553:cmd=PowerQuery:ask=2e3]
        Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 423, in errback
            self._startRunCallbacks(fail)
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
            self._runCallbacks()
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1155, in gotResult
            _inlineCallbacks(r, g, deferred)
        --- <exception caught here> ---
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
            result = result.throwExceptionIntoGenerator(g)
          File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
            return g.throw(self.type, self.value, self.tb)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/power/query.py", line 126, in get_power_state
            system_id, hostname, power_type, context)
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
            result = result.throwExceptionIntoGenerator(g)
          File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
            return g.throw(self.type, self.value, self.tb)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/drivers/power/__init__.py", line 246, in query
            self.power_query, system_id, context)
          File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
            result = context.call(ctx, function, *args, **kwargs)
          File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/drivers/power/seamicro.py", line 98, in power_query
            ip, username, password, system_id)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/drivers/hardware/seamicro.py", line 344, in power_query_seamicro15k_v2
            server = api.servers.get(server_id)
          File "/usr/lib/python2.7/dist-packages/seamicroclient/v2/servers.py", line 69, in get
            "/servers/%s" % base.getid(server))
          File "/usr/lib/python2.7/dist-packages/seamicroclient/base.py", line 87, in _get
            _resp, body = self.api.client.get(url)
          File "/usr/lib/python2.7/dist-packages/seamicroclient/client.py", line 173, in get
            return self._cs_request(url, 'GET', **kwargs)
          File "/usr/lib/python2.7/dist-packages/seamicroclient/client.py", line 158, in _cs_request
            method,**kwargs)
          File "/usr/lib/python2.7/dist-packages/seamicroclient/client.py", line 140, in _time_request
            resp, body = self.request(url, method, **kwargs)
          File "/usr/lib/python2.7/dist-packages/seamicroclient/client.py", line 134, in request
            raise exceptions.from_response(resp, body, url, method)
        seamicroclient.exceptions.NotFound: Not Found: servers/node-7995ff76-b614-11e5-9e28-00163eca07b6/0 (HTTP 404)

Tags: oil Edit Tag help

Related branches

Larry Michel (lmic)
description: updated
description: updated
Revision history for this message
Larry Michel (lmic) wrote :

Power query for sm15k system is working with patch from attached branch, and I was able to recommission all the systems.

Changed in maas:
milestone: none → next
status: New → Triaged
importance: Undecided → Critical
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
Changed in maas:
milestone: next → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers