[systemd-devel] Missing PropertiesChanged signal for service start

Lennart Poettering lennart at poettering.net
Tue Feb 12 10:14:10 UTC 2019


On Mo, 11.02.19 19:50, systemd Mailing List (systemd-devel at lists.freedesktop.org) wrote:

> Hi,
>
> I have a service file as follows:
>
> [Unit]
> Description= "Daemon description"
> After=a.service
> <https://opengrok-evo.juniper.net/source/s?path=mgd.service&project=EVO_TOT>
> b.service <https://opengrok-evo.juniper.net/source/s?path=mgd-api.service&project=EVO_TOT>
> c.service <https://opengrok-evo.juniper.net/source/s?path=jsd.service&project=EVO_TOT>
> OnFailure=failure_handler@%p.service
> <https://opengrok-evo.juniper.net/source/s?path=p.service&project=EVO_TOT>
>
> [Service]
> WorkingDirectory=/usr/sbin
> <https://opengrok-evo.juniper.net/source/s?path=/usr/sbin&project=EVO_TOT>
> ExecStartPre=/bin/sleep
> <https://opengrok-evo.juniper.net/source/s?path=/bin/sleep&project=EVO_TOT>
> 30
> ExecStart=<path-to-binary>
>
>
> When this service starts I expected a signal indicating state=active.
> When I reboot the system multiple times, the signal indicating
> "active" is missing some times.
>
> I got the signal ActiveState=activating, SubState=start-pre at all
> times. But signal indicating ActiveState="active" and
> SubState="running" was missing for some reboots.
>
> The service is running and shows active state all the time. What is
> reason for missing signal? I am also checking if the sleep in the
> ExecStartPre is required for this
>
> service. I am wondering if that has something to do with the missing signal.

Have you called Subscribe() on the manager object? Unless there's at
least one client doing that (which hasn't dsiconnected yet) these
messages are not necessarily generated.

Also, which systemd version is this? There have been some bugfixes in
this area in the past, hence make sure to run a current version of systemd.

Lennart

--
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list