ability to specify signal for reload command

Bug #893021 reported by James Hunt
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
upstart
Fix Released
Undecided
Dimitri John Ledkov

Bug Description

The reload command currently sends a SIGHUP to the job in question. Some applications break the convention and expect to be sent different signals to make them reload their configuration.

This bug is to implement a "reload signal SIGNAL" stanza (in a similar fashion to "kill signal SIGNAL").

Note that an alternative might be to allow "initctl reload --signal SIGUSR1 myjob" however this appears less justifiable since:

1) It places an extra burden on the administrator to both know and remember the signal to send to the job in question.
2) There is no extra value in providing a command-line option since once it is understood that an app needs a particular signal, this can be encoded in the .conf file.

This bug is related to bug 94873.

Related branches

Haw Loeung (hloeung)
Changed in upstart:
status: New → Confirmed
Changed in upstart:
assignee: nobody → Dmitrijs Ledkovs (xnox)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

dbus api jobs interface does not have method "reload" (maybe it doesn't need it).
jobs configure should have "reload signal SIGNAL" stanza.
reload signal should be exported on the job object dbus.
initctl.c should check it and use that signal on the processes to reload.

Changed in upstart:
status: Confirmed → In Progress
Changed in upstart:
status: In Progress → Fix Committed
Changed in upstart:
status: Fix Committed → Fix Released
Revision history for this message
Michael Schaller (misch-9) wrote :

I'm currently testing Precise to Trusty upgrades and encountered - while troubleshooting bug http://pad.lv/1301962 - this issue:
# initctl reload dbus
initctl: Method "Reload" with signature "" on interface "com.ubuntu.Upstart0_6.Instance" doesn't exist

The issue at hand is that during the upgrade the 'upstart' package will be updated but Precise's Upstart is still running until a reboot. Trusty's 'upstart' package ships a new 'initctl' binary that handles reloads only via the 'Reload' D-Bus method. Precise's Upstart doesn't support the 'Reload' D-Bus method though.

Can Trusty's initctl binary be patched so that it falls back to the previous reload behavior if the Upstart version in use doesn't support the 'Reload' D-Bus method?
Would you like me to open a new bug for this issue?

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 893021] Re: ability to specify signal for reload command

On Mon, Apr 07, 2014 at 02:07:22PM -0000, Michael Schaller wrote:

> Can Trusty's initctl binary be patched so that it falls back to the
> previous reload behavior if the Upstart version in use doesn't support the
> 'Reload' D-Bus method?

Yes, this clearly needs to happen.

> Would you like me to open a new bug for this issue?

Yes, please do and paste the number of the new bug here.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Michael Schaller (misch-9) wrote :

Thank you, Dimitri.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.