2
0
mirror of https://opendev.org/x/pyghmi synced 2026-04-01 15:53:32 +00:00
Commit Graph

1260 Commits

Author SHA1 Message Date
Jarrod Johnson
7d0bfd32ff Add reset to defaults to tsma
Change-Id: I43834f8126e8e6f7e3bdb219dc299d6d597cfd64
2022-09-09 13:22:27 -04:00
Vlad Spoiala
cef0cdc5fa Only use one extra keep alive session.
Use only one extra keep alive session for keeping the media
mounted. Do a weblogout on that session when the media is
detached.

Change-Id: I3012d263510ba97477542e1325876000f2a52356
1.5.52
2022-08-30 16:38:37 +03:00
Jarrod Johnson
44d2ccd440 Fix the SMM timezone treatment
Change-Id: I32a52492a0b0f50e49b347aa37367495168eb2a3
2022-08-29 09:54:05 -04:00
Zuul
76b36bf4b9 Merge "Migrate V2 and newer systems to new meters" 2022-08-29 13:51:28 +00:00
Zuul
c0b158d664 Merge "Interface to implement get guid command" 2022-08-29 13:49:17 +00:00
Jarrod Johnson
f5a975fb7a Add TimeZone to SMM configuration
Change-Id: Ic25675a7f7d0bd45018ad12c83bb95a2ebbcd4f2
2022-08-24 16:11:06 -04:00
Serhii Skrypnik
a9118d4463 Interface to implement get guid command
Add method get_system_guuid which return uuid.uuid4 instance

Closes: #1987210
Change-Id: Ifb4438f7e7c0bc565fcdfe2bd7ff285200b5efc8
2022-08-21 18:39:32 +03:00
Jarrod Johnson
d99c07ce81 Fix web role setting on SMM
Newer variants also require the special treatment,
switch to blocking the only variant that is unsupported.

Change-Id: Ifc679dd294d445f218c0b504d286155ac3e315d6
2022-08-19 09:09:35 -04:00
Jarrod Johnson
b4e597ff83 Migrate V2 and newer systems to new meters
New proprietary commands are going to be used with a bit more
capability.  For now, migrate existing DC energy over to new command

Change-Id: I30a003c4d45f4a0d591c80c55f1c267333f1123c
2022-07-08 10:25:29 -04:00
Jarrod Johnson
5f1ba6038f Add more info to SMM inventory output
Change-Id: Id2da97b6efad246a11153fa3bfdff3c7095530c0
1.5.51
2022-07-07 12:59:49 -04:00
Vlad Spoiala
26be05fd30 Improve Whitley vs Purley storage API detection.
Trying each API call in any order doesn't work correctly for all
cases since the API call for Whitley incorrectly returns success
on the newest Purley firmware and vice versa. The Whitley volume
properties have some extra keys in them. Use one of the extra keys
to differentiate between Purley and Whitley.

Change-Id: Ia18631ec16107492e8753eb4312c56171ebd33f0
1.5.50
2022-06-28 18:20:53 +03:00
Jarrod Johnson
fa37941aee Remove DIMM temperatures from XCC sensor
These sensors are very slow to fetch and
slow down readers needlessly for low
value.

Change-Id: Ic498dff5f669f6d2610e6998af7f3693591c40c4
1.5.49
2022-06-24 10:32:27 -04:00
Jarrod Johnson
521630fa7d Mitigate web session consumption
If called in parallel, multiple sessions may be opened without
the old one having a chance to be closed.

Serialize any attempt to concurrently login to
keep the sessions down.

Change-Id: Id389ba1caf89897b00845be394509d489186272d
2022-06-23 16:06:13 -04:00
Jarrod Johnson
4990665d10 Revert assertion mask usage
Unfortunately, different devices apply this
in different ways. The impetus was a BMC that
was incorrectly returning a bad reading, and a
thought toward using the assertion events instead.

This has two problems, one is that this mechanism is optional, and for another
the caller is expected to manage the arming.

Go back to using the sensor reading to let the BMC
mark on-the-fly the state.

Change-Id: Ie61d4b8427905171b32f6998a80806f1027660d6
1.5.48
2022-06-22 10:12:48 -04:00
Jarrod Johnson
ff67d84ec6 Update to newer XCC storage syntax
Two new variants of XCC storage cfg have
occurred, detect and handle them.

Change-Id: Ie53f53093b5737a4930ecb420b087a15d8149796
2022-06-21 09:57:07 -04:00
Jarrod Johnson
6226d4bb29 Correct the choice of slow/fast timeout
Change-Id: I2237dcc9cda84805134c1c369a9f68d31558d59d
2022-06-15 12:02:16 -04:00
Jarrod Johnson
5b2cc5bea7 More aggressively timeout on unconnected systems
When setting max timeout, select a more aggressive timeout
if recent connectivity hasn't been confirmed.

Change-Id: I806d0cddb53e4e2246c6de86e561dbd658a76256
2022-06-15 10:50:21 -04:00
Jarrod Johnson
966c8709f8 Fix handling of 'blocked' slots in FPC
FPCs represent blocked slots in a peculiar way,
as a node that is in 'standby'.  Avoid explicitly
considering the power permission state of the
permission state is standby.

