2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 19:57:47 +00:00

717 Commits

Author SHA1 Message Date
Zuul
a21ede6bc3 Merge "Replace openstack.org git:// URLs with https://" 2019-03-25 13:14:03 +00:00
Ian Wienand
3f3c48037f Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: Ib91d991abd3e2166797130573808810492a88089
2019-03-24 20:35:47 +00:00
Jarrod Johnson
a1af60ac9b Performance enhancements for redfish
This permits the code to be able to risk redundant fetches without high
performance penalty through caching.

It also introduces a way for calling code to provide a concurrency
pool, e.g. a GreenPool from eventlet.

Change-Id: I60c4aabb5064a5ee19b0804a520d4ace1195710e
2019-03-22 15:52:11 -04:00
Jarrod Johnson
b45253eacd Add missing headers
Some implementations balk at lack of 'Accept' header.

Change-Id: I99d840e7357a7c0d04bcbd1bb7695c8512be0281
2019-03-22 14:42:57 -04:00
Jarrod Johnson
0bdf26f8c9 Fix mistake in IMM set property
There was a mistake in the code to attempt length calculation.

Change-Id: I62dbd78ec11095d897433754a5751c02fd0d5812
2019-03-21 09:47:17 -04:00
Jarrod Johnson
8b89c3e5a0 Fetch inventory information
Add system, cpus, adapters, memory.

Change-Id: Icb2024acca63ca94e0ff45d4cb3436f5d1564bda
2019-03-19 17:06:41 -04:00
Jarrod Johnson
a1e9ba2891 Fetch firmware information
Use the firmware inventory to drive get_firmware

Change-Id: Ia3289c108b570fd25452b6ef13ac44da6575f8a8
2019-03-19 15:07:18 -04:00
Jarrod Johnson
d6ab7ed15c Add fetching of network config data
This is compatible with the ipmi model for now, and raising exceptions
in multi-interface environments.  Future will have helper to list and
use interface as parameter.

Change-Id: I648edc1546a12dbd7f3ca9548ce6db3dfadd4827
2019-03-18 16:43:51 -04:00
Jarrod Johnson
6d1ef823ae Change redfish get_health to look closer to ipmi
We can have a SensorReading object that at least approximates ipmi
object, though we can never have readings.

Change-Id: Id33346263521e39f7b70ada456d0d134b6264e5c
2019-03-18 13:47:33 -04:00
Jarrod Johnson
19ebb593b7 Add missing init to redfish
Redfish needs to be a proper python module.

Change-Id: Id7e51f8cbcb42b4a0c61ebfd200f4c3e38f00203
2019-03-18 10:48:57 -04:00
Jarrod Johnson
f77554febd Pass through message for Optane
Pass through message as-is rather
than try to rephrase it.

Change-Id: I120606b5eef6de9ac24597ce58ee5a54dc326a34
2019-03-14 15:50:24 -04:00
Jarrod Johnson
3263342f34 Add fallback data
For generic unknown events, create backup data if the generic fails.

Change-Id: Ic001bd3d9daa6a47c88b63b51df2f4002ee46358
2019-03-14 14:22:26 -04:00
Jarrod Johnson
d3de9ef67c Check Fault LED in health check
It is possible for fault LED to be lit without
any active events.  Have this trigger a critical,
since we have no idea what would have caused the light.

Change-Id: Id4cbbc64b0dd44c2757ce1f30deaa28a7e668472
2019-03-14 11:19:18 -04:00
Jarrod Johnson
4ff8bc7cc0 Request forced inventory after adapter update
For adapter firmware to be accurate, force an inventory
boot on next reboot.

Change-Id: I9d0281de1bd8c39ec79aace5f8b4343b97ffe89b
2019-03-07 14:42:10 -05:00
Jarrod Johnson
db1a87f7b1 Add 0x10 and 0x03 to ignore
These bytes have also appeared erroneously in FRU
data, treat them as equivalent to null.

Change-Id: I9d19239f2dc13fc47321c8a35f25c58ccbebec3d
2019-03-01 13:04:17 -05:00
Jarrod Johnson
c1a20db6d8 Fix cache interop between firmware and hardware
The inventory had diverged between firmware and hardware,
for now just give each a dedicated name.

Change-Id: I8f755a0f9ed21369a1c05e7e3139ab43c645a01f
2019-03-01 11:05:57 -05:00
Jarrod Johnson
3ed62e5bd4 Add detected, but unknown disks
SATA attached disks can show presence,
provide recognition of detected, but unmanaged
disks.

Change-Id: I6626ed2fe9dc9cc0d76bfd4e49bc892603b1f5fa
2019-03-01 10:35:44 -05:00
Jarrod Johnson
241f2a7fee Report pending updates on adapter
When possible, provide the pending firmware
as inventory data.

