Supporting removing interfaces from settings daemon

Gaurav Gandhi gauravgandhi at google.com
Sat Feb 19 10:55:46 AEDT 2022


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.
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.
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 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.

Please share your thoughts on this. I have created this review
<https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/51394> for reference
-
Thanks,
Gaurav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220218/f7d77266/attachment-0001.htm>


More information about the openbmc mailing list