Change-Id: I801165e3e45fe1e4b7a8f7b4bc19b4ef9bee763f
1.5.47
2022-06-14 12:50:33 -04:00
Jarrod Johnson
13880391c8 Avoid creating onlog loops before established
The mechanism to carry over a payload into a new logon
could inadvertently carry over get channel authentication
for example, creating a very confused state.

Change-Id: I29f399006f0c210c80f726e3eb494d3e8b0c3992
1.5.46
2022-06-14 09:17:17 -04:00
Jarrod Johnson
a9258c1e9b Add SMM2 VPD to configuration for SMM
Change-Id: Ia7a4b804a645a36c212404f3429c42b26938210e
1.5.45
2022-06-07 13:03:23 -04:00
Jarrod Johnson
5c32d4d11d Add port forwarding over usb to bmc settings
This enables manipluating the feature in XCCs to
allow network connections to forward over USB port.

Change-Id: I577d6952e0dab4b9a9df8b6118fc75ed0173d366
1.5.44
2022-05-26 11:44:17 -04:00
Jarrod Johnson
5f63810884 Allow virtualmedia on Systems instead of Managers
Redfish now allows a system to opt to place virtual media
on system rather than manager.  The rational being that
remote media has to be mapped to specific hosts, and the
manager relationship to that media can be implicit.

Try the system first (more specific) then fallback to traditional
manager location for virtualmedia.

Change-Id: I5d63b5e57572c6a753a2d86adb223335a15a71ea
1.5.43
2022-05-20 07:29:02 -04:00
Jarrod Johnson
d286a8326a Clean up socket on deletion
Some resources are leaked on deletion
of a webclient without explicit close, improve
by destructor.

Change-Id: I91d313125bf79f83c3cd07e12e573b2bdd5a95ef
2022-05-18 16:26:45 -04:00
Jarrod Johnson
582598c2ef Rework the relog logic
Various issues have been associated with trying to
reinitiate a session during a 'timeout' scenario, attempt
to clean up the various scenarios where it wasn't originally
designed to survive across a relogin.

Change-Id: Ifd9c8e98070217a1b0f4a35c8e0851a063b77800
2022-05-17 15:32:37 -04:00
Jarrod Johnson
65c8f4ec32 Execute internal cleanup on logout
If not logged in, continue to skip trying to reach BMC, but
do fire off internal cleanup.

This is technically an oversight, made worse by the recent changes
to 'unlog' as part of retry.

Change-Id: I0825c1f77decb81694f897b904a19a2f59587055
1.5.42
2022-05-11 12:21:08 -04:00
Jarrod Johnson
45dc3bad83 Ignore stub log entries
Some BMCs implement entry logs that are
not actionable.  Trim those out to avoid empty data
for a user to scratch their head at.

Change-Id: I05ea62cdd3a56dfdeea4080774ec5a67a651824f
1.5.41
2022-05-10 08:23:21 -04:00
Jarrod Johnson
68cca2e34f Clean onlogpayload on timeout response
Change-Id: Ic0050140797016f02c7b292bae1ca0f3cd4e8c3a
2022-05-09 15:16:24 -04:00
Jarrod Johnson
64a40abcc3 Handle XCC not sending thermal data in some situations
Treat missing items member as no data to properly move on
from this condition

Change-Id: I14623e513ec91411978019b088e0f9e36889796b
1.5.40
2022-05-09 08:58:53 -04:00
Jarrod Johnson
2a5f9fb7ac Add SMM virtual reseat
Change-Id: I6b9badd2e3e1e13cdf7918cc17b7a715a58a45d8
2022-05-06 09:36:09 -04:00
Jarrod Johnson
a6779e93e1 More aggressively give up on initial connection
Previously, logon retries were not part of the normal
tries and treated separately. Now that
the normal retry logic is in place, a change
is needed to avoid the wait times amplifying.

Change-Id: Ia2e5b4f0790ce4574f17cf7ceb15ebd7a36f8afa
2022-05-05 12:26:12 -04:00
Jarrod Johnson
49973f7474 Go back to trusting XCC health assessment
The health assesment can be much cheaper if the XCC health
assessment is trusted.

The issue would be that if the XCC web shows healthy, but the error LED
is lit, this condition would no longer be seen.

However, the error LED shouldn't be lit unless the XCC detects a fault.
So if such a condition of LED lit without explanation should arise in
the future, it would be better treated as an XCC firmware issue.

Change-Id: I55a4451eda4aba43fcf3d3e8e2307c3ce30b8fcd
1.5.39
2022-04-20 16:41:38 -04:00
Jarrod Johnson
500d31e215 Fix the remote sequence number bug introduced by recent commit
Change-Id: I3d2491fef16329cce4270ef013adc85fb7841af4
1.5.38
2022-04-14 10:35:06 -04:00
Riccardo Pittau
470a0d1471 Fix remseqnumber not initialized
The sequence number is never initialized unless the login already
happened, so we need to check for its existence when retrying failed
login.