Change-Id: I540545073be94eda166013cb428044a15b05fcd8
2019-02-27 15:46:12 -05:00
Jarrod Johnson
5ebe762737 Report 108 as temporary error
108 is a transient condition that requires
the update procedure to be done again.

Change-Id: Icf2108dda2ef56ac8fcd5710c3e67c6658dfdeee
2019-02-27 09:54:04 -05:00
Jarrod Johnson
a1364d55a0 Handle firmware upload error 413
If software attempts to upload a file
larger than the XCC supports.  Report
a more understandable condition in
such a case.

Change-Id: I8b5a80c0be8fbca141bdce34d5da39095217b30b
2019-02-26 16:11:34 -05:00
Zuul
7a195ddc2e Merge "Fix string formatting" 2019-02-26 15:47:41 +00:00
Jarrod Johnson
c8135688be Fix string formatting
Error string was incorrectly trying to use '+' to
add number into the message.  Fix by using format

Change-Id: Iedc83383ffa4770b28538895369c9b3d58bb5bad
2019-02-26 10:26:23 -05:00
Jarrod Johnson
d36552df27 Fix incorrect M.2 labelling
Measure the M.2 status of a disk more
directly, avoiding modifying the slotNo unless
the disk is actually M.2

Change-Id: Ic8bd578654f586791f04d8f880842cc11e678ed5
2019-02-25 16:35:44 -05:00
Jarrod Johnson
1575928d03 Support updating multiple adapters
Add support for updating multiple adapters.

Change-Id: Idafaa9896cdf6c4da100016ea033c31749ce0bde
2019-02-22 16:32:28 -05:00
Jarrod Johnson
9c4991a747 Generalize the megaraid check
The megaraidconfigurationtool may be branded a few different
ways.  Mask all of them.

Change-Id: Ie0c056a0467eb118500be59a270e5940c3c94529
2019-02-21 13:27:41 -05:00
Jarrod Johnson
d065f22324 Treat thorn as string terminating
While a thorn in theory could be valid,
in practice the more likely intention
is yet another nonstandard string termination
attempt.

Change-Id: I71f837725b1e286b9f94786aa520deb12ce208e4
2019-02-20 13:36:17 -05:00
Jarrod Johnson
57d4db40ca Improve consistency with Lenovo tools
Lenovo tools use mriName to label configuration groups.  Change to this
by default, while retaining legacy name
as alias for backwards compatibility.

Change-Id: I220ab18e21947745cf942d78536668d580ffa38b
2019-02-20 11:14:16 -05:00
Jarrod Johnson
d88b508e71 Suppress Avago RAID config
The storage configuration interface is more appropriate
and other tools mask these settings.

Change-Id: I02bd935e68beb63ae725eb45cb062604377f26bd
2019-02-20 09:22:21 -05:00
Jarrod Johnson
ddf12b6b58 Refresh token between verify
The first verify phase may be delayed,
and in such a case could straddle bad
timing of the token expiry.  Refresh
between the phases to mitigate risk
of expiring the token in the middle of
running.

Change-Id: Ia96fa8824a2e9e8eff8fd2d353b1b0bc7fa710a7
2019-02-19 13:28:10 -05:00
Jarrod Johnson
72138e7e56 Fix vague KeyError exceptions
If the XCC/IMM bails out in the midst of an update,
it was inducing a vague result.  Rework to be more
specific in the error.

Change-Id: Ie35735cc2581e7bcd7a0f4484650366d37ea613d
2019-02-19 10:44:25 -05:00
Jarrod Johnson
97be31ca95 Support ordered default setting
An ordered setting (e.g. bootorder) requires
different handling.  Support it by the appropriate modifications.

Change-Id: I5b8931f3b034ee8f48285797bec4a4016a5fecc5
2019-02-12 10:08:43 -05:00
Jarrod Johnson
bc8deb4b68 Fix git copy in builddeb script
The builddeb script attempted to build in a directory
without .git, breaking the version deterimination logic.

Change-Id: Ia2be3a75bdcdf9335586bb40e05e635f4b497ca5
2019-02-11 09:52:33 -05:00
Jarrod Johnson
9fa2095fe7 Update the Wheezy patch
The patch had a lingering incompatibily to address.

Change-Id: If7d23efbfdb7cfa2400920e5b9ae04282e66a9a7
2019-02-08 15:22:53 -05:00
Jarrod Johnson
90a9be1344 Be compatible with wheezy python
Debian wheezy has a python vintage that
errors on unpack from a bytearray.
Explicitly cast to bytes for unpack
to compensate.

