Skip to content

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

@FarahRasheed1

Description

@FarahRasheed1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions