Browse code

worlddump: Use SIGUSR2 instead of SIGUSR1

The function guru_meditation_report() currently uses the User-defined
signal SIGUSR1 to kill a Nova Compute process so that a Guru Meditation
Report is generated.

Testing locally, in a DevStack instance, manually attempting to kill a
Nova compute process [kill -s USR1 `pgrep nova-compute`] does not result
in process being terminated, and no error report generated.

It turns out[1] that SIGUSR1 is used by Apache 'mod_wsgi'.

Using the signal SIGUSR2 resolves this issue (i.e. 'nova-compute'
process is terminated, and the Guru Meditation Report is generated).

So, use USR2, instead of USR1.

Corresponding oslo.reports related commit[2].

[1] https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIRestrictSignal
[2] 45b1c02d113051d147e54ef921ce8e94135542d8 -- guru_meditation_report:
Use SIGUSR2 instead of SIGUSR1
[3] Original DevStack commit that brought in this change --
2ebe993b25462919e8aeeb896c9f91b6be7aa573

Change-Id: I8a7eaf71b83edca3c80074d6bf2d471e3db6142b

Kashyap Chamarthy authored on 2015/09/14 20:17:56
Showing 1 changed files
... ...
@@ -131,7 +131,7 @@ def guru_meditation_report():
131 131
         print "Skipping as nova-compute does not appear to be running"
132 132
         return
133 133
 
134
-    _dump_cmd("kill -s USR1 `pgrep nova-compute`")
134
+    _dump_cmd("kill -s USR2 `pgrep nova-compute`")
135 135
     print "guru meditation report in nova-compute log"
136 136
 
137 137