Skip to contentSkip to conversation

obmc-op-control-power_git.bb refactoring

DISCUSSION Andrew Geissler 3 participants 4 messages Nov 10, 2022 – Nov 15, 2022

lore
Share & tools
lore
#0 lore raw

Greetings,

Some recent phosphor-state-manager (PSM) feedback indicated quite a bit of confusion with the services involved in powering on and off the chassis. And I'll have to admit, after getting to explain it in discord, it is a bit confusing.

The PSM repository defines the needed systemd targets for PSM to function and the generic services that could be applicable to any system. System specific services are hosted in machine-specific layers and loaded into the appropriate systemd targets as needed.

There are however a series of generic services for powering on/off the chassis that are hosted outside[1] of PSM.

What makes these services especially confusing is that they are under a recipe indicating they are only for openpower machines (op) but in reality they mostly just operate against a generic d-bus object, /org/openbmc/control/power%i.

There are two options for supporting /org/openbmc/control/power%i, either utilizing the old skeleton repo[2] or the new phosphor-power implementation. We definitely want to continue to push people away from our skeleton repo (I'm pretty sure that this op-pwrctl part of skeleton is the last one being used) but I'm not looking to tackle that here.

What I would like to do is get the generic services that are not tied to any specific chassis poweron implementation out of this[3] recipe and into PSM. I'd also like to rename the service files and rename the recipe to remove the "op" references.

Here's what I'm thinking:

Move these services to PSM and rename them as follows:
- [email protected] -> [email protected]
- [email protected] -> [email protected]
- [email protected] -> [email protected]
- [email protected] -> [email protected]

Leave in current location but rename (these rely on code from the skeleton repo):
- [email protected] -> [email protected]
- [email protected] -> [email protected]
- obmc-op-control-power_git.bb -> phosphor-skeleton-control-power_git.bb

I'd like the "skeleton" in the recipe name to hopefully keep people away from it and remind ourselves to get rid of it at some point.

Thoughts or comments?
Andrew

[1]: https://github.com/openbmc/openbmc/tree/master/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power
[2]: https://github.com/openbmc/skeleton/tree/master/op-pwrctl
[3]: https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power_git.bb

#1 lore raw
Quoted 6 lines · Andrew Geissler

Here's what I'm thinking:

Move these services to PSM and rename them as follows:
- [email protected] -> [email protected]
- [email protected] -> [email protected]

This isn't terribly constructive but I feel like given s/op-/phosphor-/ results in names like 'phosphor-power*' it's going to be confusing with respect to the existing phosphor-power subproject.

Not sure how to fix it though.

Andrew

#2 lore raw
Quoted 8 lines · Andrew Jeffery
Quoted 3 lines · Andrew Geissler

Here's what I'm thinking:

Quoted 7 lines
Quoted 3 lines

Move these services to PSM and rename them as follows:
- [email protected] -> [email protected]
- [email protected] -> [email protected]

This isn't terribly constructive but I feel like given s/op-/phosphor-/ results in names like 'phosphor-power*' it's going to be confusing with respect to the existing phosphor-power subproject.

Yeah, good point. We have another naming convention on some service files, “obmc”, so I’ve put that up instead of “phosphor” for the service files in question.

Here’s all the reviews for anyone interested:
https://gerrit.openbmc.org/q/topic:op-power-control-ref

Need to merge the phosphor-state-manager changes first and then I can officially put the openbmc/openbmc changes up for review.

Quoted 4 lines

Not sure how to fix it though.

Andrew

#3 lore raw
Quoted 21 lines · Andrew Geissler
Quoted 9 lines · Andrew Jeffery
Quoted 3 lines · Andrew Geissler

Here's what I'm thinking:

Quoted 7 lines
Quoted 3 lines

Move these services to PSM and rename them as follows:
- [email protected] -> [email protected]
- [email protected] -> [email protected]

This isn't terribly constructive but I feel like given s/op-/phosphor-/ results in names like 'phosphor-power*' it's going to be confusing with respect to the existing phosphor-power subproject.

Yeah, good point. We have another naming convention on some service files, “obmc”, so I’ve put that up instead of “phosphor” for the service files in question.

Quoted 10 lines

Here’s all the reviews for anyone interested:
https://gerrit.openbmc.org/q/topic:op-power-control-ref

Need to merge the phosphor-state-manager changes first and then I can officially put the openbmc/openbmc changes up for review.

Quoted 4 lines

Not sure how to fix it though.

Andrew

There are several situations for now:

* There are a set of obmc-host-[start|stop|...] and obmc-chassis-[poweron|poweroff|...] targets
* Now we will have phosphor-power-xxx services as proposed by this change
* For intel-x86 systems, it removes all the host/chassis related targets in meta-intel-openbmc/meta-common/recipes-core/systemd/obmc-targets.bbappend
* I am not sure how amd-x86 and arm systems handle the targets.

The targets and services are a bit confusing, especially for different systems.

Hopefully we could get a better naming convention so that we do know which are generic and which are platform specific?