Age | Commit message (Collapse) | Author | Files | Lines |
|
Copying integerals is cheap, and generally is cheaper than copying
references.
Tested: compiles.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I5cb08445d6bc06ed1d0c86c27ca1db1bf4cce316
|
|
The only changes were to make some functions static, which is
essentially no-op.
Changes were done by the robot.
Tested: Unit tests pass, changes no-op
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id84ca2bee6f237877ba2900b2cbe4679b38a91dc
|
|
These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.
Tested:
Ran series through redfish service validator. No changes observed.
UUID failing in Qemu both before and after.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1ca0be980d136bd4e5474341f4fd62f2f6bbdbae
|
|
Part of enforcing cpp core guidelines involves explicitly including all
constructors required on a non-trivial class. We were missing quite a
few. In all cases, the copy/move/and operator= methods are simply
deleted.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie8d6e8bf2bc311fa21a9ae48b0d61ee5c1940999
|
|
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
|
|
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>
|
|
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
|