Giter VIP home page Giter VIP logo

Comments (5)

edtanous avatar edtanous commented on July 18, 2024

ACK, yeah, that looks like a really unfortunate side effect that I certainly didn't expect when merging that code. In terms of priority, I think we did get that right. A failing service validator effects EVERY platform, so if the two requirements are mutually exclusive, I'd much rather have a passing service validator than have sensor override (which I don't think is actually enabled on anything but downstream platforms).

With that said, lets see if we can get it working for both. I think to fix that, it's going to require us to go back to building the entire sensor tree, to determine the index of the sensor in question, then firing it to that path. Let me know if you need help rearranging the code.

from bmcweb.

vsytch avatar vsytch commented on July 18, 2024

@carsonlab suggested we try to modify 3e35c76. As the only requirement is that MemberId needs to match the end of URI, could we just make the end of URI be the sensor name and preserve the old MemberId format? That way we wouldn't need to rebuild the sensor tree to map MemberId into a Name.

from bmcweb.

edtanous avatar edtanous commented on July 18, 2024

That's probably reasonable. Please make sure the validator passes on whatever change we make.

from bmcweb.

vsytch avatar vsytch commented on July 18, 2024

As a short term fix, reverting 3e35c76 and c71d612 works.

curl localhost/redfish/v1/Chassis/Tray/Thermal#/Fans
...
    {
      "@odata.id": "/redfish/v1/Chassis/Tray/Thermal#/Fans/0",
      "@odata.type": "#Thermal.v1_3_0.Fan",
      "MaxReadingRange": 100,
      "MemberId": "fan0_pwm",
      "MinReadingRange": 0,
      "Name": "fan0 pwm",
      "Reading": 29,
      "ReadingUnits": "Percent",
      "Status": {
        "Health": "OK",
        "State": "Enabled"
      }
    },
...
curl --data '{"Fans":[{"MemberId": "fan0_pwm", "Reading": 50}]}' -X PATCH localhost/redfish/v1/Chassis/Tray/Thermal#/Fans/
{
  "@odata.id": "/redfish/v1/Chassis/Tray/Thermal",
  "@odata.type": "#Thermal.v1_4_0.Thermal",
  "Fans": [],
  "Id": "Thermal",
  "Name": "Thermal",
  "Temperatures": []
}
curl localhost/redfish/v1/Chassis/Tray/Thermal#/Fans
...
    {
      "@odata.id": "/redfish/v1/Chassis/Tray/Thermal#/Fans/0",
      "@odata.type": "#Thermal.v1_3_0.Fan",
      "MaxReadingRange": 100,
      "MemberId": "fan0_pwm",
      "MinReadingRange": 0,
      "Name": "fan0 pwm",
      "Reading": 50,
      "ReadingUnits": "Percent",
      "Status": {
        "Health": "OK",
        "State": "Enabled"
      }
    },
...

Based on the second commit, shouldn't have it "fixed" sensor overrides? But instead its causing the dbus error I mentioned previously.

from bmcweb.

edtanous avatar edtanous commented on July 18, 2024

This was resolved with https://gerrit.openbmc.org/c/openbmc/bmcweb/+/64528

from bmcweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.