Change-Id: Icaf3931a905102e6ee6ef03d91617c031a1afc86
2019-02-08 14:31:54 -05:00
Jarrod Johnson
3e65ed0189 Workaround wheezy limitations
Debian wheezy is just too old to easily work with,
for that platform, use the more amenable
cryptodomex library.

Change-Id: Ic21d9784158d9d3f529d8c17dbe60a49f244cc7c
2019-02-08 13:08:49 -05:00
Jarrod Johnson
3b7d79c5fc Directly reference packages in pbr-free setup
Without pbr, the list has to be manually curated.
There is a setuptools directive that will work and
is used by pbr, but for now use the output with some
modules trimmed.

Change-Id: I772b7bef263639167b3b5c54bc7812e1e8acbaf6
2019-02-07 14:29:49 -05:00
Jarrod Johnson
1721f7b237 Fix typo in the setup.py template
The template for non-pbr builds had a mistake.

Change-Id: Ic79bf1dcbbe851c5664f95cf3cb26f3251d73b35
2019-02-07 10:55:04 -05:00
Zuul
06b8ab4193 Merge "Enable package builds without pbr" 2019-02-04 21:28:47 +00:00
Jarrod Johnson
40c546400e Enable package builds without pbr
There are some build environments we are being asked
to support that pbr does not.  A quick fallback
to handle such environments.

Change-Id: Ie5dac2555c73e80e4cf589932a18f31a530bdf65
2019-02-04 15:59:18 -05:00
Jarrod Johnson
4337179d7e Fix break handling in SOL
When the retry logic was moved to console, it exposed a problem with
the sol handler being called in the midst of transmitting without
clearing the pending payload, resulting in an infinite recursion
of sending the same break.

Resolve by using the common call to sendoutput to have it occur
only after the current head of pending output has been removed.

Change-Id: Iaae86a3bd870c1841530e200ef0f5780a5cc6993
2019-02-01 09:18:12 -05:00
Jarrod Johnson
2c901ac471 Enable SMM user for web access
SMM may not allow a new user to access web.  Make the user_access
extensible and use that to have web privilege follow the ipmi
privilege.

Change-Id: Ib08e0064b3fb402de833a159c471e28579520a5d
2019-01-31 14:12:30 -05:00
Jarrod Johnson
c0d8e2a12c Add UEFI/BIOS configuration to pyghmi redfish
Change-Id: Ie1a697eaf136f75007838d85bf877a262318fd5b
2019-01-28 16:43:44 -05:00
Jarrod Johnson
bd12cd646d Fix lenovo generic fallback
Wrong number of arguments are sent in such a case

Change-Id: Icbb56b8d3ef227e1a00baeedf236bf321841fabf
2019-01-25 09:54:32 -05:00
Jarrod Johnson
eccbf6193b Implement more robust handling of config.efi
XCC may be transiently unable to provide the UEFI configuration.
Implement a retry if the XCC reports that it does not exist.

Change-Id: If0d5f1136087d60b9f834f7970a59f0af61336c3
2019-01-24 10:09:17 -05:00
Jarrod Johnson
6d9a4b98d8 Ensure XCC health sets general level
In the event of an event that is not modeled by the IPMI sensors,
make sure that at least the health summary is correct.  Add in
a known condition that is missed by IPMI sensor modeling for detail
as well.

Change-Id: I207e137c49b4321cf4040188a84de569f55c5707
2019-01-23 10:24:52 -05:00
Jarrod Johnson
f4e3f62ef2 Reduce assertion of bootable media failure
This is almost always a false positive.

Change-Id: I7738f42dd903834f5388ac85d3f049fc95316fd6
2019-01-22 14:12:36 -05:00
Jarrod Johnson
cad67cf751 Add support for XCC License key management
XCC features are managed in keys, support management of those keys.

Change-Id: I10a1e55dd6705cebacb8c49c98f19491bdf9e2d0
2019-01-14 13:53:12 -05:00
Jarrod Johnson
534963553b Avoid stale webclient in XCC client
XCC aggressively ages out a session.  Check last
token refresh before deciding a session is viable,
discarding it if it is too old.

Change-Id: I490263edb4b2a8ddbd91d6b236d4a7e689f410c7
2019-01-11 16:32:46 -05:00
Jarrod Johnson
872f53ab0a Improve error on unexpected scenario
When doing a firmware update, a surprise flow leads to a potentially
misleading exception.  Change to be more clearly obvious that there
is confusion.

Change-Id: Ib9aa2c0f357daf5af0462062733c2c83c7e25079
2019-01-11 11:39:05 -05:00
Jarrod Johnson
7002c1e8f3 Refresh token during validation
XCC may take a while validating, and the token must be
refreshed to avoid chance of expiry.

Change-Id: I0e78008dba6bc214876ca286989b01d2f89733bb
2019-01-10 13:15:40 -05:00