| #
1e270c5f
|
| 04-Dec-2021 |
Patrick Williams <patrick@stwcx.xyz> |
span: clean up stray boost headers.
We recently switched from boost::beast::span to std::span, but a few header tweaks were not complete and we were still including beast::span. Remove the header fi
span: clean up stray boost headers.
We recently switched from boost::beast::span to std::span, but a few header tweaks were not complete and we were still including beast::span. Remove the header file and add a '#include <span>' for one header which uses span but was missing.
Tested: Compiles and unit tests pass.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I675c55df1abf78dfa244fced3d50679ffe1b6d91
show more ...
|
| #
98be3e39
|
| 16-Sep-2021 |
Ed Tanous <edtanous@google.com> |
Remove copies from log services and virtual media
Both of these entries make complete copies of the Request object. Following the pattern in the prior commit, move these to more modern patterns.
Fo
Remove copies from log services and virtual media
Both of these entries make complete copies of the Request object. Following the pattern in the prior commit, move these to more modern patterns.
For log service, this simply means constructing a payload object earlier.
For virtual media, it means doing the readJson call and parameter validation much earlier, which generally is the pattern we should strive for, validating and unpacking the structs in the first scope, then dealing with them as structures. To do this, this commit also creates a secondary struct to store the param data in to make the lambdas cleaner.
Tested: From Ashmitha
POST https://${bmc}/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData -d '{"DiagnosticDataType":"Manager"}' {
"@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "Id": "0", "TaskState": "Running", "TaskStatus": "OK" } ----------------------------------------------------------------- On task completion: GET https://${bmc}/redfish/v1/TaskService/Tasks/0 {
"@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2021-12-03T13:40:58+00:00", "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_0_0.Message", "Message": "The task with id 0 has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.1.TaskStarted", "Resolution": "None.", "Severity": "OK" }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "Successfully Completed Request", "MessageArgs": [], "MessageId": "Base.1.8.1.Success", "MessageSeverity": "OK", "Resolution": "None" } ], "Name": "Task 0", "Payload": { "HttpHeaders": [ "Host: 9.3.29.238", "User-Agent: curl/7.71.1", "Accept: */*", "Content-Length: 32", "Location: /redfish/v1/Managers/bmc/LogServices/Dump/Entries/32" ], "HttpOperation": "POST", "JsonBody": "{\n \"DiagnosticDataType\": \"Manager\"\n}", "TargetUri": "/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData" }, "PercentComplete": 0, "StartTime": "2021-12-03T13:38:20+00:00", "TaskMonitor": "/redfish/v1/TaskService/Tasks/0/Monitor", "TaskState": "Completed", "TaskStatus": "OK" }
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I178a3a7a7b27dfd34ec50a06398ac243a9d4ab67
show more ...
|
| #
26702d01
|
| 03-Nov-2021 |
Ed Tanous <edtanous@google.com> |
/s/boost::beast::span/std::span
std::span is now available in c++ 20 builds, and should be a drop in replacement for boost::span we were using previously. This commit sed replaces it, and changes r
/s/boost::beast::span/std::span
std::span is now available in c++ 20 builds, and should be a drop in replacement for boost::span we were using previously. This commit sed replaces it, and changes reference to cbegin and cend to begin and end respectively.
Tested: Ran redfish-service-validator. No new failures, and all nodes within /redfish/v1/Registries that would be effected by this change respond with 200 and the same content as previously.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iace89473b7c20f32106eae9d872c16cfae5f17f6
show more ...
|
| #
0fda0f12
|
| 15-Nov-2021 |
George Liu <liuxiwei@inspur.com> |
Update clang-format
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format `Don't break long string literals`
Tested: built bmcweb successfully and RedfishValidator Passed.
Sig
Update clang-format
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format `Don't break long string literals`
Tested: built bmcweb successfully and RedfishValidator Passed.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ib58f7c942fd3838592e043c57e0b6ffcdc3d963b
show more ...
|
| #
b7028ebf
|
| 26-Oct-2021 |
Spencer Ku <Spencer.Ku@quantatw.com> |
Redfish: Support Host Log Entries
This commit is designing and implementing a new logging service in Redfish to expose host serial console logs.The goal is that clients can talk to bmc via Redfish a
Redfish: Support Host Log Entries
This commit is designing and implementing a new logging service in Redfish to expose host serial console logs.The goal is that clients can talk to bmc via Redfish and get a real-time console. It will improve the debuggability of BMCs.
We will add three paths to redfish tree to implement the feature: 1. /redfish/v1/Systems/system/LogServices/HostLogger 2. /redfish/v1/Systems/system/LogServices/HostLogger/Entries 3. /redfish/v1/Systems/system/LogServices/HostLogger/Entries/<str>
To use this feature, we expect to use phosphor-hostlogger(stream mode) + rsyslog + bmcweb. Phosphor-hostlooger in stream mode forwards the byte stream into rsyslog via the imuxsock module. The log is persisted via the omfile module as soon as collected. It makes Host Logger leverage exsisting tools (rsyslog and logrotate). Then we can expose host serial console logs via bmcweb.
This feature can be enabled or disabled by setting the option "redfish-host-logger", and the default value is "enabled". If you don't want to expose host serial console logs, you need to turn the value to "disabled".
Sample Output: curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/ { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger", "@odata.type": "#LogService.v1_1_0.LogService", "Description": "Host Logger Service", "Entries": { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries" }, "Id": "HostLogger", "Name": "Host Logger Service" }
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/Entries { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of HostLogger Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries/0", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "EntryType": "Oem", "Id": "0", "Message": "123123", "Name": "Host Logger Entry", "OemRecordFormat": "Host Logger Entry", "Severity": "OK" } ], "Members@odata.count": 1, "Name": "HostLogger Entries" }
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/Entries/0 { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries/0", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "EntryType": "Oem", "Id": "0", "Message": "123123", "Name": "Host Logger Entry", "OemRecordFormat": "Host Logger Entry", "Severity": "OK" }
Signed-off-by: Spencer Ku <Spencer.Ku@quantatw.com> Change-Id: I4ad2652a80fb1c441a25382b7d422ecd7ffc8557
show more ...
|
| #
3fafa370
|
| 19-Oct-2021 |
Ed Tanous <edtanous@google.com> |
Revert "Redfish: Support Host Log Entries"
This commit appears to cause 500 errors on systems that don't have host-logger installed. Reverting for now to get the codebase back to stable; To the au
Revert "Redfish: Support Host Log Entries"
This commit appears to cause 500 errors on systems that don't have host-logger installed. Reverting for now to get the codebase back to stable; To the author, please fix the error and resubmit.
The bump that failed is here: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/47933
This reverts commit bf888502a247d8374c70e7ceddc9862bf0ad88bd.
Change-Id: I346178f079245f96e2c1e03720490dcbcf19427b Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
| #
bf888502
|
| 22-Jul-2021 |
SpencerKu <Spencer.Ku@quantatw.com> |
Redfish: Support Host Log Entries
This commit is designing and implementing a new logging service in Redfish to expose host serial console logs.The goal is that clients can talk to bmc via Redfish a
Redfish: Support Host Log Entries
This commit is designing and implementing a new logging service in Redfish to expose host serial console logs.The goal is that clients can talk to bmc via Redfish and get a real-time console. It will improve the debuggability of BMCs.
We will add three paths to redfish tree to implement the feature: 1. /redfish/v1/Systems/system/LogServices/HostLogger 2. /redfish/v1/Systems/system/LogServices/HostLogger/Entries 3. /redfish/v1/Systems/system/LogServices/HostLogger/Entries/<str>
To use this feature, we expect to use phosphor-hostlogger(stream mode) + rsyslog + bmcweb. Phosphor-hostlooger in stream mode forwards the byte stream into rsyslog via the imuxsock module. The log is persisted via the omfile module as soon as collected. It makes Host Logger leverage exsisting tools (rsyslog and logrotate). Then we can expose host serial console logs via bmcweb.
This feature can be enabled or disabled by setting the option "redfish-host-logger", and the default value is "enabled". If you don't want to expose host serial console logs, you need to turn the value to "disabled".
RedfishServiceValidator results: /redfish/v1/Systems/system/LogServices/HostLogger pass: 4 passGet: 1 skipOptional: 9
/redfish/v1/Systems/system/LogServices/HostLogger/Entries pass: 24 passGet: 1 skipOptional: 1
/redfish/v1/Systems/system/LogServices/HostLogger/Entries/<str> pass: 7 passGet: 1 skipOptional: 15
Sample Output: curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/HostLogger/Entries { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of HostLogger Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/HostLogger/Entries/1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "EntryType": "Event", "Id": "1", "Message": "[ 57.061546] gq 0000:16:00.0 eth0: link up, 100 Gbps, no PAUSE", "MessageArgs": [ "[ 57.061546] gq 0000:16:00.0 eth0: link up, 100 Gbps, no PAUSE" ], "MessageId": "OpenBMC.0.1.SerialLogAdded", "Name": "HostLogger Entries", "Severity": "OK" }, ... ], "Members@odata.count": 22, "Name": "HostLogger Entries" }
Signed-off-by: SpencerKu <Spencer.Ku@quantatw.com> Change-Id: I5a7873caa117400fb0a737588a50bd743e8b5063
show more ...
|
| #
d32c4fa9
|
| 14-Sep-2021 |
Ed Tanous <edtanous@google.com> |
Boost uri update
Update to the latest version of boost::uri
The newest version of boost uri makes some breaking changes that we need to account for. At the same time, we take the opportunity to mo
Boost uri update
Update to the latest version of boost::uri
The newest version of boost uri makes some breaking changes that we need to account for. At the same time, we take the opportunity to move to the error code based parse methods that don't rely on exceptions.
The biggest changes are: The standalone build is no longer present. A discussion with the boost::url maintainers shows that our best option is to do a simple copy of the headers, and compile boost/url/src.hpp in a separate file. This is intended to allow people to pull the library in "standalone" and not have to rely on the build machinery in boost-url, which we don't really need. Interestingly, this file doesn't have a newline at the end, which clang correctly flags. OpenBMC doesn't really need that warning, as we rely on clang-format to do that, so we add -Wno-newline-eof clang to get the code to compile there.
All url parsers are moved to the parse_uri, or parse_relative_uri equivalents. This slightly tightens the requirements around what URLs are accepted, but in no ways that should break anything. (Ie, "/redfish/v1" is no longer accepted for a virtual media endpoint.
boost::urls::url_view::params_type has been renamed to query_params_type, and the relevant methods have been updated.
Because of the missing standalone mode, we now need to use boost::string_view which doesn't implicitly construct from std::string_view. Some discussion on the boost list shows that this is coming soon, so that cruft can eventually be cleaned up, but for now we need the construction.
Tested: Loaded in qemu, and ran some URLs (/redfish/v1 and /redfish/v1/Chassis) to ensure that the url handler functions as intended.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I5843776d4ec01b4d92af2ee3a9cf1ebb1d920ae7
show more ...
|
| #
647b3cdc
|
| 04-Jul-2021 |
George Liu <liuxiwei@inspur.com> |
log_services: Add download of post code log entries
- Add a GET method /redfish/v1/Systems/system/LogServices/PostCodes /Entries/<str>/attachment/, Get the attribute value through the getPostCod
log_services: Add download of post code log entries
- Add a GET method /redfish/v1/Systems/system/LogServices/PostCodes /Entries/<str>/attachment/, Get the attribute value through the getPostCodes method and encode it as base64, and send it off.
- This allows the use to offload error logs for analysis and further parsing if needed. An http header of "Accept: application/octet-stream" or the default "*/*" is expected.
Tested: - Ran Redfish validator.
- Before, It broke post JSON content as HTTP https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44660 Now, I tested it passed.
- pldmtool raw --data 0x80 0x3F 0xC 0x0A 0x00 0x00 0x00 0x00 0x00 0x07 0x00 0x00 0x00 0x48 0x00 0x00 0x00 0x02 0x00 0x00 0x01 0x00 0x00 0x00 0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x53 0x54 0x41 0x4e 0x44 0x42 0x59 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20
$curl -k https://127.0.0.1:2443/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment/ output: AgAAAQAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFNUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAg
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ide684146a4ae9d55dc95fb765927867b042fc27c
show more ...
|
| #
35440d18
|
| 07-Sep-2021 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Show only "Completed" dump entries in Redfish resp
In the current implementation, the dumps whose status remain "InProgress" were also displayed when a GET request on dump entries is fired. That is,
Show only "Completed" dump entries in Redfish resp
In the current implementation, the dumps whose status remain "InProgress" were also displayed when a GET request on dump entries is fired. That is, when the user initiates a dump creation, and immediately does a GET on dump entries, the dump that is now created will also be displayed with size 0 and an invalid date in the redfish response as below, until the status becomes "Completed"
{ "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Dump/Entries/7", "@odata.type": "#LogEntry.v1_7_0.LogEntry", "AdditionalDataSizeBytes": 0, "AdditionalDataURI": "/redfish/v1/Managers/bmc/LogServices/Dump/Entries/7/attachment", "Created": "1970-01-01T00:00:00+00:00", "DiagnosticDataType": "Manager", "EntryType": "Event", "Id": "7", "Name": "BMC Dump Entry" }
This commit contains changes that will avoid displaying the incomplete dumps.
Tested By:
* GET https://${bmc}/redfish/v1/Managers/bmc/LogServices/Dump/Entries/12 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type BMC dump named 12 was not found.", "MessageArgs": [ "BMC dump", "12" ], "MessageId": "Base.1.8.1.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.8.1.ResourceNotFound", "message": "The requested resource of type BMC dump named 12 was not found." } }
* GET https://${bmc}/redfish/v1/Managers/bmc/LogServices/Dump/Entries/ -- This also avoids displaying incomplete dump entries.
Redfish Validator passed.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: Ifc5e1773cde0c4c4288e8ebbcdf87b2ec480af55
show more ...
|
| #
c0bd5e4b
|
| 13-Sep-2021 |
Ed Tanous <edtanous@google.com> |
Move log service file parsing to use from_chars
std::from_chars seems to be what most other bmcweb code has moved to, and allows removal of exceptions usage.
Tested: Ran redfishtool -S Always -A Se
Move log service file parsing to use from_chars
std::from_chars seems to be what most other bmcweb code has moved to, and allows removal of exceptions usage.
Tested: Ran redfishtool -S Always -A Session -u root -p 0penBmc -r 192.168.7.2 raw GET "/redfish/v1/Managers/bmc/LogServices/Journal/Entries/1632252609998258"
And observed that the uri component got parsed properly.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Icd4808196eeae0f8a19a208a065b5f2f4f0b050c
show more ...
|
| #
8b6a35f0
|
| 30-Jul-2021 |
Gunnar Mills <gmills@us.ibm.com> |
Fix System EventLog Collection permission
Both are the login Privilege so this has no client impact.
From redfish-core/include/registries/privilege_registry.hpp: conststaticauto& getLogEntry = priv
Fix System EventLog Collection permission
Both are the login Privilege so this has no client impact.
From redfish-core/include/registries/privilege_registry.hpp: conststaticauto& getLogEntry = privilegeSetLogin; conststaticauto& getLogEntryCollection = privilegeSetLogin;
From https://redfish.dmtf.org/schemas/v1/LogEntryCollection_v1.xml: /redfish/v1/Systems/{ComputerSystemId}/LogServices/{LogServiceId}/Entries
Tested: None.
Change-Id: I955fa005db332346e3151d1ac6b7f4ad43406063 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
| #
ad89dcf0
|
| 30-Jul-2021 |
Gunnar Mills <gmills@us.ibm.com> |
Correct Manager LogService Collection permission
Both are the login Privilege so this has no client impact.
From redfish-core/include/registries/privilege_registry.hpp: const auto& getLogServiceCol
Correct Manager LogService Collection permission
Both are the login Privilege so this has no client impact.
From redfish-core/include/registries/privilege_registry.hpp: const auto& getLogServiceCollection = privilegeSetLogin; const auto& getLogService = privilegeSetLogin;
From https://redfish.dmtf.org/schemas/v1/LogServiceCollection_v1.xml: <String>/redfish/v1/Managers/{ManagerId}/LogServices</String>
Tested: None.
Change-Id: Ie836e2fa9bc841f16e1d6c6104c6d474751c5a09 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
| #
b2a3289d
|
| 13-Jul-2021 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Fix System dump entries route
The system dump entries URI was wrong (same as bmc dump entries) and hence causes bmcweb to crash with the following error: "handler already exists for /redfish/v1/Mana
Fix System dump entries route
The system dump entries URI was wrong (same as bmc dump entries) and hence causes bmcweb to crash with the following error: "handler already exists for /redfish/v1/Managers/bmc/LogServices/Dump/Entries/"
The below commit has caused this issue: https://github.com/openbmc/bmcweb/commit/ed3982131dcef2b499da36e674d2d21 b2289ef29 The above change will impact the clients as listing of system dumps will never work and also this causes bmcweb to crash.
This commit has the fix for the same. Old Incorrect URI: /redfish/v1/Managers/bmc/LogServices/Dump/Entries/ is changed to the following RI: /redfish/v1/Systems/system/LogServices/Dump/Entries/
Tested the same.
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: Idbf23cb2ca52575dd47d296884793a33710e07d5
show more ...
|
| #
4f48d5f6
|
| 21-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Make code compile with clang-13
Clang-13 rightfully warns that the hasWebuiRoute variable isn't declared as static. This commit resolves that, and adds the static keyword so it can be used in multi
Make code compile with clang-13
Clang-13 rightfully warns that the hasWebuiRoute variable isn't declared as static. This commit resolves that, and adds the static keyword so it can be used in multiple compile units. It also adds the static keyword to the privilege registry, and the inline keyword to many methods that now need it.
clang-format is also updated to version 12 in parse_registies.py, as that's what CI uses, and what most people have installed.
Tested: Followed clang-tidy instructions in README.md "bitbake bmcweb" step now succeeds.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id43b13606754cb37a404799fce155599ac3a3240
show more ...
|
| #
ed398213
|
| 09-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Automate PrivilegeRegistry to code
This commit attempts to automate the creation of our privileges structures from the redfish privilege registry. It accomplishes this by updating parse_registries.
Automate PrivilegeRegistry to code
This commit attempts to automate the creation of our privileges structures from the redfish privilege registry. It accomplishes this by updating parse_registries.py to also pull down the privilege registry from DMTF. The script then generates privilege_registry.hpp, which include const defines for all the privilege registry entries in the same format that the Privileges struct accepts. This allows new clients to simply reference the variable to these privilege structures, instead of having to manually (ie error pronely) put the privileges in themselves.
This commit updates all the routes.
For the moment, override and OEM schemas are not considered. Today we don't have any OEM-specific Redfish routes, so the existing ones inherit their parents schema. Overrides have other issues, and are already incorrect as Redfish defines them.
Binary size remains unchanged after this patchset.
Tested: Ran redfish service validator
Ran test case from f9a6708c4c6490257e2eb6a8c04458f500902476 to ensure that the new privileges constructor didn't cause us to regress the brace construction initializer.
Checked binary size with: gzip -c $BBPATH/tmp/work/s7106-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/rootfs/usr/bin/bmcweb | wc -c 1244048
(tested on previous patchset)
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ideede3d5b39d50bffe7fe78a0848bdbc22ac387f
show more ...
|
| #
d0dbeefd
|
| 01-Jul-2021 |
Ed Tanous <edtanous@google.com> |
Revert "log_services: Add AdditionalDataURI to Post Code log entries"
This reverts commit 0ef217f4e89016e8f49f487fe65934b934aab077.
This commit requires 753d034d9fb0f2dbd240f5f0ae51371dd3a28369 to
Revert "log_services: Add AdditionalDataURI to Post Code log entries"
This reverts commit 0ef217f4e89016e8f49f487fe65934b934aab077.
This commit requires 753d034d9fb0f2dbd240f5f0ae51371dd3a28369 to function, which is also being reverted as part of fixing a regression.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie6cfa6bb247d66f7c0d0291a07982bbd54d104c4
show more ...
|
| #
753d034d
|
| 01-Jul-2021 |
Ed Tanous <edtanous@google.com> |
Revert "log_services: Add download of post code log entries"
This reverts commit af61db10fb40c7beb91a70f0b3ff28cb8e6c1704 which breaks the ability to detect and post json content as HTTP. I suspect
Revert "log_services: Add download of post code log entries"
This reverts commit af61db10fb40c7beb91a70f0b3ff28cb8e6c1704 which breaks the ability to detect and post json content as HTTP. I suspect something went wrong with the requestPrefersHtml() method that was modified in this commit. Authors should feel free to resubmit this patch once they have the failure understood and fixed.
Change-Id: Id6e8d102fe5d4b02ac0dce06bff50c28edfcf44c Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
| #
729f55fe
|
| 30-Jun-2021 |
Gunnar Mills <gmills@us.ibm.com> |
Remove code using ambiguous privileges constructor
432a890c removed the ambiguous privileges constructor. af61db10 added code that used this removed ambiguous privileges constructor.
This is causin
Remove code using ambiguous privileges constructor
432a890c removed the ambiguous privileges constructor. af61db10 added code that used this removed ambiguous privileges constructor.
This is causing bmcweb CI and bmcweb autobumps to fail.
The error looks like: error: cannot convert '<brace-enclosed initializer list>' to 'const std::initializer_list<std::initializer_list<const char*> >&' | 3102 | .privileges({"Login"})
af61db10 passed CI because it was pushed before and based on a parent that was before 432a890c.
Tested: bmcweb builds. No further testing done. Change-Id: I21399033d63851e3c83f3cd5a00e1227064e6941 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
| #
7c8c4058
|
| 04-Jun-2021 |
Tejas Patil <tejaspp@ami.com> |
Add DateTime & Offset in Managers & LogServices
This commit adds the support for "DateTimeLocalOffset" property under "/redfish/v1/Managers/bmc/" Redfish URI. And it also adds the support for "DateT
Add DateTime & Offset in Managers & LogServices
This commit adds the support for "DateTimeLocalOffset" property under "/redfish/v1/Managers/bmc/" Redfish URI. And it also adds the support for "DateTime" & "DateTimeLocalOffset" properties under "/redfish/v1/Systems/system/LogServices/<id>/" & "/redfish/v1/Managers/bmc/LogServices/<id>/" Redfish URI's.
These properties shows the current Date, Time & the UTC offset that the current DateTime property value contains.
Tested:
- Redfish Validator Test passed.
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X GET https://${bmc}/redfish/v1/Managers/bmc/ { "@odata.id": "/redfish/v1/Managers/bmc", "@odata.type": "#Manager.v1_11_0.Manager", "Actions": { "#Manager.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Managers/bmc/ResetActionInfo", "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset" }, "#Manager.ResetToDefaults": { "ResetType@Redfish.AllowableValues": [ "ResetAll" ], "target": "/redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults" } }, "DateTime": "2021-06-04T12:18:28+00:00", "DateTimeLocalOffset": "+00:00", "Description": "Baseboard Management Controller", "EthernetInterfaces": { "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces" }, "FirmwareVersion": "2.11.0-dev-114-gc1989599d", "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "MaxConcurrentSessions": 4, "ServiceEnabled": true }, "Id": "bmc", "LastResetTime": "2021-06-04T12:07:02+00:00", "Links": { "ActiveSoftwareImage": { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/419c86fb" }, "ManagerForServers": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "ManagerForServers@odata.count": 1, "SoftwareImages": [ { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/419c86fb" } ], "SoftwareImages@odata.count": 1 }, "LogServices": { "@odata.id": "/redfish/v1/Managers/bmc/LogServices" }, "ManagerType": "BMC", "Model": "OpenBmc", "Name": "OpenBmc Manager", "NetworkProtocol": { "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol" }, "Oem": { "@odata.id": "/redfish/v1/Managers/bmc#/Oem", "@odata.type": "#OemManager.Oem", "OpenBmc": { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc", "@odata.type": "#OemManager.OpenBmc", "Certificates": { "@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates" } } }, "PowerState": "On", "SerialConsole": { "ConnectTypesSupported": [ "IPMI", "SSH" ], "MaxConcurrentSessions": 15, "ServiceEnabled": true }, "ServiceEntryPointUUID": "1832ebbb-0b54-44e9-90d7-b49108f6863c", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "UUID": "7fe3d13d-4ae7-4a4f-add1-2d60308124b4" }
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/ { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog", "@odata.type": "#LogService.v1_1_0.LogService", "Actions": { "#LogService.ClearLog": { "target": "/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog" } }, "DateTime": "2021-06-04T12:11:10+00:00", "DateTimeLocalOffset": "+00:00", "Description": "System Event Log Service", "Entries": { "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries" }, "Id": "EventLog", "Name": "Event Log Service", "OverWritePolicy": "WrapsWhenFull" }
Signed-off-by: Tejas Patil <tejaspp@ami.com> Change-Id: I416d13ae11e236cf4552f817a9bd69b48f9b5afb
show more ...
|
| #
af61db10
|
| 08-Mar-2021 |
George Liu <liuxiwei@inspur.com> |
log_services: Add download of post code log entries
- Add a GET method /redfish/v1/Systems/system/LogServices/PostCodes /Entries/<str>/attachment/, Get the attribute value through the getPostCod
log_services: Add download of post code log entries
- Add a GET method /redfish/v1/Systems/system/LogServices/PostCodes /Entries/<str>/attachment/, Get the attribute value through the getPostCodes method and encode it as base64, and send it off.
- This allows the use to offload error logs for analysis and further parsing if needed. An http header of "Accept: application/octet-stream" or the default "*/*" is expected.
Tested: - Ran Redfish validator.
- pldmtool raw --data 0x80 0x3F 0xC 0x0A 0x00 0x00 0x00 0x00 0x00 0x07 0x00 0x00 0x00 0x48 0x00 0x00 0x00 0x02 0x00 0x00 0x01 0x00 0x00 0x00 0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x53 0x54 0x41 0x4e 0x44 0x42 0x59 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20
$curl -k https://127.0.0.1:2443/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment/ output: AgAAAQAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFNUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAg
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I74dd6c1dc2d3dfb7908f7741e0d9e7825c1df816
show more ...
|
| #
0ef217f4
|
| 08-Mar-2021 |
George Liu <liuxiwei@inspur.com> |
log_services: Add AdditionalDataURI to Post Code log entries
- Need to support the Additional Data URI on Post Code log service. IBM progress codes are typically 72 bytes including a primary code
log_services: Add AdditionalDataURI to Post Code log entries
- Need to support the Additional Data URI on Post Code log service. IBM progress codes are typically 72 bytes including a primary code (8 bytes) and a secondary code that contains hex words that would provide additional details on the core problem during boot hangs. These secondary hex words would be in this Additional Data URI.
- Need to check for the secondary progress code(std::vector<uint8_t>) If it is empty, then do not generate the Additional Data URI. If it is not empty, then generate Additional Data URI for that particular post entry.
- This commit is not alone for IBM, it is a generic code that should work on every system. As per the recent PDI change that went into Progress code structure https://github.com/openbmc/phosphor-dbus-interfaces/commit/9a96970ebb93eb1f495c200801343a4d1c53977c#diff-0aad0ef8ed32e2652256f50357eede1aedd6ff1398df1bb1a121ad9125916c5f 1. The primary code(uint64_t) is what we see in the BIOSPOSTCode Message registry. 2. The secondary code(array[byte]) is the entire raw buffer which could be used to offload the information out of BMC. This should not impact any systems that does not have a secondary code, as if the secondary code is empty -> we will not populate the AdditionalDataURI at all.
Tested: - Ran Redfish validator which instructed to bump the odata.type from v1_4_0 to v1_8_0 and passed.
- Verified the new AdditionalDataURI was correct for LogServices/PostCodes/Entries/<str>: $ curl -k https://127.0.0.1:2443/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1 { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries", "@odata.type": "#LogEntry.v1_8_0.LogEntry", "Description": "Collection of POST Code Log Entries", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1", "@odata.type": "#LogEntry.v1_8_0.LogEntry", "AdditionalDataURI": "/redfish/v1/Systems/system/LogServices/PostCodes/Entries/B1-1/attachment", ... ... } ], "Members@odata.count": 1, "Name": "BIOS POST Code Log Entries" }
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I897888a08db94e22b5a8098bc2a874b00bfb5361
show more ...
|
| #
432a890c
|
| 14-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Remove ambiguous privileges constructor
There are a number of endpoints that assume that a given routes privileges are governed by a single set of privileges, instead of multiple sets ORed together.
Remove ambiguous privileges constructor
There are a number of endpoints that assume that a given routes privileges are governed by a single set of privileges, instead of multiple sets ORed together. To handle this, there were two overloads of the privileges() method, one that took a vector of Privileges, and one that took an initializer_list of const char*. Unfortunately, this leads some code in AccountService to pick the wrong overload when it's called like this .privileges( {{"ConfigureUsers"}, {"ConfigureManager"}, {"ConfigureSelf"}})
This is supposed to be "User must have ConfigureUsers, or ConfigureManager, or ConfigureSelf". Currently, because it selects the wrong overload, it computes to "User must have ConfigureUsers AND ConfigureManager AND ConfigureSelf.
The double braces are supposed to cause this to form a vector of Privileges, but it appears that the initializer list gets consumed, and the single invocation of initializer list is called. Interestingly, trying to put in a privileges overload of intializer_list<initializer_list<const char*>> causes the compilation to fail with an ambiguous call error, which is what I would've expected to see previously in this case, but alas, I'm only a novice when it comes to how the C++ standard works in these edge cases. This is likely due in part to the fact that they were templates of an unused template param (seemingly copied from the previous method) and SFINAE rules around templates.
This commit functionally removes one of the privileges overloads, and adds a second set of braces to every privileges call that previously had a single set of braces. Previous code will not compile now, which is IMO a good thing.
This likely popped up in the Node class removal, because the Node class explicitly constructs a vector of Privilege objects, ensuing it can hit the right overload
Tested: Ran Redfish service validator
Tested the specific use case outlined on discord with: Creating a new user with operator privilege: ``` redfishtool -S Always -u root -p 0penBmc -vvvvvvvvv -r 192.168.7.2 AccountService adduser foo mysuperPass1 Operator ```
Then attempting to list accounts: ``` curl -vvvv --insecure --user foo:mysuperPass1 https://192.168.7.2/redfish/v1/AccountService/Accounts/foo ```
Which succeeded and returned the account in question.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I83e62b70e97f56dc57d43b9081f333a02fe85495
show more ...
|
| #
f9a6708c
|
| 15-Jun-2021 |
Charles Boyer <Charles.Boyer@fii-usa.com> |
log_services: Fix system dump entries route
With redfish-dump-log enabled, the bmcweb service would throw a runtime error and exit because the dump entries routes for Managers and Systems were the s
log_services: Fix system dump entries route
With redfish-dump-log enabled, the bmcweb service would throw a runtime error and exit because the dump entries routes for Managers and Systems were the same.
The Systems dump entries route should be '/redfish/v1/Systems/system/LogServices/Dump/Entries/'
Tested: With redfish-dump-log enabled, - bmcweb service does not throw runtime error - Redfish Service Validator passes
Signed-off-by: Charles Boyer <Charles.Boyer@fii-usa.com> Change-Id: I0ffd19bfc643cb8a3be3c5c2cd88c270ec974267
show more ...
|
| #
864d6a17
|
| 09-Jun-2021 |
John Edward Broadbent <jebr@google.com> |
Corrects URI by removing /<str>
A URI was accidentally changed, and this issue is corrected in the change.
Change-Id: Icd840dd60bba2a2fd0010ce2cf88fac801b37cf7 Signed-off-by: John Edward Broadbent
Corrects URI by removing /<str>
A URI was accidentally changed, and this issue is corrected in the change.
Change-Id: Icd840dd60bba2a2fd0010ce2cf88fac801b37cf7 Signed-off-by: John Edward Broadbent <jebr@google.com>
show more ...
|