Comment 0 for bug 1508741

MAAS is unable to reach the BMC's. Howeve,r instead of correctly handling the timeout, it is erroring out. The machines shoudl show a RED for power error in the UI, but it is not the case. They still show the status before this issue (which was on)

2015-10-22 09:31:04+0800 [ClusterClient,client] late-women: Power could not be turned off.
        Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 382, in callback
            self._startRunCallbacks(result)
          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/change.py", line 287, in change_power_state
            system_id, hostname, power_type, power_change, 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 276, in perform_power
            power_func, system_id, **kwargs)
          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/ipmi.py", line 166, in power_off
            self._issue_ipmi_command('off', **kwargs)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/drivers/power/ipmi.py", line 144, in _issue_ipmi_command
            ipmi_chassis_config_command, power_change, power_address, env)
          File "/usr/lib/python2.7/dist-packages/provisioningserver/drivers/power/ipmi.py", line 82, in _issue_ipmi_chassis_config_command
            "Failed to power %s %s: %s" % (change, address, stderr))
        provisioningserver.drivers.power.PowerFatalError: Failed to power off 192.168.4.27: /usr/sbin/ipmi-chassis-config: connection timeout