Repository navigation
v2.0.00
Version 2.0.00 is a major release. It replaces the static client API of 1.x with a fluent IpmiClient that keeps one session per BMC. It adds a command-line client, ipmicli, and drops the SLF4J dependency, so the library now has no dependency at all. It also brings many protocol, decoder and Serial over LAN fixes found on real BMCs (HPE iLO 5, Dell iDRAC, Lenovo XCC, Cisco IMC, Supermicro, Fujitsu iRMC, GIGABYTE).
See Upgrading from 1.x to 2.0.00 for the migration.
Highlights
Fluent client (#161)
try (IpmiClient bmc = IpmiClient.builder("bmc.example.net")
.credentials("admin", password)
.build()) {
SensorList sensors = bmc.sensors().execute();
FruList frus = bmc.frus().execute();
}- One session per client, opened by the first operation, kept alive, and reopened when the BMC drops it.
- Typed results:
Sensor(reading, thresholds, states, status),Fru(board, product, chassis, summary),ChassisStatus. - New operations:
deviceId()sel()reads the System Event Log, the whole log or only the entries added since the last one read.chassisControl()andchassisIdentify()sol().open()opens a Serial over LAN console as streams.raw(netFn, cmd)sends any request, DCMI and OEM network functions included.send(command)sends any core command.capabilities()reads the cipher suites and authentication options without credentials.
- Unchecked exceptions:
IpmiAuthenticationException,IpmiConnectionException,IpmiTimeoutException,IpmiCompletionCodeException.
Command-line client ipmicli (#162, #163)
probe, info, chassis, power, identify, sensors, fru, sel, sol and raw subcommands, with --json output. It ships as a standalone executable jar, and a single command installs it: curl ... | sh on Linux and macOS, irm ... | iex on Windows. See Command-Line Client.
No more logging (#121)
The library no longer depends on SLF4J and never logs. A problem that does not fail the operation is returned with the result instead: SensorList.skippedRecords(), Sensor.problem(), Fru.problems().
Behavior changes
- New client API:
IpmiClientConfiguration, the staticIpmiClientmethods, theclient.modelandclient.runnerpackages, andIpmiResultConverterare removed. The semicolon-separated text output moved to the MetricsHub IPMI extension. - Cipher suite chosen by ID (17, 3, 8, 16, 2, 7). A BMC that offers only suites without integrity is refused. 1.2.02 took the 4th suite of the BMC's list.
openSession()raises the session to the privilege it was asked for (#165). It used to stay at User, so Operator and Administrator commands failed withD4h.- Low-level commands are complete objects: their constructors no longer take
IpmiVersion,CipherSuiteorAuthenticationType.IpmiCommandCoder<R>is generic. - Protected fields of the protocol classes are private, with protected accessors.
ReadFruDatatakes its offset and count in bytes, whatever the access unit of the FRU device.
Fixed
- Lost UDP replies cost seconds, not minutes (#77, #78, #79, #93). The message timeout is now 5 s, and resends no longer pause at random.
- A bad login fails at once with
IpmiAuthenticationException(#109, #132), instead of four tries andIllegal connection state. - The SDR walk no longer aborts on OEM or undecodable records: they are skipped and reported in
skippedRecords(). - RMCP+ sessions are secure. The integrity of replies is enforced, the console random number comes from a
SecureRandom, the handshake is checked, and credentials are encoded in UTF-8 and handled as bytes. - SDR, SEL, FRU and completion codes are decoded by the specification. This fixes thresholds, unsigned timestamps, FRU dates, word-addressed FRUs, ID strings padded with NUL characters, and OS Boot offsets.
- Serial over LAN: writes longer than two packets work, packets are numbered and acknowledged as
ipmitooldoes, andclose()releases the sessions. - Thread safety and lifecycle of connections, the keep-alive and the connector (#89, #94, #95, #96, #98, #126).
- Real BMCs: iLO 5 session revocation, iDRAC 8 retry pauses, IPMI 1.5-only BMCs (#145, #146, #147, #150, #154).
Build
- MetricsHub formatter and Checkstyle, PMD, CPD and SpotBugs are now gating checks (#114, #115, #116).
- Documentation rewritten with the Sentry Maven Skin: https://metricshub.org/ipmi-java
metricshub/workflowsv7, then v8.
Dependency updates
org.junit:junit-bom6.0.1 → 6.1.3 — #75org.slf4j:slf4j-api2.0.17 → 2.0.20, before it was removed — #138
Pull requests
- Don't abort the SDR repository walk on OEM or undecodable records — #112
- Adopt the MetricsHub formatter profile and jawk's checkstyle.xml, gate the build on both — #119
- Fix the 117 PMD violations and gate pmd:check at verify (#114) — #120
- CPD: remove the duplicated sensor record and response code, gate cpd-check (#115) — #122
- Rewrite the documentation with Sentry Maven Skin 8 and a full page set (#113) — #124
- Update metricshub/workflows to v7 by @NassimBtk — #139
- Fix the SpotBugs findings and gate the build on SpotBugs (#116) — #134
- Recover from a lost UDP reply in seconds instead of minutes (#77, #78, #79, #93) — #140
- Update metricshub/workflows to v8 by @NassimBtk — #141
- Fail a bad login at once and clean up inside the overall timeout (#109, #132) — #142
- Decode SDR, SEL, FRU and completion codes by the specification (11 decoder issues) — #143
- Fix the connection and manager lifecycle (#126, #94, #95, #98) — #148
- Make a connection safe for its sending, receiving and keep-alive threads (#96, #89) — #149
- Real-BMC robustness: iLO 5 session revocation, iDRAC 8 retry pauses, one-way tags, OEM states (#145 #146 #147 #150) — #152
- Harden RMCP+ sessions: enforce integrity, choose cipher suites by ID, check the handshake, pass credentials as bytes — #153
- Fix Serial over LAN: lifecycle, write and read paths, payload commands — #160
- Test remaining FullSensorRecord conversion cases by @skrcode — #155
- Fluent client API for 2.0 (#161) and no more SLF4J (#121) — #164
- Move IpmiResultConverter to the MetricsHub IPMI extension — #167
- Command-line client ipmicli and standalone executable jar (#162) — #168
- Read the System Event Log with sel() and the ipmicli sel subcommand — #170
- Expose chassis power control and identify in the client API and ipmicli — #171
- Identify the BMC with deviceId() and the info subcommand (Get Device ID) — #172
- Fix #131, #165, #151, #154, #169: raw network functions, privilege raise in openSession(), SDR ID string length, IPMI 1.5-only BMCs, OS Boot offsets — #173
- Remove the dead code of the protocol core (#99) — #176
- Install ipmicli with one command: curl | sh, irm | iex (#163) — #177
New Contributors
- @bertysentry made their first contribution in #112
- @skrcode made their first contribution in #155
Full Changelog: v1.2.02...v2.0.00