Chassis reset
Ed Tanous
ed at tanous.net
Thu Sep 24 08:31:34 AEST 2020
On Wed, Sep 23, 2020 at 2:42 PM Patrick Williams <patrick at stwcx.xyz> wrote:
>
> On Wed, Sep 23, 2020 at 02:12:10PM -0700, Ed Tanous wrote:
> > On Wed, Sep 23, 2020 at 1:21 PM Patrick Williams <patrick at stwcx.xyz> wrote:
> > >
> > > On Wed, Sep 23, 2020 at 12:26:58PM -0700, Ed Tanous wrote:
> > > > On Wed, Sep 23, 2020 at 12:10 PM Patrick Williams <patrick at stwcx.xyz> wrote:
> > > > >
> > > > > On Wed, Sep 23, 2020 at 05:45:51AM +0000, Vijay Khemka wrote:
> > > > > >
> > > > > > Yes I have 2 chassis instance xyz/openbmc_project/chassis0 and xyz/openbmc_project/chassis_system0.
> > > > > > Later one is used for AC reset.
> > > > >
> > > > > Can we do a query to see if 'chassis_system0' exists and use it first
> > > > > and then 'chassis0' if not?
> > > >
> > > > I don't think it's that simple. The way the dbus APIs are defined,
> > > > one Redfish chassis needs to call the chassis0 path, the other needs
> > > > to call the chassis_system0 path. We'd need a way to key off which
> > > > one is which. I haven't seen any entity-manager configs get checked
> > > > in for a "multinode chassis" entity type, so whatever interface we use
> > > > to describe that will probably be what we need to key off to make that
> > > > path distinction.
> > >
> > > In Redfish this would be the system path that maps to chassis_system0
> > > and not the chassis path. In Redfish today, chassis doesn't do a whole
> > > lot except allow you to power cycle the host. Most of the control is in
> > > System.
> >
> > The way Vijay describes it, it's resetting the Chassis (ie, removing
> > power from the board itself). The redfish System resource is meant to
> > model the host, and shouldn't be resetting the BMC. Maybe I
> > misunderstood, and this is actually just a host reset?
>
> How do you determine this about Redfish's ComputerSystem? It seems
> really ambiguous. The only words I can find are this:
>
> | The ComputerSystem schema represents a computer or system instance
> | and the software-visible resources, or items within the data plane, such as
> | memory, CPU, and other devices that it can access. Details of those resources
> | or subsystems are also linked through this resource.
I'm not sure where I got that interpretation; Maybe by looking at a
lot of Redfish systems? Maybe from having access to DMTF discussions?
I'm not really sure. There's a lot of intent like this that doesn't
get captured in the spec, or is captured in discussions.
In this case, I think the key in the above is "software visible
resources" and "items within the dataplane", of which the power rails
generally are not within the dataplane. In practice, it tends to
expose a place where you need separation of privileges. A cloud user
with access to a System node might have permission to power
cycle/reset their System resource, but shouldn't have access to AC
cycle the whole platform/chassis/bmc, hence, the resources need
separated.
There's also the "PoweredBy" links that kinda hint (in a really round
about way) about how the power relationships are supposed to be
organized.
>
> You understood correctly though. This is effectively the same as if you
> had a PDU and toggled power on the whole device. Or pulled it from an OCP
> rack and plugged it back in.
>
> > > > > I think we need to do some enhancement to x86-power-control though also
> > > > > to only create this 'chassis_system0' object if configured. I believe
> > > > > the current code change you did does it always, even if the
> > > > > systemd-target is empty.
> > > >
> > > > I keep getting the feeling that xyz/openbmc_project/chassis_system0 is
> > > > just overloading what /xyz/openbmc_project/chassis0 is intended to do,
> > > > x86-power-control just had that already defined, so we went another
> > > > direction. I wonder if we just need to make the "Can I do a real AC
> > > > reset" configurable, and have it change the behavior of
> > > > /xyz/openbmc_project/chassis0 in that case.
> > >
> > > No, these are not overloading each other. They are vastly different.
> > >
> > > host0 + chassis0 make up the 'BIOS/OS control' and '12V power on rails'
> > > portions of host power control respectively.
> >
> > Right, I think what I was saying is that we need a mode where chassis0
> > is freed from host control, and that would simplify the problem a bit,
> > as the chassis0 api would just do the "right" thing for the platform.
> > If the platform is capable of an AC reset, do that, if it's not, do a
> > host reset as x86-power-control currently does.
>
> 'chassis0', in dbus, is the DC power control that goes along with booting
> the host though. It is not ever related to AC reset.
Gotcha. On most of my platforms, there's no separation between 12V
rail and host power state. One cannot exist (for more than a couple
seconds) without the other, so there's no need to independently
control them.
>
> >
> > > chassis_system0 controls the
> > > '12v + 5V standby rails' part of the system. In my opinion, it should
> > > only be present when a system actually allows manipulation of the
> > > standby power, but that isn't how it is currently implemented.
> >
> > Sure, that seems like a fine way to model it, but then we need to come
> > up with an API to "steer" the Redfish API to the right resource so we
> > don't break backward compatibility for the things that work today.
> > That seems harder, and more error prone, but could certainly be
> > defined. Whether that shows up as chassis0, or we just redirect to
> > host0 if chassis0 doesn't exist seems fine to me.
> >
> > If I can clarify what you're proposing.
> >
> > host0 controls the host.
> > chassis0 also controls the host.
> > chassis_system0 controls the chassis power unit.
>
> The only clarification I'd say here is that 'chassis_system0' controls
> the Host + BMC.
If it's really host+bmc, and not a complete reset of the board then
redfish doesn't really have a combined resource that can be used here.
BMC (which maps to the Manager resource) and Host (which maps to the
System resource) are treated as separate things. If you want to reset
both, I suspect you need to issue 2 redfish actions.
>
> I'm not understanding what you mean by "come up with an API to steer the
> Redfish..." I think everything is specified here at a dbus level. The
> issue is figuring out the appropriate Redfish model of
> Chassis/ComputerSystem objects (along with the included Resource.Reset
> types). To a casual reader, who hasn't been involved much in Redfish
> implementation, the current mapping of these ResetTypes seems fairly
> arbitrary.
Some might be arbitrary, but most are explicit and chosen on purpose,
especially in the case of the System schema. The Chassis schema is a
little more lax, as it's more of a backward compatibility thing today.
I think you (Vijay) are the first person trying to model it
"properly".
What I mean is that the current Redfish definition of Chassis points
the PowerCycle action to chassis0. That PowerCycle action now needs
to point at multiple things, chassis0 if we don't support AC reset, or
chassis_system0 if we do. That is the "steering" I was referring to.
>
> With CIM there use to be these Profile documents that showed "the right
> way" to fit all these pieces together. Does that not exist with
> Redfish?
>:-| Unfortunately, no, and this gives me no end of heartache. DMTF has some slightly better resources and discussions like this behind member logins.
> How does any external application consume Redfish in a
> consistent way?
Very carefully, and ideally with a Redfish profile that defines what
resources your application requires, and tests that verify that your
profile is fully supported, which is a whole other level of
indirection on top of the Redfish spec.
>
> --
> Patrick Williams
More information about the openbmc
mailing list