2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Add explicit error about certificate mismatch

Before we were aborting without info.  Now explain the missing
information by including the error explaining why it is missing.
This commit is contained in:
Jarrod Johnson 2017-10-17 13:46:40 -04:00
parent 757df0f571
commit d26f6259a7

View File

@ -701,9 +701,16 @@ class IpmiHandler(object):
def read_firmware(self, component):
items = []
for id, data in self.ipmicmd.get_firmware():
if component == 'all' or component == simplify_name(id):
items.append({id: data})
try:
for id, data in self.ipmicmd.get_firmware():
if component == 'all' or component == simplify_name(id):
items.append({id: data})
except exc.PubkeyInvalid:
self.output.put(msg.ConfluentNodeError(
self.node,
'Extended information unavailable, mismatch detected between '
'target certificate fingerprint and '
'pubkeys.tls_hardwaremanager attribute'))
self.output.put(msg.Firmware(items, self.node))
def handle_inventory(self):