summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2019-07-12 15:48:50 +0300
committerAndrew Geissler <geissonator@yahoo.com>2019-07-12 16:04:39 +0300
commita2730f017069aeb39ea5d3bf4c1403965b2ba2f9 (patch)
tree2f7deaa7565dceeee4207fab09b82bfd13d29d54
parent082f28fd2588fd9fcd9452ad38234ce875319163 (diff)
downloadbmcweb-a2730f017069aeb39ea5d3bf4c1403965b2ba2f9.tar.xz
pcie: Don't return error if no PCIe present
Resolves openbmc/bmcweb#98 Tested: Before the fix: curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Systems/system { "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_6_0.ComputerSystem", ... "SystemType": "Physical", "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.4.0.InternalError", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service.", "Severity": "Critical" } ], "code": "Base.1.4.0.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } After the fix: curl -k -H "X-Auth-Token: $TOKEN" -X GET https://${BMC_IP}/redfish/v1/Systems/system { "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_6_0.ComputerSystem", ... "SerialNumber": "1318ECA", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Disabled" }, "SystemType": "Physical" } Change-Id: I0cc2a86decdea47164103c901ce7bd631f8adaf2 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
-rw-r--r--redfish-core/lib/pcie.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 6b8600f081..ad61ff4edb 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -35,9 +35,9 @@ static inline void getPCIeDeviceList(std::shared_ptr<AsyncResp> asyncResp)
std::vector<std::string> &pcieDevicePaths) {
if (ec)
{
- BMCWEB_LOG_DEBUG << "failed to get PCIe device paths ec: "
+ BMCWEB_LOG_DEBUG << "no PCIe device paths found ec: "
<< ec.message();
- messages::internalError(asyncResp->res);
+ // Not an error, system just doesn't have PCIe info
return;
}
nlohmann::json &pcieDeviceList =