ability to specify signal for reload command
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
- James Hunt: Approve
- Dimitri John Ledkov (community): Approve
-
Diff: 17650 lines (+17195/-157)14 files modifieddbus/com.ubuntu.Upstart.Instance.xml (+3/-0)
init/job.c (+48/-0)
init/job.h (+2/-0)
init/job_class.c (+11/-0)
init/job_class.h (+3/-0)
init/man/init.5 (+11/-0)
init/parse_job.c (+92/-0)
init/tests/data/upstart-reload-signal.json (+16580/-0)
init/tests/test_job.c (+142/-0)
init/tests/test_job_class.c (+2/-0)
init/tests/test_parse_job.c (+211/-0)
init/tests/test_state.c (+73/-0)
util/initctl.c (+2/-13)
util/tests/test_initctl.c (+15/-144)
Changed in upstart: | |
status: | New → Confirmed |
Changed in upstart: | |
assignee: | nobody → Dmitrijs Ledkovs (xnox) |
Changed in upstart: | |
status: | Confirmed → In Progress |
Changed in upstart: | |
status: | In Progress → Fix Committed |
Changed in upstart: | |
status: | Fix Committed → Fix Released |
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.