[phosphor-logging] About the "Stop emitting Entry propChanged before ifacesAdded" change reason

Matt Spinler mspinler at linux.ibm.com
Thu Oct 21 02:13:06 AEDT 2021



On 10/20/2021 3:39 AM, CS20 CHMa0 wrote:
> Hi Matt, I meet an issue in bmcweb while update service handle 
> firmware update error 
> https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/update_service.hpp#L321 
> After I revert the change or try to change the match rule from 
> 'PropertiesChanged' ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
> ZjQcmQRYFpfptBannerEnd
>
> Hi Matt,
>
> I meet an issue in bmcweb while update service handle firmware update 
> error
>
> https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/update_service.hpp#L321 
> <https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/update_service.hpp#L321> 
>
>
> After I  revert the change or try to change the match rule from 
> 'PropertiesChanged' to 'InterfacesAdded',
>
> the error handler work well in update service.
>
>      fwUpdateErrorMatcher = 
> std::make_unique<sdbusplus::bus::match::match>(
>
>          *crow::connections::systemBus,
>
> - "type='signal',member='PropertiesChanged',path_namespace='/xyz/"
>
> -        "openbmc_project/logging/entry',"
>
> - "arg0='xyz.openbmc_project.Logging.Entry'",
>
> + "interface='org.freedesktop.DBus.ObjectManager',type='signal',"
>
> +        "member='InterfacesAdded',"
>
> + "path='/xyz/openbmc_project/logging'",
>
> May I ask the reason why you update the change? 
> https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/46055 
> <https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/46055>
>

Hi,
I guess I saw this as a bug fix.  The code creates the interface on 
D-Bus with the defer-interfaces-added parameter set to true so it 
wouldn't emit interfacesAdded at the point, then sets all the property 
values, and then explicitly emits the IA signal.   Others can chime in, 
but I didn't see it as proper D-Bus behavior to emit propertiesChanged 
before InterfacesAdded, since in fact no property is changing after the 
interface was added.

It seems like every application does their own thing here, so maybe we 
can come up with some official best practices for how to emit signals 
for new interfaces (unless it's there and I missed it).


> Thanks
>
> Brian
>
> ------------------------------------------------------------------------
> The privileged confidential information contained in this email is 
> intended for use only by the addressees as indicated by the original 
> sender of this email. If you are not the addressee indicated in this 
> email or are not responsible for delivery of the email to such a 
> person, please kindly reply to the sender indicating this fact and 
> delete all copies of it from your computer and network server 
> immediately. Your cooperation is highly appreciated. It is advised 
> that any unauthorized use of confidential information of Nuvoton is 
> strictly prohibited; and any information in this email irrelevant to 
> the official business of Nuvoton shall be deemed as neither given nor 
> endorsed by Nuvoton. 



More information about the openbmc mailing list