All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Geissler <geissonator@gmail.com>
To: Joel Stanley <joel@jms.id.au>
Cc: jdking@us.ibm.com, OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: BMC and Host State Management Refactor
Date: Mon, 21 Nov 2016 20:28:10 -0600	[thread overview]
Message-ID: <CALLMt=pUaq39-YtUQgOcwPOzzhFM8pOB2LgML02uifpKCT3_5Q@mail.gmail.com> (raw)
In-Reply-To: <CACPK8XebH8SnRGkxqSHS=QN1PYyWL2vt-NBw-sNA6d8qL6ZCEw@mail.gmail.com>

On Sun, Nov 20, 2016 at 11:55 PM, Joel Stanley <joel@jms.id.au> wrote:
> Hi Andrew and Josh,
>
> On Sat, Nov 19, 2016 at 7:01 AM, Andrew Geissler <geissonator@gmail.com> wrote:
>> Josh and I are working two stories this sprint that deal with
>> refactoring the bmc and host state management code out of skeleton
>> (#772/#783).  Here’s the proposal on this work.
>
> Thanks for sending out your plan, this is great. I have a few comments
> that came up as I was reading.
>
>> The overall design for both state management objects is that they will
>> provide a set of properties on which to operate.
>> - DesiredState
>> - CurrentState
>>
>> CurrentState will be a read only property.
>
> You've chosen to make the desired and current states be separate,
> which works. Another option would be to have them be the same list of
> states, so you know that when current==desired you're not waiting on
> anything to happen. What do you think?
>

Hmmm, I'm thinking from a DBUS/REST api perspective here.  2 seems
more intuitive, but also I don't think I understand your proposal
fully :)  What would this look like from an implementation perspective
and DBUS/REST interfaces?

>>
>> The host control will have these additional properties:
>> - DesiredPowerState
>> - CurrentPowerState
>>
>> Valid states to request for OpenBMC (DesiredState)
>> - READY, REBOOT
>> Valid states to be in for OpenBMC (CurrentState)
>> - NOT_READY, READY (note this proposal removes BASE_APPS and BMC_STARTING).
>
> Does this need to consider states where the device is updating? That
> is, it is not attempting to be ready to control the host, but it is
> turned on and able to accept new firmware?
>

I think READY implies available for code update?  But good point on
code updates, when a code update is being performed, a FW_UPDATE state
seems reasonable.

>>
>> READY implies all services started and running successfully (i.e. we
>> reached obmc-standby.target)
>>
>>
>> Valid states to request for Host (DesiredState)
>> - OFF, ON, REBOOT
>
> This might need to distinguish between soft-off/soft-reboot and
> printer-on-fire OFF requests.
>

Yeah, the focus of this story was to keep similar function as what's
in place now, but refactor into c++ and the new sdbusplus interfaces.
We do probably need more work done with things like you say here.
We've tended to call the printer-on-fire off's EMERGENCY_ type event
requests.  At a minimum, I'll be sure these are tracked in future
stories.

>> Validate states to be in for Host (CurrentState)
>> - OFF, BOOTING, BOOTED
>
> STANDBY, BOOTING, RUNNING?
>
> The bikeshed should be blue.
>

Agree

>>
>> BOOTED implies petitboot has reached it's "ready" state.
>>
>>
>> Valid power states to request for DesiredPowerState
>> - OFF, ON
>> Validate states to be in for CurrentPowerState
>> - OFF, TRANSITION, ON
>
> Does TRANSITION need to distinguish between coming up and going down?
>

I'd prefer to keep simple and let the user determine this by looking
at the DesiredPowerState if it's needed.

>>
>> Patrick and I had some discussion on providing more details on the
>> host booted state (petitboot vs. os booted) but that can be an
>> extension in the future if needed.
>
> I think baking this in from the start is a worthy goal. This then
> feeds into the user-facing APIs, weather that is an IPMI sensor or a
> REST endpoint, that can be queried to ask "what is that damn computer
> up to". If we can make it informative enough that no one ever feels
> the need to watch the console output when the machine is booting then
> we have done a good job.
>

Agree but please see above comment about the scope of this story.  I'm
concerned this opens up a can of worms on extra stuff we'll need from
hostboot and petitboot.  I'll def make sure to write this down for
future stories and there wont be anything in this base design that
will limit that later.

> Cheers,
>
> Joel

Thanks for the feedback Joel!
Andrew

  reply	other threads:[~2016-11-22  2:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 20:31 BMC and Host State Management Refactor Andrew Geissler
2016-11-21  5:55 ` Joel Stanley
2016-11-22  2:28   ` Andrew Geissler [this message]
2016-11-22  3:40     ` Andrew Jeffery
2016-11-22 17:23       ` Andrew Geissler
2016-11-23  1:07         ` Andrew Jeffery
2016-11-28  2:30           ` Andrew Geissler
2017-01-03 22:24             ` Andrew Geissler
2017-01-04  0:07               ` Stewart Smith
2017-01-04 16:28               ` Patrick Williams
2017-01-04 22:44                 ` Andrew Geissler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALLMt=pUaq39-YtUQgOcwPOzzhFM8pOB2LgML02uifpKCT3_5Q@mail.gmail.com' \
    --to=geissonator@gmail.com \
    --cc=jdking@us.ibm.com \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.