Improvements required in bmcweb

Ratan Gupta ratagupt at linux.vnet.ibm.com
Thu Apr 4 20:17:40 AEDT 2019


Hi Ed,

I am putting my points here, I found some functionalities missing in 
current bmcweb code.

1.

As part of redfish specification we need to support multi property 
update and if one of the property update is successful
then bmcweb need to send the 200 OK as well as the extended error info 
for the property where the implementation encounters the error.

Now in bmcweb we do the asio call one after other and pass the asynResp 
var in each property update and the
response code gets filled by each update call which seems to me is buggy.

Eg:  In any resource doPatch() if I do multiple asio calls for property 
update

          doPatch
          {     asio1(asynRep);
               asio2(asynRep);
               asio3(asynResp);
          }

Suppose in the above eg my third asio call gets failed(asio3) due to 
D-Bus call failure,
In that case asyncrep would have the internal server error(5XX), as per 
the spec the status code
should have been 200 if one of the property update is successful.

My proposal is to introduce a var in the "crow::res" structure, which 
will be true if any property update is successful,
and in the destructor of asyncRep(shared pointer around res) where we 
are calling the res.end(), we can check this var value,
if it is true then we can update the status code to 200 OK.

What is your view?

2.

Currently in bmcweb we are not mapping the dbus error to the actual 
error code, any dbus failure leads to "Internal Server error" which is 5XX.
Do we have some plan to map the D-bus error code to correct http code?


Regards
Ratan Gupta




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190404/fd3f1b5d/attachment.htm>


More information about the openbmc mailing list