Supporting removing interfaces from settings daemon
Patrick Williams
patrick at stwcx.xyz
Wed Feb 23 05:16:50 AEDT 2022
Hi Gaurav,
On Fri, Feb 18, 2022 at 03:55:46PM -0800, Gaurav Gandhi wrote:
> Hi All,
>
> Currently DcmiHandler
> <https://github.com/openbmc/phosphor-host-ipmid/blob/05d17c036facc0e9125959abe3c816aa631333e1/dcmihandler.cpp#L25>
> in
> phoshor-host-ipmid only supports the power_cap interface exported by
> Settings <https://github.com/openbmc/phosphor-settingsd> daemon. To make it
> generic we can use objectmapper here
> <https://github.com/openbmc/phosphor-host-ipmid/blob/05d17c036facc0e9125959abe3c816aa631333e1/dcmihandler.cpp#L116>
> to get all objects implementing power_cap interface.
> But it poses a problem: which object to call when setting/getting the power
> cap if multiple services are exporting objects implementing the power_cap
> interface.
Why does it matter if multiple services are exporting the object? It sounds
like your concern is if multiple objects exist anywhere?
> Also I think dcmi commands are supposed to set the power of the system and
> it's not safe to set the system power using multiple services.
Why or why not?
> To avoid this we can make sure only 1 service exports this power_cap path
> <https://github.com/openbmc/phosphor-host-ipmid/blob/05d17c036facc0e9125959abe3c816aa631333e1/dcmihandler.cpp#L25>
> used by dcmi handler. But the settings daemon
> <https://github.com/openbmc/phosphor-settingsd> always exports the power
> cap interface by default. Currently there is provision to override default
> settings using .override files. But I am not aware about any way to remove
> a certain interface from settings daemon.
I don't think expecting just a single instance of the object is workable because
it completely omits handling of multi-host designs (like Yosemite v2). There
should be a different power_cap object per host instance and the DCMI handler
should know, based on which IPMB channel the request came from, which host the
request is for.
> I am planning to add support for .remove.yml files in merge_settings
> <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/settings/phosphor-settings/merge_settings.py>
> script
> to remove interfaces along with overriding them.
I don't see anything wrong with this, but I don't think it really solves
whatever your underlying issue is.
> Please share your thoughts on this. I have created this review
> <https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/51394> for reference
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220222/4221201d/attachment.sig>
More information about the openbmc
mailing list