FPC PSU status reporting requires OEM commands. Provide
OEM to pyghmi sensor model translation. to enable normal
applications to read it.
Change-Id: I63b950db7ffa5a5a2ba2ed3a2f2be33a53221b03
In a multi-SOL multiplex case, keepalives could
bring the whole thing to a grinding halt.
Fix this by having a way to request raw_command do
'waitall', which is really just running wait_for_rsp
recursively, as used to happen. This is not done by default
as for normal synchronous requests, it is a much more expensive
approach at scale. Reserve it for the special case of wait_for_rsp
which should not hang up on any one response going south.
Change-Id: If8890bf959c2376f58c2b36f0445a5b800280b2b
If session no longer exists, do not try to manipulate it's keepalives.
Remove instances of calling the function where it would be redundant.
Change-Id: I2011f8012175ef12ce83eb34fbf4de9650fb157e
When a system did not have any custom keep alive, the
code to mark the esssion broken erroneously tries to
dereference.
Change-Id: Ic4efe3c65ee4c09c97ef9f08dc30603c4c15d872
Software could end up creating duplicate console
objects. Try to adapt by assuring only the most
recently created one is the sol_handler (by using
existing sol_handler to reach old instance). Also
unhook a keepalive when we go broken. When the ipmi
session breaks, notify all custom keepalives active,
rather than just the one currently holding SOL session.
Some of these changes in principle may be duplicate, but
it should be more robust this way.
Change-Id: Id8d3869917de3db723a4b6a79e02643345111b3a
If a system runs many ipmi clients, over time
it may reuse UDP ports. We currently take this
as a sign of an established relationship in
the same manner we have client to server, but
here clients can be ephemeral. Cope by
clearing out the current session state
and allowing a new session to come alive.
Change-Id: I2496716d535354616461460f47196d733cde1a87
If a client used a non-zero IPMI sequence
number, honor the number and separate it
from the LUN. Also, start session sequence
number at 1 when session is established.
Change-Id: Ife4a03965185160b31e5ca70d455db0e301c4d6f
BMC would try to push a bytearray at unpack. In
python 2.6, this does not work. Explicitly denote
changing to bytes to be compatible with python 2.6
Change-Id: I1c919a0050cae9f90c50d89abb6a77774db81381
The bitmask used to parse the raid driver parameters was reading a wrong
byte for device state entry. Now this problem is fixed - a new entry was
added (ControllerIndex).
Change-Id: I877075f38737ebd386d3b2c18f5ae4ec7dd3d6f2
In the fix Ib7465ace5b370b31dab5334a34f7216170e1ff2b,
we used cold_reset() as NMI, but it is not correct.
According to [1], we should add a new interface to handle
NMI.
[1]https://sourceforge.net/p/ipmitool/source/ci/
9caa78be38f2bdf1f3c03571f0c7310a1cb486b7/tree/
include/ipmitool/ipmi_constants.h
Change-Id: I711053704d27a74a29bb6f50ca85666dd2049d65
Thinkserver SD350 chassis identify command does not implement
indefinite activation. Work around by using an OEM command that
does manage that.
Change-Id: Ic83c42ac39dd18fb6c51d025d1c0c58d75161637
Python 3 requires that strings be explicitly
declared as binary if they need to be treated
as such (implicit strings are unicode rather
than ascii)
Change-Id: I17e5d2ef44ffc106c94b95247585130b07d44417
The spec [1] is trying to support nmi, so that
we should also enhance bmc to support it.
[1] I3dc6561ea7cecf8b8d998717fefa9cf8001d0f4c
Change-Id: Ib7465ace5b370b31dab5334a34f7216170e1ff2b
The data parameter is defaulted to a tuple, to avoid a TypeError
this needs to be converted to a list before it can be concatenated
with another list.
Change-Id: Iba42196e9f9b9315b684a5ceadf16313f13fdd25
Older IMM systems have a slightly different structure. Tolerate by skipping the
extended storage data when not available.
Change-Id: Ifc5b9de0e87ceb648c3045b357af434b9e8288e5
While fetching eventlog, if a communication problem
occurs, the exception was ignored and code fell through
to unitialized variable. Fix this by raising if not the
value known to be ignored.
Change-Id: I7785d0b3695abd84a8cac23059c031956877db58
xraw_command is the version intended to be lazily
used, switch to that version to make the SDR code
more robust.
Change-Id: I1e9b799dd21861fa602db6a1d474334e88915c38
When an anomaly is detected that suggests the event timeline is
uselessly corrupt, abandon all attempts to correct older entries
and skip or verbatim translate remaining time entries. The notable
scenario is when an older event has a higher timestamp value than
a newer event (time went backwards, or pre-init to normal) without a
clock sync notification to navigate the change.
Change-Id: I31aa9cd04e20fbdb55d7b955db6f6640da9c75a7
M4 systems do not support agentless, but return
data differently. Avoid generating an exception
in this scenario.
Change-Id: I2da1fb67d12a71249ba5e3b6be93a57ba66fcab6
In nextscale, the FPC has some potentially useful data
about node state with explanation. Model those as
sensors that may appear in nodehealth
Change-Id: I9dd64740c4934d53d577defe9f3cc7b7a61dc499
Since the keepalive is retried, there's no reason to try
to be as frequent as half the specified interval. The
spec allows inactivity timeout as short as 57 seconds, so
the keepalive interval is extended to 50-55 (allowing some
room for retry to hit in case of dropped packet).
Change-Id: I3b08f2cad1f319759cd0cc54a8793ec16d88d82e
There's no RST file that uses ".. math" and thus
the pngmath Sphinx extension is not used and can
get removed.
Change-Id: I3ea4b529025c8ac3c4092f3720124647861e6668
This patch is adding a new parameter called "timeout" to the listen()
method of the Bmc class to allow configuring the right timeout for the
IPMI session. The default timeout continues to be 30 seconds, just like
it was when hardcoded.
Change-Id: Ie00d62157eea321747e02492b0a3d1d6ff991024
Lenovo System X systems offer up more inventory over agentless.
Provide this data when the possibility presents itself.
Change-Id: Ic377e951b5a6308157891f98dfdad6311337af48
When data steering was implemented to improve
performance, the server component was not updated
to be able to receive steered data. Update the server
component with the needed interfaces to be compatible
with the performance enhancement.
Change-Id: I251cfaaf80d7ae45b60f03e39a46a683d913396b
Agentless data may have information about firmware of
disks. This commit adds support for reading it when
available. Note that some devices may not appear,
depending on the drive controller in use and timing
factors.
Change-Id: I24033a4fe7ed056018dab2747e71845fdcaa5cf0
Some adapters present empty agentless fields. For
such scenarios, skip enumerating the key. This avoids
date parsing errors, among other things.
Change-Id: I3df5f1dd320aa2e915760b6d2cae0f04ec5e09c6
It is frequent that a client may hammer request
for firmware inventory. To facilitate this use case,
store and reuse data for 30 seconds, so long as the ipmi
session has not changed.
Change-Id: Ia356e3161a2ccf1c717eec09696e265263d8255b
IMM has an active, backup, and trusted image. Add
info about the trusted image to IMM inventory to
make that clear.
Change-Id: I771cee6831d11c2b7dbc780475582e9030d7e7b6
In the 'has_megarac' call, it erroneously was assumed that
any IpmiException reflected the BMC indicating explicitly that
it didn't understand something about the command. However
IpmiException is frequently used without a code to indicate
some harder error that can't relate to a system return code.
Address this by raising the exception if it didn't have a
BMC error code initialized. It may be possible to get even
more specific, but somewhat limited because we could be getting
a 'invalid command' or 'invalid command length' or some 0x80
neighborhood error code, some OEM response. Fortunately
things are limited since this code should only ever fire
against Lenovo equipment, but still keeping things open ended.
Change-Id: Ia84d1474f7d6787d162c6c7ef448f269d826cc2a
Other Lenovo equipment uses the 'get build id' command. This
switches to a facility more specifically designed to indicate
what class of Lenovo service processor is in play. As a result,
the firmware inventory function has to fend for itself.
Change-Id: Id0354ebd4dbf57a0ff59860df663195b93adba1c
A prerelease system was using 7154 vendor id internally,
but this is not going to be the case when released. Stop
hooking generic value to avoid being overly aggressive.
Change-Id: I19258e226c03b0158c9a4a3430eaa1de33c10648
IPv4-only environments may come in two forms. It
may not even have kernel support for AF_INET6, detect
and tolerate this by fallback to AF_INET. Secondly,
it may have AF_INET6 support, but not have any IPv6
addresses, including ::1, so fall back to IPv4 localhost
in that scenario.
Change-Id: I9e2f992afa9f6e71d1210701ac53080d8e788028
This commit adds support for fetching extended System X firmware
information. This includes, as supported by the model,
extended IMM info, backup IMM, UEFI (primary, backup, and pending),
as well as available firmware from agentless system x options.
Change-Id: Iea09af0dd54938dbfe54b64c0a1084cb7ad2264f
Some implementations are confused on the endianness of SOL port number.
Recognize both 623 and 28418 as the default. This poses a challenge
should the day come that non-standard port is desired, but it seems
very unlikely for that to come up...
Change-Id: Ib184a9102fd24a0c27d7a3f5adf86b8d1dca22ea