commit | b623d9c1b6605978eb6158619bb43c79a9f543fd | [log] [tgz] |
---|---|---|
author | Tim Lee <timlee660101@gmail.com> | Tue May 25 08:59:19 2021 +0800 |
committer | Tim Lee <timlee660101@gmail.com> | Tue May 25 10:06:23 2021 +0800 |
tree | ab0e84ceef06a2567662eb2f760beacd625f903f | |
parent | 2ebb9683287cf6b1a2f2cc3c077bd99aceefa8dd [diff] |
dbus_rest: return error response with not found when bad dbus request Symptom: Run automation test "Create Two User Initiated Dump And Delete One" then we got ERROR as below. Create Two User Initiated Dump And Delete One | FAIL | Test Bmc Dump :: Test dump functionality of OpenBMC. | FAIL | **ERROR** 200 != 404 Root cause: handleGet() function of dbus_rest in bmcweb should be return setErrorResponse() when doing get request after delete 1 bmc dump. After checking code flow that will print "message 200 OK", not "message 404 Not Found". Due to /xyz/openbmc_project/dump/bmc/entry/1 object path already be deleted and not exist. Thus when doing get request again with the deleted object path, we will found that async_send() call return "Bad dbus request error". But, code flow will keep to response with [200], not [404]. Response should be [404] not [200]. That's why auto test report "**ERROR** 200 != 404". Solution: Add setErrorResponse with not found error message return when async_send return "Bad dbus request error". Tested: robot -t Create_Two_User_Initiated_Dump_And_Delete_One redfish/extended/test_bmc_dump.robot Create Two User Initiated Dump And Delete One | PASS | Test Bmc Dump :: Test dump functionality of OpenBMC. | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: I81e4f22bc2a24f482a41b757835068ca81321437
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/meson_options.txt
and then compiling. For example, meson <builddir> -Dkvm=disabled ...
followed by ninja
in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja coverage -C builddir test
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.