Change-Id: Ia2319d4c0255d6ae8616cf0c736aaa30d65e6129
1.5.37
2022-04-07 09:39:56 +02:00
Zuul
af65bac993 Merge "Ensure fresh webclient for SMM interaction" 2022-04-04 20:12:25 +00:00
Jarrod Johnson
6836bfffdd Retry login on dead session
Sometimes a BMC just up and drops an IPMI session without warning.

The only way to recover is to login, so incorporate a login into the
retry logic.

Now a couple of retries are done the 'cheap' way (retransmit) followed
by a full login attempt.

This does mean that SOL sessions are less likely to survive a shared
nic outage during PXE boot or similar,
however we just have to take that hit.

Change-Id: Ica11d29519b1c69cbd151bce9100f8a7517544ca
2022-04-04 15:48:35 -04:00
Jarrod Johnson
15ec552383 Ensure fresh webclient for SMM interaction
Web session being expired should be mitigated by
forcing to start over if the session is more than
30 seconds old.

Change-Id: Iaa2abff9ab401a4e5285ea994028bf5f784ecc40
2022-03-29 09:01:35 -04:00
Jarrod Johnson
4b4ae0eb97 Add water cooled 9-PSU variant
The water cooled chassis has a 9 PSU variant that
must be recognized.

Change-Id: If6b214e0d8e7366f663430a7dc5fcac421c7d9ca
2022-03-02 17:01:22 -05:00
Zuul
2168c171cc Merge "Fix Python2 compat in new SDR cache code" 1.5.36 2022-03-01 13:32:42 +00:00
Jarrod Johnson
37262dd823 Remove the ironic test
It has only ever broken for non-pyghmi reasons,
and consumes a lot of time in the CI.

Change-Id: Ib51410b4d1ceb28f9301e1fa93a72f73ce6ae4e9
2022-03-01 06:51:34 -05:00
Jarrod Johnson
8c07dc6193 Fix Python2 compat in new SDR cache code
Python2 bytes type cannot be compared to number.
Coerce into a bytearray to have python2 treat
them as numbers.

Change-Id: I8522b1eb74f4b7aebfa6a0fa68107a0df947c7f6
2022-03-01 06:30:21 -05:00
Jarrod Johnson
6b43149105 Add check for sharedio on reseat
Reseat returns success even when it
is not performed.  Check for
shared io blocking prior to actually
attempting.  This allows us to catch an error the firmware should have.

Change-Id: I683382236c0dc0683eba69d36e726056782aab10
1.5.35
2022-02-28 11:23:40 -05:00
Jarrod Johnson
adbdc04747 Move away from pickle for cache
Bump the cache version and just move away
from pickle.  Upon closer thought, the
data being retained doesn't warrant a generic
format.

Change-Id: I3ba2b17eb2202cf64c8c0cdbf91addaf1325b5f0
2022-02-23 08:07:07 -05:00
Jarrod Johnson
be58a8ad3e Harden pickling in SDR cache
While a cache is expected to be protected, mitigate
dangers by blocking code from being stored in pickle.

Change-Id: If3b942dd028da8580ec3f74e94081b30446ab8d9
2022-02-22 15:06:19 -05:00
Jarrod Johnson
1b800e3f85 Block FFDC data from FPC
FPC does not implement this feature.

Change-Id: I3aab4983ae48efe6655ccf20ae2cc2fc4e27498e
2022-02-16 17:21:18 -05:00
Jarrod Johnson
51ec034e11 Try iso-8859-1 decode if utf8 fails
Technically, the BMC is in error returning non-utf8 encoded content,
however, of *course* some BMCs fail to do so.  Fallback to iso-8859-1
which will probably have bad data in a value somewhere, but it won't
break the entire parsing.

Change-Id: Id7c3c507a0eeb4c31ca52cfadf6ac77deefa3869
2022-02-15 15:17:50 -05:00
Jarrod Johnson
b5806c3c0a Do not attempt PSU inventory on FPC
FPC does not support the same PSU inventory
that SMM added.

Change-Id: I85961df9d35e99b7bddaedb85eda9d2ad71653ee
2022-02-11 15:38:04 -05:00
Jarrod Johnson
3fcc1d362e Add capping to the Lenovo dense servers
Change-Id: I321a2eed0df49bfc1337af93961425b7f4cd0229
2022-02-11 10:55:15 -05:00
Zuul
3dc4a064c2 Merge "Fix str_to_size logic." 1.5.34 2022-02-09 18:44:05 +00:00
Vlad Spoiala
8a1649df1a Fix str_to_size logic.
Change-Id: I133d1ff24883619a2125320c969b4aabca24e683
2022-02-09 18:12:17 +02:00
Jarrod Johnson
e161caeb2e Have XCC raid configuration proceed with new state
A server may now be in state 3, which allows raid configuration
in addition to state 2.

Change-Id: I5218b9c43391c2c094973d238db526b9fecb8e9e
2022-02-09 09:37:06 -05:00