)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c280bb63c932ab7104cf6f1d28e8fa1e08434a55","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add signal handler for ProcessLauncher with no_fork"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ProcessLauncher with no_fork\u003dFalse or ServiceLauncher use the"},{"line_number":10,"context_line":"cotyledon library which implement all the signal hanlder for"},{"line_number":11,"context_line":"each worker process. But for ProcessLauncher with no_fork\u003dTrue"},{"line_number":12,"context_line":"case (service run on main process), threading backend does not have"},{"line_number":13,"context_line":"the signal hanlder. Adding the required signal handlers for no_fork"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ce448cc7_a6f94db2","line":10,"range":{"start_line":10,"start_character":49,"end_line":10,"end_character":56},"updated":"2026-01-21 10:51:55.000000000","message":"nit:handler (here and below)","commit_id":"c6e685c2d82707aad09b30a01d0e383826d2ac72"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e5a0fe54d8aeec9fbdfeb94036784eb9d94c55bc","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add signal handler for ProcessLauncher with no_fork"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ProcessLauncher with no_fork\u003dFalse or ServiceLauncher use the"},{"line_number":10,"context_line":"cotyledon library which implement all the signal hanlder for"},{"line_number":11,"context_line":"each worker process. But for ProcessLauncher with no_fork\u003dTrue"},{"line_number":12,"context_line":"case (service run on main process), threading backend does not have"},{"line_number":13,"context_line":"the signal hanlder. Adding the required signal handlers for no_fork"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"720a6ca2_7805c02d","line":10,"range":{"start_line":10,"start_character":49,"end_line":10,"end_character":56},"in_reply_to":"ce448cc7_a6f94db2","updated":"2026-01-22 03:13:08.000000000","message":"Done","commit_id":"c6e685c2d82707aad09b30a01d0e383826d2ac72"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"12b7d7a805d303767523ee6574bcc20882a28191","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a84a134b_cc17d202","updated":"2026-01-21 05:31:10.000000000","message":"I have tested it with nova graceful shutdown PoC https://review.opendev.org/c/openstack/nova/+/967261","commit_id":"c6e685c2d82707aad09b30a01d0e383826d2ac72"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fee0a7e8906eaf881383ecf5ad7c9a4a53aea44c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"14843abf_a4910bc2","updated":"2026-01-30 15:59:56.000000000","message":"I tested this in devstack. Without this patch nova-compute stop in threading mode cause an immediate exit of the process. With this patch applied nova-compute gets a proper shutdown triggered by service.stop() that allows cleanup logic to run before the process exists.","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"494fff31655d30d7ff8a468ace3b428c129e02ac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"24524566_e0e5950e","updated":"2026-01-27 08:31:20.000000000","message":"LGTM","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e387e969f4763174e176bb95b12f20334e230c18","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"95b81cbb_65cd42a3","updated":"2026-01-26 13:39:24.000000000","message":"Looks good to me","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"4bc2163eca761fbd2e1e71a0d0e4f8b517f558f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"4dc6053d_ac34e792","updated":"2026-01-27 19:46:32.000000000","message":"NOTE for testing. I tested this in Nova graceful shutdown PoC and it worked fine:\n\n- https://review.opendev.org/c/openstack/nova/+/967261\n\nHighlighted scenarios in that testing:\n\n- compute service running on main process (no_fork\u003dTrue), SIGTERM signal called _graceful_shutdown() handler which called stop() on nova compute service.\n\n- Case 1: Compute service finished the things in service.stop() before graceful_shutdown_timeout and oslo.service _graceful_shutdown() handler finish normally.\n\n- Case 2: Compute service took more time to finish than graceful_shutdown_timeout, in this case, SIGALRM is raised and process is terminated by SIGALRM.","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7e05ad2ac79102a057550f77aa20c1ad08d49bf4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"a3ca7dc7_8fe1ccfe","updated":"2026-01-29 10:52:28.000000000","message":"Needs a rebase. Feel free to add +W when done","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e0195d78956f5a3aca09370588fa0dbe9ace69c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9b92f95a_753e1434","in_reply_to":"14843abf_a4910bc2","updated":"2026-02-02 00:47:48.000000000","message":"thanks for testing and comment","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e0195d78956f5a3aca09370588fa0dbe9ace69c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"64cefb53_93a362a6","in_reply_to":"a3ca7dc7_8fe1ccfe","updated":"2026-02-02 00:47:48.000000000","message":"done","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":31245,"name":"Daniel Bengtsson","email":"dbengt@redhat.com","username":"damani42"},"change_message_id":"0e20ad4fb006afd6d77e02edee66d23cd33452b1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"043b21d2_1381c1ad","updated":"2026-02-03 14:10:15.000000000","message":"Looks good to merge.","commit_id":"828aed5421572f0a669e683ff254432e9a276e29"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"e20bb7f46ff768780c81d23edd7e2c71f8aad25d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"b74244a8_09f4378b","updated":"2026-02-03 01:23:33.000000000","message":"We might want a release note for this but the change looks good to me","commit_id":"828aed5421572f0a669e683ff254432e9a276e29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a7db3a955f9479292180032c725eca7387ab8274","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"f947d302_64377bf2","in_reply_to":"b74244a8_09f4378b","updated":"2026-02-03 03:37:45.000000000","message":"sure, done in https://review.opendev.org/c/openstack/oslo.service/+/975486","commit_id":"828aed5421572f0a669e683ff254432e9a276e29"}],"oslo_service/backend/_threading/service.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c280bb63c932ab7104cf6f1d28e8fa1e08434a55","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            signal.alarm(self.conf.graceful_shutdown_timeout)"},{"line_number":306,"context_line":"        self.service.stop()"},{"line_number":307,"context_line":"        LOG.info(\u0027Graceful shutdown finish\u0027)"},{"line_number":308,"context_line":"        os._exit(0)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _reload_service(self, *args):"},{"line_number":311,"context_line":"        self.signal_handler.clear()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a68c06b_b72dbd07","line":308,"updated":"2026-01-21 10:51:55.000000000","message":"OK make sense. But a bit scary to use sigalarm. I guess we need to test it carefully.","commit_id":"c6e685c2d82707aad09b30a01d0e383826d2ac72"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e5a0fe54d8aeec9fbdfeb94036784eb9d94c55bc","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            signal.alarm(self.conf.graceful_shutdown_timeout)"},{"line_number":306,"context_line":"        self.service.stop()"},{"line_number":307,"context_line":"        LOG.info(\u0027Graceful shutdown finish\u0027)"},{"line_number":308,"context_line":"        os._exit(0)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _reload_service(self, *args):"},{"line_number":311,"context_line":"        self.signal_handler.clear()"}],"source_content_type":"text/x-python","patch_set":1,"id":"c7da670e_0c35847a","line":308,"in_reply_to":"3a68c06b_b72dbd07","updated":"2026-01-22 03:13:08.000000000","message":"I added the tests for both cases, 1. graceful shutdown terminate normally before sigalarm timeout 2. graceful shutdown does not hangup and terminated by sigalarm on timeout.","commit_id":"c6e685c2d82707aad09b30a01d0e383826d2ac72"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c280bb63c932ab7104cf6f1d28e8fa1e08434a55","unresolved":true,"context_lines":[{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _reload_service(self, *args):"},{"line_number":311,"context_line":"        self.signal_handler.clear()"},{"line_number":312,"context_line":"        raise SignalExit(signal.SIGHUP)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _fast_exit(self, *args):"},{"line_number":315,"context_line":"        LOG.info(\u0027Caught SIGINT signal, instantaneous exiting\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"6cf97be6_d7a683a9","line":312,"updated":"2026-01-21 10:51:55.000000000","message":"Hm, will this reload the service in no-fork case or we the service will just exit?","commit_id":"c6e685c2d82707aad09b30a01d0e383826d2ac72"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e5a0fe54d8aeec9fbdfeb94036784eb9d94c55bc","unresolved":false,"context_lines":[{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _reload_service(self, *args):"},{"line_number":311,"context_line":"        self.signal_handler.clear()"},{"line_number":312,"context_line":"        raise SignalExit(signal.SIGHUP)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _fast_exit(self, *args):"},{"line_number":315,"context_line":"        LOG.info(\u0027Caught SIGINT signal, instantaneous exiting\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"783aa787_f4599893","line":312,"in_reply_to":"6cf97be6_d7a683a9","updated":"2026-01-22 03:13:08.000000000","message":"no, it does not restart the service instead just exit. To do that we need to implement the restart() method for no_fork case. I will add a todo here.","commit_id":"c6e685c2d82707aad09b30a01d0e383826d2ac72"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7126e85b46113e51c1395bf43416512ecd348eed","unresolved":true,"context_lines":[{"line_number":32,"context_line":"from oslo_service import _options"},{"line_number":33,"context_line":"from oslo_service.backend._common.constants import _LAUNCHER_RESTART_METHODS"},{"line_number":34,"context_line":"from oslo_service.backend._common.service \\"},{"line_number":35,"context_line":"    import check_service_base as _check_service_base"},{"line_number":36,"context_line":"from oslo_service.backend._common.service import get_signal_mappings"},{"line_number":37,"context_line":"from oslo_service.backend._common.service import SignalExit"},{"line_number":38,"context_line":"from oslo_service.backend._common.service import Singleton"},{"line_number":39,"context_line":"from oslo_service.backend._threading import threadgroup"},{"line_number":40,"context_line":"from oslo_service.backend.base import ServiceBase"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"136f3c3a_90882f25","line":40,"range":{"start_line":35,"start_character":52,"end_line":40,"end_character":49},"updated":"2026-01-29 10:52:09.000000000","message":"As a follow-up, shouldn\u0027t we be importing modules rather than objects?","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"e20bb7f46ff768780c81d23edd7e2c71f8aad25d","unresolved":true,"context_lines":[{"line_number":32,"context_line":"from oslo_service import _options"},{"line_number":33,"context_line":"from oslo_service.backend._common.constants import _LAUNCHER_RESTART_METHODS"},{"line_number":34,"context_line":"from oslo_service.backend._common.service \\"},{"line_number":35,"context_line":"    import check_service_base as _check_service_base"},{"line_number":36,"context_line":"from oslo_service.backend._common.service import get_signal_mappings"},{"line_number":37,"context_line":"from oslo_service.backend._common.service import SignalExit"},{"line_number":38,"context_line":"from oslo_service.backend._common.service import Singleton"},{"line_number":39,"context_line":"from oslo_service.backend._threading import threadgroup"},{"line_number":40,"context_line":"from oslo_service.backend.base import ServiceBase"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f548d5e_5fb9669f","line":40,"range":{"start_line":35,"start_character":52,"end_line":40,"end_character":49},"in_reply_to":"136f3c3a_90882f25","updated":"2026-02-03 01:23:33.000000000","message":"+1 . especially importing service module multiple times looks redundant","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a7db3a955f9479292180032c725eca7387ab8274","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from oslo_service import _options"},{"line_number":33,"context_line":"from oslo_service.backend._common.constants import _LAUNCHER_RESTART_METHODS"},{"line_number":34,"context_line":"from oslo_service.backend._common.service \\"},{"line_number":35,"context_line":"    import check_service_base as _check_service_base"},{"line_number":36,"context_line":"from oslo_service.backend._common.service import get_signal_mappings"},{"line_number":37,"context_line":"from oslo_service.backend._common.service import SignalExit"},{"line_number":38,"context_line":"from oslo_service.backend._common.service import Singleton"},{"line_number":39,"context_line":"from oslo_service.backend._threading import threadgroup"},{"line_number":40,"context_line":"from oslo_service.backend.base import ServiceBase"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"d9e57ea6_d051705d","line":40,"range":{"start_line":35,"start_character":52,"end_line":40,"end_character":49},"in_reply_to":"7f548d5e_5fb9669f","updated":"2026-02-03 03:37:45.000000000","message":"done https://review.opendev.org/c/openstack/oslo.service/+/975486","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e387e969f4763174e176bb95b12f20334e230c18","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        # Register alarm signal with conf.graceful_shutdown_timeout."},{"line_number":386,"context_line":"        # If graceful shutdown is not finished within the"},{"line_number":387,"context_line":"        # timeout, then alarm signal will exit the process."},{"line_number":388,"context_line":"        if (self.conf.graceful_shutdown_timeout and"},{"line_number":389,"context_line":"                self.signal_handler.is_signal_supported(\u0027SIGALRM\u0027)):"},{"line_number":390,"context_line":"            signal.alarm(self.conf.graceful_shutdown_timeout)"},{"line_number":391,"context_line":"        self.service.stop()"}],"source_content_type":"text/x-python","patch_set":5,"id":"26f7bdef_d6fa29bb","line":388,"updated":"2026-01-26 13:39:24.000000000","message":"correct. 0 means wait potentially forever based on our doc","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7126e85b46113e51c1395bf43416512ecd348eed","unresolved":true,"context_lines":[{"line_number":393,"context_line":"        os._exit(0)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    def _reload_service(self, *args):"},{"line_number":396,"context_line":"        # TODO(gmaan): This handler is suppose to reload the service but we"},{"line_number":397,"context_line":"        # need to implement the restart() method for no_fork case which can"},{"line_number":398,"context_line":"        # call reset/restart on the service instance."},{"line_number":399,"context_line":"        self.signal_handler.clear()"}],"source_content_type":"text/x-python","patch_set":5,"id":"abe5497f_af3d70bb","line":396,"updated":"2026-01-29 10:52:09.000000000","message":"```suggestion\n        # FIXME(gmaan): This handler is suppose to reload the service but we\n```\n\nI assume we want to do this sooner rather than later?","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"49a542a18c0270890c81e21b15261a3a220adbdc","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        os._exit(0)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    def _reload_service(self, *args):"},{"line_number":396,"context_line":"        # TODO(gmaan): This handler is suppose to reload the service but we"},{"line_number":397,"context_line":"        # need to implement the restart() method for no_fork case which can"},{"line_number":398,"context_line":"        # call reset/restart on the service instance."},{"line_number":399,"context_line":"        self.signal_handler.clear()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ebebe8c1_5505cf27","line":396,"in_reply_to":"abe5497f_af3d70bb","updated":"2026-01-29 16:15:45.000000000","message":"I think later. we do not need for Nova as of now but I am not sure if other services do reload on SIGHUP if they support.","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e387e969f4763174e176bb95b12f20334e230c18","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        # need to implement the restart() method for no_fork case which can"},{"line_number":398,"context_line":"        # call reset/restart on the service instance."},{"line_number":399,"context_line":"        self.signal_handler.clear()"},{"line_number":400,"context_line":"        raise SignalExit(signal.SIGHUP)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def _fast_exit(self, *args):"},{"line_number":403,"context_line":"        LOG.info(\u0027Caught SIGINT signal, instantaneous exiting\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"a36a6438_ce6dd641","line":400,"updated":"2026-01-26 13:39:24.000000000","message":"It is OK for nova as we never really declared support for config reload with SIGHUP","commit_id":"2160aa451f0dc5dc696dae65cca944e5d336cea6"}]}
