commit | 5907571df69a5e1a6f3e0633ad42f2dc7fa6ba25 | [log] [tgz] |
---|---|---|
author | Asmitha Karunanithi <asmitk01@in.ibm.com> | Fri Oct 22 01:17:41 2021 -0500 |
committer | Ed Tanous <ed@tanous.net> | Fri Aug 05 15:45:37 2022 +0000 |
tree | e7a23615da111f1eb89349cea98182665ca5bd95 | |
parent | 9896eaed88332eca7334a564a2ea2e0baf135639 [diff] |
Return proper redfish errors for createDump call Currently, only internal server error will be returned to a client when there is a create dump dbus call failure in the backend, irrespective of the error that's returned by the phosphor-dump-manager. This change will send a proper error response to the user based on the host state. Tested By: curl -k -H "X-Auth-Token: $bmc_token" -X POST https://${bmc} /redfish/v1/Systems/system/LogServices/Dump/Actions/ LogService.CollectDiagnosticData -d '{"DiagnosticDataType":"OEM", "OEMDiagnosticDataType":"Resource_vps_str"}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request could not be performed because the resource is in standby.", "MessageArgs": [], "MessageId": "Base.1.8.1.ResourceInStandby", "MessageSeverity": "Critical", "Resolution": "Ensure that the resource is in the correct power state and resubmit the request." } ], "code": "Base.1.8.1.ResourceInStandby", "message": "The request could not be performed because the resource is in standby." } } curl -k -H "X-Auth-Token: $bmc_token" -X POST https://${bmc}/redfish/v1/Managers/bmc/LogServices/ Dump/Actions/LogService.CollectDiagnosticData -d '{"DiagnosticDataType":"Manager"}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The operation failed because the service at /redfish/v1/Managers/bmc/LogServices/Dump/ is disabled and cannot accept requests.", "MessageArgs": [ "/redfish/v1/Managers/bmc/LogServices/Dump/" ], "MessageId": "Base.1.11.0.ServiceDisabled", "MessageSeverity": "Warning", "Resolution": "Enable the service and resubmit the request if the operation failed." } ], "code": "Base.1.11.0.ServiceDisabled", "message": "The operation failed because the service at /redfish/v1/Managers/bmc/LogServices/Dump/ is disabled and cannot accept requests." } } Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: Ica087e4cac2beeded896f0c83c9481f8164d2c62
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects
.
bmcweb by default is compiled with runtime logging disabled, as a performance consideration. To enable it in a standalone build, add the
-Dlogging='enabled'
option to your configure flags. If building within Yocto, add the following to your local.conf.
EXTRA_OEMESON:pn-bmcweb:append = "-Dbmcweb-logging='enabled'"
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.