From 230397c2a31462ef5e047b30e591d7e901077b40 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 29 Jul 2014 09:24:02 -0400 Subject: [PATCH] Fix unexpected error on bad authentication When bad credentials were caught by pyghmi, the ipmi plugin was not specifically characterizing it. Address this shortcoming. --- .../confluent/plugins/hardwaremanagement/ipmi.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 71efa180..3cf35da1 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -256,6 +256,11 @@ class IpmiHandler(object): if self.broken: if self.error == 'timeout': return iter([msg.ConfluentTargetTimeout(self.node)]) + elif ('Unauthorized' in self.error or + 'Incorrect password' in self.error): + return iter([msg.ConfluentTargetInvalidCredentials(self.node)]) + elif 'Incorrect password' in self.error: + return iter([C]) else: raise Exception(self.error) if self.element == ['power', 'state']: