Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST to Chassis.Reset for invalid chassis ID returns 200 OK status code #289

Open
4 tasks done
FarahRasheed1 opened this issue Sep 17, 2024 · 3 comments
Open
4 tasks done

Comments

@FarahRasheed1
Copy link
Contributor

FarahRasheed1 commented Sep 17, 2024

Is this the right place to submit this?

  • This is not a security vulnerability or a crashing bug
  • This is not a question about how to use OpenBMC
  • This is not a bug in an OpenBMC fork or a bug in code still under code review.
  • This is not a request for a new feature.

Bug Description

Problem

Sending a POST request to reset an invalid chassis that does not exist returns 200 OK. I reproduced this on QEMU, see logs below.

It looks like the service is not validating the chassis ID correctly for Chassis.Reset action , leading it to respond with 200 OK even when the chassis doesn't exist.

Curl command:

curl -v -k -u root:0penBmc -X POST https://localhost:2443/redfish/v1/Chassis/random_chassis_that_does_not_exist/Actions/Chassis.Reset \
-H "Content-Type: application/json" \
-d '{
    "ResetType": "PowerCycle"
}'

Response:

{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request completed successfully.",
      "MessageArgs": [],
      "MessageId": "Base.1.13.0.Success",
      "MessageSeverity": "OK",
      "Resolution": "None"
    }
  ]
}

Logs

Sep 17 14:48:32 romulus phosphor-chassis-state-manager[291]: Change to Chassis Requested Power State: xyz.openbmc_project.State.Chassis.Transition.PowerCycle

Version

ID=openbmc-openpower
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="2.14.0"
VERSION_ID=2.14.0
VERSION_CODENAME="langdale"
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) 2.14.0"
BUILD_ID="20240724195151"
OPENBMC_TARGET_MACHINE="romulus"
EXTENDED_VERSION="2.14.0"

Additional Information

No response

@edtanous
Copy link
Contributor

Pretty sure this is because all chassis resets are routed to one dbus path, not a per-chassis path. I think @wltu had some patches a while back trying to clean this behavior up, but I don't know where they landed.

Thanks for the bug report!

@williamspatrick
Copy link
Member

I assume this is also being worked by @mox669 who is doing the multi-host implementation.

@FarahRasheed1
Copy link
Contributor Author

Yup, I had found https://gerrit.openbmc.org/c/openbmc/bmcweb/+/45396 which at a first look might fix this bug, but figured since there were no open issues, I may as well open it to keep track of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants