summaryrefslogtreecommitdiffstats
path: root/ipmid-new.cpp
Commit message (Collapse)AuthorAgeFilesLines
* do not use auto and rename handles to providersVernon Mauery2019-03-251-2/+3
| | | | | | | | | handles is a poor name choice for the list of IpmiProviders and being declared as an auto is hard to see what type it really is. This changes the type to be fixed and uses a more appropriate name for the variable. Change-Id: I35f744c491f3810c7381738516b8ff0a6f20f129 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add user context parameter to legacy ipmi handler registrationVernon Mauery2019-03-211-1/+1
| | | | | | | | | This part was originally omitted, but needed by some external provider libraries. This will more closely mimic the behavior of ipmid prior to the architecture update. Change-Id: I5db35222e268a117480285c700d88206d6505d92 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* make ipmid respond to SIGTERM and SIGINT for clean shutdownVernon Mauery2019-03-201-5/+19
| | | | | | | | | | | | | | | On some systems ipmid was not responding to SIGTERM so systemd could not shut it down in a clean manner, resorting to SIGKILL after a long timeout. This adds code to respond to SIGTERM and SIGINT and safely unwind all the provider libraries on exit. Tested-by: running ipmid; in another shell, and running 'killall -15 ipmid' or 'killall -2 ipmid' to send SIGTERM or SIGINT and watch that ipmid shuts down in a controlled and timely manner. Change-Id: I690846796523bebea1a08845c0d17e1df2a94fee Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Change linkage of ipmid_get_sdbus_plus_handler() to libipmid.soVernon Mauery2019-03-191-17/+13
| | | | | | | | | | | | | | ipmid_get_sdbus_plus_handler() was re-added to be a part of systemintfcmds where it was used. This moves it to libipmid.so because that is where symbols used by both ipmid and the providers should be. Because ipmid_get_sdbus_plus_handler() relies on the io service and the main sdbus::asio::connection is also right there, this moves those symbols to libipmid as well to keep coherent. Change-Id: Ib125a0c217c8bcf47a8a4bd0c557eb69e928245b Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Use payload interface to unpack group/IANA from messageVernon Mauery2019-03-151-2/+2
| | | | | | | | | | | | Directly calling unpack from the Request interface will attempt to unpack the whole message, resulting in a 0xC7 response if the whole message was not unpacked. Since at this point in the execution, the point is to only extract the group ID or the IANA, the lower-level Payload unpack interface must be used. This allows for partial unpacks and only returns error if there are not enough bytes to unpack. Change-Id: Ie18377597e925eff89c9b7c1a6d2258627d5f240 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Add command filter mechanismVernon Mauery2019-02-251-0/+49
| | | | | | | | | | | | | | | Every ipmi command will pass through a filter prior to execution by the registered handler. The filter consists of all registered filter handlers that all must either return an IPMI error code or allow the command to be executed. If any of the filter handlers return an error code, the remaining handlers will not get a chance to run. Each handler, executed in registered priority order, can be passed the full message, or just the context (metadata describing the command, netfn, cmd, etc.) Change-Id: I3c48f19ebae0d24344b15fbcd2b940a32f8511d7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Add in Native OEM and Group OEM supportVernon Mauery2019-02-251-1/+124
| | | | | | | | | | Add full support for the IPMI OEM NetFn and the Group OEM support as defined in the IPMI 2.0 specification. For now the legacy OEM router mechanism is still supported. Change-Id: I8cc999489000c6e0daf5aad3579838e6f499ba47 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Rewrite ipmid to use the new architectureVernon Mauery2019-02-251-0/+459
New architecture highlights: * The new registration detects handler type for argument unpacking. * Upon completion the response is automatically packed. * Handlers can make use of the new async/yield sdbusplus mechanism. * The queue exports a new dbus interface for method-based IPMI calls. * The legacy handler registration is still supported for now. * The legacy dbus interface is still supported for now. Change-Id: Iae8342d9771ccebd3a0834e35597c14be4cc39cf Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
OpenPOWER on IntegriCloud