2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-30 12:57:46 +00:00

Accommodate XCC firmware behavior

It has been observed that a Lenovo XCC can fail to produce the
appropriate attributes in the SLP data.  In such a case, and only if we
are in the preconfig path (which means it is a candidate for discovery),
reset the XCC to try to correct the behavior.
This commit is contained in:
Jarrod Johnson 2018-01-23 13:07:59 -05:00
parent eccc7803a9
commit 9baa1f5652
2 changed files with 24 additions and 2 deletions

View File

@ -815,7 +815,12 @@ def eval_node(cfg, handler, info, nodename, manual=False):
# for now, we search switch only, ideally we search cmm, smm, and
# switch concurrently
# do some preconfig, for example, to bring a SMM online if applicable
handler.preconfig()
errorstr = handler.preconfig()
if errorstr:
if manual:
raise exc.InvalidArgumentException(errorstr)
log.log({'error': errorstr})
return
except Exception as e:
unknown_info[info['hwaddr']] = info
info['discostatus'] = 'unidentified'

View File

@ -22,7 +22,24 @@ class NodeHandler(immhandler.NodeHandler):
devname = 'XCC'
def preconfig(self):
ff = self.info.get('attributes', {}).get('enclosure-form-factor', '')
ff = None
try:
ff = self.info['attributes']['enclosure-form-factor']
except KeyError:
try:
# an XCC should always have that set, this is sign of
# a bug, try to reset the BMC as a workaround
ipmicmd = self._get_ipmicmd()
ipmicmd.reset_bmc()
return "XCC with address {0} did not have attributes " \
"declared, attempting to correct with " \
"XCC reset".format(self.ipaddr)
except pygexc.IpmiException as e:
if (e.ipmicode != 193 and
'Unauthorized name' not in str(e) and
'Incorrect password' not in str(e)):
# raise an issue if anything other than to be expected
raise
if ff not in ('dense-computing', [u'dense-computing']):
return
# attempt to enable SMM