Do not try to doubly use weakref in SDR,
and otherwise use a more transparent weakref.proxy,
since we are not hashing any values.
Change-Id: Ib1e0e59b2e52988d75830ffa5422407c53a68561
SDR and SDR entries had a cyclic reference to ipmicmd. Weaken
it so that it won't cause issues (whether real or just
complicating output of guppy)
Change-Id: Iad9c9726026f46c9a104c4a7464fad9b17d336ea
If an 'onlogon' handler is passed, discard it after being invoked. This allows
the objects to be garbage collected where otherwise they may not be.
Change-Id: I92488adca9150204512db5e4872e2b54bd0c076d
For now, use weakref to break a cyclic reference.
Longer term, probably refactor the needed 'xraw_command' to session and
pass session to the handler rather than the parent command handler.
Change-Id: If129ff6abf8666978aa05b6695ed7373070cd6b9
It was possible for a session to accumulate
a plurality of events per raw_command issued.
Alter the behavior of session to set and discard
*all* pending events on exit. This means that if
there are multiple commands waiting, then things
will be a tad more work than is strictly necessary,
but it's the simplest way to eliminate the leak,
the amount of senseless work is pretty small even
in some pretty tortuous cases, and it only has
any impact when many commands are being hit against
same target concurrently without coordination, which
is rare.
Change-Id: I3f023cee6fc7bb537c1a508d3113f2ff238828de
Other tools use DIMM serial numbers in hexadecimal. This
makes sense as the underlying format is unspecified, so
a hexadecimal value would make that more clear.
Change-Id: I724d76ea8af7d20ee8ff0e294a9f96ffb571e80e
Rather than use a lookup table (which requires maintenance),
implement the formula used to calculate the speed. This further
makes it a bit more robust in the face of minor timing tweaks
that might change the clock a megahertz up or down.
Change-Id: I6336bdc07af361a31b5a51698d0231d876791f16
It was possible for multiple command requests to be pending. While pending,
if a waiter was awoken first, *then* the satisfied command, then the waiter
will stall in the next iteration, recovering only after the failsafe mechanism kicks
in. Address by having the instance clearing incommand set() the next event in
line.
Change-Id: I8dbd08027596b4acccace6599f996ad547a47768
As a network configuration item, gateway mac addresses are rarely used. However,
some devices consider such a request an attempt to do arp, and will slow their response
trying to fill in a field that no one cares about. Allow calling code to disable fetching of
this frequently problematic data.
Change-Id: Ia9b434e2a74983d822c91d5248815a0312942c15
Provide a function for indicating a remote media by URI.
Implements the underpinniings with respect to MegaRAC
underpinnings.
Change-Id: Icbaa8f91fad26632834335cc29eff57d14ee6450
IPv6 interfaces tend to emphasize more open ended
use of aliases. To support this, have ipv6_addresses
manifest as a list, to allow for implementations to
extend to represent more complex situations.
Change-Id: Ia5727ff4830da58f847a7090e45dc819d4f216b2
Prior to IPv6 being pulled into the proper specification,
there were OEM commands to implement it. Pull in the AMI
OEM version for systems with TSMs present.
Change-Id: I137887fc57a3daa652f1e0a1bd50a806d3e42b13
Rework the thread behavior and raw_command to avoid
a ton of needless wakeups for unrelated concurrent execution.
It is saving about 20% of CPU time on ~50 node run.
The savings should scale proportionate to concurrency.
Change-Id: Iff3eaacd6c92d5734e1d1eb19e7be53e269e42cc
When logging in, the caller is released to submit a new command before
the session is actually logged in. Fix this by waiting for the appropriate
flag to go False.
Change-Id: I884b7da1b64c6786f673a18ee4c7d2ca69ec0bff
When doing the attempt to correct time, the sense of comparison was
incorrect and the timestamp field was neglected. Correct this
mistake and oversight.
Change-Id: Ia3ff187d0eaedcfea9f3b7d2c8f292162bb3bb50
Nextscale Fan/Power Controllers have several data
sources that would normally be considered 'sensors',
but are implemented through proprietary commands.
Extend the sensors data from these sources.
Change-Id: Ieaaae54b3edb409fac8f3932d51175c61ebdc44f
In order to have bdist_rpm output serviceable,
add the license field. This results in an rpm
that has all the fields desired.
Change-Id: I18f75f89385ac5022050372925c19f46206244f9
Provide a method for applications to evaluate target
certificates. Force them to do so if such a thing is
needed. Use this to support TSM remote graphics, which
sholud be over https for sake of security.
Change-Id: Ie67b629b0021c356d2ea001e24c72ad196e5460d
The design was to abandon retry when data comes in,
ACK or not. This became a problem when console.py
retried under frantic conditions, confusing some
BMC implementations, and so that was removed.
With that removed, BMC traffic was still cancelling
the retry, but nothing was reinstated in retry anymore.
Fix by having session.py understand a few bits of SOL
payload enough to identify at least if it is *an* ACK
at all. If it's one of the 'weird' ACK scenarios,
sol handler still must handle, but simple no-ACK scenario
now contained in session.py.
Change-Id: I609ff783cd6cc2bf431271280bb55da4126f2cfc
This change allows IpmiServer objects to be created with bind addresses
other than ::. It is useful when multiple BMC processes are running on a
single server, with each bound to a different nic.
Change-Id: Ice82bf788269a31819e4495e15b9ce19a1dd057b
Since change I8f566543c8da28eb7ed76f1cb80ff4cb2dcbba96 openstackbmc has
failed to start with the error:
socket.error: [Errno 22] Invalid argument
Moving the early bind so that it is only done when there is no server
specified has fixed the regression for openstackbmc.
Change-Id: Icb16cdc386fb08b54f28b7dff235eb697f1450ee
When logging out, the session is obviously not logged
after the request to logout has been processed. If
retry is False, do not be surprised we don't have a 'lastresponse'.
Change-Id: Ia5cbdab3736148fa36ced8835bd8d9fdca1dc12d
As of recent System X hardware releases, the mfg/device id
values are now ambiguous. Go deeper in the tsm detection
to assure the system is indeed a TSM system rather than IMM
or other.
Change-Id: Id63d015bf03e9ea9501503543effd31e01691b31
When something requests logout in the middle of a command request,
bail out with 'session no longer connected' rather than infinite loop
waiting for lastresponse which should never come.
Change-Id: I9a8592a72b687f90bc044bbe48fd87d79b35d780
If a FRU device presents data that pyghmi does not understand,
treat it the same way as if it were not present, do not decode.
Some systems simply do not have usable FRU data despite having a
pointer to a FRU device.
Change-Id: I440cee3366b5da4555b67b41492fa017dbe3dcef
TSM NTP enable retry could trigger the TSM to lose its
mind. Workaround by having a large, custom timeout for
NTP, to either get positive acknowledgement or timeout,
even though no retransmit would occur.
Change-Id: I3f83e5a1f1e1957bad119951c7e73ade5154b351
Some TSM FRU elements do not have a FRU entry. They may
be marked by all spaces, all 0xff, or all 0x00. Skip UUID
if it is one of these obviously invalid values.
Change-Id: I90c8bbe3c66754bcb6d6200b63a2ff2c29ae63ec
For one, was doing UTF-8, though the encoding strictly speaking
per speac should be ISO-8859-1. Corrected that mistake. Also
workaround an issue when FRU may be programmed with 0x0 or 0xff
bytes to terminate, or spaces. The spec actually doesn't speak
to a strategy to pad strings (presumably because they assumed
implementation would avail itself of the capacity for variable
strings and not need to deal with silly fixed length fields).
Handle this by trimming out trailing spaces, 0x0, or 0xff. This
strictly speaking violates the spec if they want to use one or more
ÿ to end a field, but will take the risk that no one actually would
want to do that.
Change-Id: I7d7e3aa9f3fd2b1e1af75f98cabd49ca374755c0