[systemd-devel] [PATCH] Propagate reload from RELOADING=1 notifications

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu Jan 1 10:15:40 PST 2015


On Tue, Dec 30, 2014 at 08:22:27PM +0100, Jouke Witteveen wrote:
> ---
> 
> This fixes #87251

This is actually important information that should be included in the
commit message (i.e. above not below "---"). We usually include the
full url, since we also use distribution bug trackers and having the full
url makes things easier to click. In this case:

https://bugs.freedesktop.org/show_bug.cgi?id=87251

>  static void service_enter_reload_by_notify(Service *s) {
> +        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
> +        int r;
> +
>          assert(s);
>  
>          if (s->timeout_start_usec > 0)
>                  service_arm_timer(s, s->timeout_start_usec);
>  
> +        r = manager_propagate_reload(UNIT(s)->manager, UNIT(s), JOB_REPLACE, false, &error);
> +        if(r < 0)
> +                log_unit_warning(UNIT(s)->id, "%s failed to schedule propagation of reload: %s", UNIT(s)->id, bus_error_message(&error, -r));
> +

Let's say that a.service has PropagateReloadsTo=b.service, and a.service provides
the RELOADING=1 notification during a reload.
What happens if a reload is requested with 'systemctl reload a', and systemd
schedules a reload of a and b. Is it possible for b to be reloaded a second time
as a result of notification of a? This should not happen, have you verified that
this will not happen?

Zbyszek


More information about the systemd-devel mailing list