Chassis reset
Ed Tanous
ed at tanous.net
Wed Sep 23 10:17:29 AEST 2020
On Tue, Sep 22, 2020 at 12:16 PM Vijay Khemka <vijaykhemka at fb.com> wrote:
>
> After a bit of study on redfish, I got some basic definition for chassis from redfish document as below.
> https://redfish.dmtf.org/schemas/v1/Chassis.v1_13_0.json
> "Chassis": {
> "additionalProperties": false,
> "description": "The Chassis schema represents the physical components of a system. This resource represents the sheet-metal confined spaces and logical zones such as racks, enclosures, chassis and all other containers. Subsystems, such as sensors, that operate outside of a system's data plane are linked either directly or indirectly through this resource. A subsystem that operates outside of a system's data plane are not accessible to software that runs on the system.",
> "longDescription": "This resource shall represent a chassis or other physical enclosure for a Redfish implementation.",
>
> In my understanding, chassis reset should be treated as complete power cycle of whole chassis and we can use redfish command "ForceRestart or PowerCycle"
I'd probably guess that in this case we'd map both ForceRestart and
PowerCycle to the same action, if we're just pulling the power rail.
>
> As per our implementation in bmcweb, we have implemented 2 interface (syatem and chassis) where we deal with chassis reset
> 1. https://github.com/openbmc/bmcweb/blob/684bb4b89f88b394b00b140d71c161143393f80b/redfish-core/lib/systems.hpp#L1754
> In this system interface every reset type except ForceOff is calling action for host and for ForceOff command, it is calling chassis poweroff.
>
> 2. https://github.com/openbmc/bmcweb/blob/684bb4b89f88b394b00b140d71c161143393f80b/redfish-core/lib/chassis.hpp#L585
> Here we only implement "PowerCycle" command.
>
> Why did we implement chassis reset command at 2 different interface, I might be missing something here.
>
> As per x86-power-control, in both above cases chassis command point to action on host only
> https://github.com/openbmc/x86-power-control/blob/e63dea0875a70ff50f430a4bdc84b646a56b9ce7/power-control-x86/src/power_control.cpp#L2389
Because most systems don't have the ability to do a complete AC reset,
so today we tend to map a Chassis reset to a host reset for
compatibility. I suspect your use case is the first system that will
add the ability to do the "right" thing, and actually cycle power to
the chassis.
>
> where can we implement action on chassis.
>
> Can I add ForceRestart for chassis in redfish chassis interface as chassis sled (complete power removal and restore)
> https://github.com/openbmc/bmcweb/blob/684bb4b89f88b394b00b140d71c161143393f80b/redfish-core/lib/chassis.hpp#L585
You can add ForceRestart, but you need to implement it in such a way
that it's selecting it per-chassis, given that you'll have 2 chassis
instances, one capable of an AC reset, one that isn't. Today, the
code does the wrong thing, and maps all chassis resets to the
/org/xyz/openbmc_project/chassis0 path, because there was no
association for power state mapping back to a chassis path. You'll
likely need to do some engineering in this regard, or just map
/org/xyz/openbmc_project/chassis0 to your "chassis" reset.
>
> I understand that it is not very clear from refish how to map each resource and command.
>
> Please suggest a direction here.
>
> Regards
> -Vijay
>
More information about the openbmc
mailing list