)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"31fbfba2_27b2e05d","updated":"2026-10-19 13:33:53.000000000","message":"Couple of questions","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"548a6ce14fc4b5690bacd1222d370c0f2563680b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"911d1563_10b2fe3e","updated":"2026-10-21 09:26:43.000000000","message":"I see one more step to make","commit_id":"601617c550ac1c89cf879c12433b1784b83341d2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"83f7f74a167c82af08d4078a8357718e1ea46816","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"ebe3cb00_f11a1a48","updated":"2026-10-29 10:21:46.000000000","message":"eventually you will hate me, I know, but I have further questions now :)","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"16a17a037af24ff90b5554d86f75dbc522588b07","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"f010e09b_c3c1a33d","updated":"2026-10-28 08:57:03.000000000","message":"recheck","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6d4cfcdb5bd64bd26688bf0b63dbb49b0e9c8f47","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":8,"id":"d7dcb5f4_c443baea","updated":"2026-11-02 12:58:34.000000000","message":"I still see oslo.service selecting forking with this patch in a local devstack:\n```\nNov 02 12:44:49 aio nova-scheduler[221733]: DEBUG oslo_service.backend._threading.service [None req-dd19fc62-f120-4ec1-935a-f717a2778845 None None] Selected the multiprocessing context: \u003cmultiprocessing.context.ForkContext object at 0x76870c999be0\u003e and updated it in Cotyledon ServiceManager: \u003cmultiprocessing.context.ForkContext object at 0x76870c999be0\u003e {{(pid\u003d221733) launch_service /opt/stack/oslo.service/oslo_service/backend/_threading/service.py:434}}\n```\n\nprobably something changed in oslo.service recently meaning oslo does not even try to use spawn any more...\n\nCould you put a patch top of this that shows that if we ask oslo.service to use spawn then this change allows us to actually use spawn successfully?\n\nhttps://github.com/openstack/oslo.service/commit/f402f4eb8ec9e07ccc166c0607e80abec259fe9a","commit_id":"ca9e7a8a8cb100d74bb934e476a468bf9cb595c9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c168622cf6d7ab4f48f1cb8f0d3425471d02675d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"cba05d02_69adca9a","updated":"2026-11-10 12:02:55.000000000","message":"recheck whitebox did not run any tests strangely\n\nlets somehow ask oslo service to try spawn to test that what we are doing here is actually working with spawn.","commit_id":"a040119adf040c08d6334fa85477239244cf5bbe"}],"nova/conf/utils.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6e47b2a1c1bcec063dfe1a61ec16cc6d22bf74c4","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class _IgnoredType:"},{"line_number":53,"context_line":"    \"\"\"Picklable option type (unlike lambdas) for spawn compatibility (bug 2151537).\"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __call__(self, value):"},{"line_number":56,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"cf04ad5f_d25b5927","line":53,"updated":"2026-09-10 15:15:00.000000000","message":"pep8: E501 line too long (87 \u003e 79 characters)","commit_id":"322ab25f3c9ca106eba012d081332f2036338bd6"}],"nova/manager.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"beabd29382607452e2bfe16e16eba8dbfd90c164","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        self.additional_endpoints \u003d []"},{"line_number":100,"context_line":"        super(Manager, self).__init__()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def __getstate__(self):"},{"line_number":103,"context_line":"        # oslo.service probes service picklability with ForkingPickler.dumps()"},{"line_number":104,"context_line":"        # before choosing \u0027spawn\u0027 over \u0027fork\u0027 for multi-worker processes"},{"line_number":105,"context_line":"        # (bug 2151537). Strip the two unpicklable attributes:"}],"source_content_type":"text/x-python","patch_set":1,"id":"23ef6ca6_c5653f45","line":102,"updated":"2026-08-14 10:47:13.000000000","message":"So I assume pickling is an issue here as we tell python to start something in the newly spawned process and that something has an already intialized Manager object. Here you basically make the Manager object picleable by dropping fields from it and then re-initializing those fields in the child process. Can we re-arrange the code not to send and initialized Manager object to the child but ask the child to create on from scratch? If it is possible that feels a lot cleaner to me than this.","commit_id":"fd561c8fe1063110f5a84fef96fde48b3635db34"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f1b53c2e8444f3ff26a8faa6b20d36f3f7840b63","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        self.additional_endpoints \u003d []"},{"line_number":100,"context_line":"        super(Manager, self).__init__()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def __getstate__(self):"},{"line_number":103,"context_line":"        # oslo.service probes service picklability with ForkingPickler.dumps()"},{"line_number":104,"context_line":"        # before choosing \u0027spawn\u0027 over \u0027fork\u0027 for multi-worker processes"},{"line_number":105,"context_line":"        # (bug 2151537). Strip the two unpicklable attributes:"}],"source_content_type":"text/x-python","patch_set":1,"id":"b90c551f_118fc660","line":102,"in_reply_to":"23ef6ca6_c5653f45","updated":"2026-08-14 11:18:07.000000000","message":"//later\n\nAs far as I see the oslo.service interface contract is that we need to provide an instance of a ServiceBase (or its descendant) class and oslo.service will call start() on it in the child process. But nova does a lot of actual setup in the `__init__` of the service. including initializing the Manager instance as well. Then this whole bunch of initialized stuff is squeezed through the pipe to the child process where oslo calls start() on it. \n\nCan we defer the initialization of most of these stuff before the spawn? That way we will have less to pipe to the child and therefore less to serialize.\n\nThe current code structure basically calls for future trouble. If anything is added to Service init or Manager init in the future those needs to be serializable. That is bad.\n\nLets see if we can move stuff around so that most of the inits happen in the child.\n\nI\u0027m not sure how other service approach this but that would also be interesting to look at","commit_id":"fd561c8fe1063110f5a84fef96fde48b3635db34"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        self.additional_endpoints \u003d []"},{"line_number":100,"context_line":"        super(Manager, self).__init__()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def __getstate__(self):"},{"line_number":103,"context_line":"        # oslo.service probes service picklability with ForkingPickler.dumps()"},{"line_number":104,"context_line":"        # before choosing \u0027spawn\u0027 over \u0027fork\u0027 for multi-worker processes"},{"line_number":105,"context_line":"        # (bug 2151537). Strip the two unpicklable attributes:"}],"source_content_type":"text/x-python","patch_set":1,"id":"c00f3c51_cabae062","line":102,"in_reply_to":"b90c551f_118fc660","updated":"2026-10-19 13:33:53.000000000","message":"Based on the changes in the Service class. Cloud we simply not serialize Service.manager field to avoid all the changes in the Manager class?","commit_id":"fd561c8fe1063110f5a84fef96fde48b3635db34"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"548a6ce14fc4b5690bacd1222d370c0f2563680b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.additional_endpoints \u003d []"},{"line_number":100,"context_line":"        super(Manager, self).__init__()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def __getstate__(self):"},{"line_number":103,"context_line":"        # oslo.service probes service picklability with ForkingPickler.dumps()"},{"line_number":104,"context_line":"        # before choosing \u0027spawn\u0027 over \u0027fork\u0027 for multi-worker processes"},{"line_number":105,"context_line":"        # (bug 2151537). Strip the two unpicklable attributes:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9895d9d3_30e2e94c","line":102,"in_reply_to":"c00f3c51_cabae062","updated":"2026-10-21 09:26:43.000000000","message":"Done","commit_id":"fd561c8fe1063110f5a84fef96fde48b3635db34"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6e47b2a1c1bcec063dfe1a61ec16cc6d22bf74c4","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __getstate__(self):"},{"line_number":139,"context_line":"        # Ship allowlisted identity/config; rebuild runtime state in __setstate__."},{"line_number":140,"context_line":"        # Allowlist ensures unpicklable attrs (driver, RPC, locks) default to"},{"line_number":141,"context_line":"        # \"not shipped\" instead of silently breaking the spawn probe (bug 2151537)."},{"line_number":142,"context_line":"        return {"},{"line_number":143,"context_line":"            attr: self.__dict__[attr]"}],"source_content_type":"text/x-python","patch_set":2,"id":"4959b58f_d5e56ea3","line":140,"updated":"2026-09-10 15:15:00.000000000","message":"pep8: E501 line too long (82 \u003e 79 characters)","commit_id":"322ab25f3c9ca106eba012d081332f2036338bd6"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6e47b2a1c1bcec063dfe1a61ec16cc6d22bf74c4","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        # Ship allowlisted identity/config; rebuild runtime state in __setstate__."},{"line_number":140,"context_line":"        # Allowlist ensures unpicklable attrs (driver, RPC, locks) default to"},{"line_number":141,"context_line":"        # \"not shipped\" instead of silently breaking the spawn probe (bug 2151537)."},{"line_number":142,"context_line":"        return {"},{"line_number":143,"context_line":"            attr: self.__dict__[attr]"},{"line_number":144,"context_line":"            for attr in self._SPAWN_PICKLE_ALLOWLIST"},{"line_number":145,"context_line":"            if attr in self.__dict__"}],"source_content_type":"text/x-python","patch_set":2,"id":"38abfc64_b9be26f7","line":142,"updated":"2026-09-10 15:15:00.000000000","message":"pep8: E501 line too long (83 \u003e 79 characters)","commit_id":"322ab25f3c9ca106eba012d081332f2036338bd6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":108,"context_line":"class Manager(PeriodicTasks, metaclass\u003dManagerMeta):"},{"line_number":109,"context_line":"    __trace_args__ \u003d {\"name\": \"rpc\"}"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    # Attributes shipped during pickling (bug 2151537); see __getstate__ for"},{"line_number":112,"context_line":"    # rationale."},{"line_number":113,"context_line":"    _SPAWN_PICKLE_ALLOWLIST \u003d (\u0027host\u0027, \u0027backdoor_port\u0027, \u0027service_name\u0027)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"04a29eb5_31f9aca0","line":111,"range":{"start_line":111,"start_character":17,"end_line":111,"end_character":24},"updated":"2026-10-19 13:33:53.000000000","message":"serialized?","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"6f1ef2be7a336217929fce93bc72ef3718f502ca","unresolved":false,"context_lines":[{"line_number":108,"context_line":"class Manager(PeriodicTasks, metaclass\u003dManagerMeta):"},{"line_number":109,"context_line":"    __trace_args__ \u003d {\"name\": \"rpc\"}"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    # Attributes shipped during pickling (bug 2151537); see __getstate__ for"},{"line_number":112,"context_line":"    # rationale."},{"line_number":113,"context_line":"    _SPAWN_PICKLE_ALLOWLIST \u003d (\u0027host\u0027, \u0027backdoor_port\u0027, \u0027service_name\u0027)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"0c5c10b6_5eba8371","line":111,"range":{"start_line":111,"start_character":17,"end_line":111,"end_character":24},"in_reply_to":"04a29eb5_31f9aca0","updated":"2026-10-20 12:32:33.000000000","message":"Done","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":121,"context_line":"        self.notifier \u003d rpc.get_notifier(self.service_name, self.host)"},{"line_number":122,"context_line":"        self.additional_endpoints \u003d []"},{"line_number":123,"context_line":"        self._init_task_tracking()"},{"line_number":124,"context_line":"        super(Manager, self).__init__()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _init_task_tracking(self):"},{"line_number":127,"context_line":"        \"\"\"Initialize process-local task-tracking state."}],"source_content_type":"text/x-python","patch_set":3,"id":"7cd9a072_be3dae2d","line":124,"updated":"2026-10-19 13:33:53.000000000","message":"Add a comment here that if any field is added here in the future then the author needs to decide if:\n* a) it is something that is picklable (e.g. a string) and therefore add it here and add it to the SPAWN_PICKLE_ALLOWLIST\nOR\n* b) not picklable (e.g. a lock) and the make sure it is re-initialized in the __setstate__ method or later","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"548a6ce14fc4b5690bacd1222d370c0f2563680b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.notifier \u003d rpc.get_notifier(self.service_name, self.host)"},{"line_number":122,"context_line":"        self.additional_endpoints \u003d []"},{"line_number":123,"context_line":"        self._init_task_tracking()"},{"line_number":124,"context_line":"        super(Manager, self).__init__()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _init_task_tracking(self):"},{"line_number":127,"context_line":"        \"\"\"Initialize process-local task-tracking state."}],"source_content_type":"text/x-python","patch_set":3,"id":"af7ff943_956a71e0","line":124,"in_reply_to":"7cd9a072_be3dae2d","updated":"2026-10-21 09:26:43.000000000","message":"Done","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":137,"context_line":"        self._in_progress_task_cond \u003d threading.Condition()"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __getstate__(self):"},{"line_number":140,"context_line":"        # Ship allowlisted identity/config; rebuild runtime state in"},{"line_number":141,"context_line":"        # __setstate__. Allowlist ensures unpicklable attrs (driver, RPC,"},{"line_number":142,"context_line":"        # locks) default to \"not shipped\" instead of silently breaking the"},{"line_number":143,"context_line":"        # spawn probe (bug 2151537)."}],"source_content_type":"text/x-python","patch_set":3,"id":"1bf57e65_697a265b","line":140,"range":{"start_line":140,"start_character":10,"end_line":140,"end_character":14},"updated":"2026-10-19 13:33:53.000000000","message":"serialize","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"6f1ef2be7a336217929fce93bc72ef3718f502ca","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self._in_progress_task_cond \u003d threading.Condition()"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def __getstate__(self):"},{"line_number":140,"context_line":"        # Ship allowlisted identity/config; rebuild runtime state in"},{"line_number":141,"context_line":"        # __setstate__. Allowlist ensures unpicklable attrs (driver, RPC,"},{"line_number":142,"context_line":"        # locks) default to \"not shipped\" instead of silently breaking the"},{"line_number":143,"context_line":"        # spawn probe (bug 2151537)."}],"source_content_type":"text/x-python","patch_set":3,"id":"79e60814_8cb18e2b","line":140,"range":{"start_line":140,"start_character":10,"end_line":140,"end_character":14},"in_reply_to":"1bf57e65_697a265b","updated":"2026-10-20 12:32:33.000000000","message":"Done","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":139,"context_line":"    def __getstate__(self):"},{"line_number":140,"context_line":"        # Ship allowlisted identity/config; rebuild runtime state in"},{"line_number":141,"context_line":"        # __setstate__. Allowlist ensures unpicklable attrs (driver, RPC,"},{"line_number":142,"context_line":"        # locks) default to \"not shipped\" instead of silently breaking the"},{"line_number":143,"context_line":"        # spawn probe (bug 2151537)."},{"line_number":144,"context_line":"        return {"},{"line_number":145,"context_line":"            attr: self.__dict__[attr]"}],"source_content_type":"text/x-python","patch_set":3,"id":"6cacdbe1_dd7c53ad","line":142,"range":{"start_line":142,"start_character":33,"end_line":142,"end_character":40},"updated":"2026-10-19 13:33:53.000000000","message":"serialized","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"6f1ef2be7a336217929fce93bc72ef3718f502ca","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    def __getstate__(self):"},{"line_number":140,"context_line":"        # Ship allowlisted identity/config; rebuild runtime state in"},{"line_number":141,"context_line":"        # __setstate__. Allowlist ensures unpicklable attrs (driver, RPC,"},{"line_number":142,"context_line":"        # locks) default to \"not shipped\" instead of silently breaking the"},{"line_number":143,"context_line":"        # spawn probe (bug 2151537)."},{"line_number":144,"context_line":"        return {"},{"line_number":145,"context_line":"            attr: self.__dict__[attr]"}],"source_content_type":"text/x-python","patch_set":3,"id":"ed63143c_cc5d9f43","line":142,"range":{"start_line":142,"start_character":33,"end_line":142,"end_character":40},"in_reply_to":"6cacdbe1_dd7c53ad","updated":"2026-10-20 12:32:33.000000000","message":"Done","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"}],"nova/service.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6e47b2a1c1bcec063dfe1a61ec16cc6d22bf74c4","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        Re-parse config (initializes RPC) and rebuild runtime attributes"},{"line_number":200,"context_line":"        that Manager.__getstate__ dropped (driver, RPC clients, locks, etc.)."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        NOTE: Rebuilds only the Manager. Full spawn requires objects.register_all(),"},{"line_number":203,"context_line":"        oslo.privsep, os-brick/os-vif, etc. Not currently used (bug 2151537)."},{"line_number":204,"context_line":"        \"\"\""},{"line_number":205,"context_line":"        from nova import config  # noqa: PLC0415"}],"source_content_type":"text/x-python","patch_set":2,"id":"8f873708_38823fc2","line":202,"updated":"2026-09-10 15:15:00.000000000","message":"pep8: E501 line too long (84 \u003e 79 characters)","commit_id":"322ab25f3c9ca106eba012d081332f2036338bd6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":173,"context_line":"        if objects_base.NovaObject.indirection_api:"},{"line_number":174,"context_line":"            conductor_api \u003d conductor.API()"},{"line_number":175,"context_line":"            conductor_api.wait_until_ready(context.get_admin_context())"},{"line_number":176,"context_line":"        self.manager \u003d manager_class(host\u003dself.host, *args, **kwargs)"},{"line_number":177,"context_line":"        self.rpcserver \u003d None"},{"line_number":178,"context_line":"        self.rpcserver_alt \u003d None"},{"line_number":179,"context_line":"        self.report_interval \u003d report_interval"}],"source_content_type":"text/x-python","patch_set":3,"id":"4ed0d8ef_4f166c39","line":176,"updated":"2026-10-19 13:33:53.000000000","message":"so here we init the Manager. I assume we need it already in the main process s we cannot delay it to only do it in the workers.","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"548a6ce14fc4b5690bacd1222d370c0f2563680b","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        if objects_base.NovaObject.indirection_api:"},{"line_number":174,"context_line":"            conductor_api \u003d conductor.API()"},{"line_number":175,"context_line":"            conductor_api.wait_until_ready(context.get_admin_context())"},{"line_number":176,"context_line":"        self.manager \u003d manager_class(host\u003dself.host, *args, **kwargs)"},{"line_number":177,"context_line":"        self.rpcserver \u003d None"},{"line_number":178,"context_line":"        self.rpcserver_alt \u003d None"},{"line_number":179,"context_line":"        self.report_interval \u003d report_interval"}],"source_content_type":"text/x-python","patch_set":3,"id":"ea302903_a6e1805d","line":176,"in_reply_to":"088d84a1_cf970586","updated":"2026-10-21 09:26:43.000000000","message":"thanks. Good inline comment.","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"6f1ef2be7a336217929fce93bc72ef3718f502ca","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        if objects_base.NovaObject.indirection_api:"},{"line_number":174,"context_line":"            conductor_api \u003d conductor.API()"},{"line_number":175,"context_line":"            conductor_api.wait_until_ready(context.get_admin_context())"},{"line_number":176,"context_line":"        self.manager \u003d manager_class(host\u003dself.host, *args, **kwargs)"},{"line_number":177,"context_line":"        self.rpcserver \u003d None"},{"line_number":178,"context_line":"        self.rpcserver_alt \u003d None"},{"line_number":179,"context_line":"        self.report_interval \u003d report_interval"}],"source_content_type":"text/x-python","patch_set":3,"id":"088d84a1_cf970586","line":176,"in_reply_to":"4ed0d8ef_4f166c39","updated":"2026-10-20 12:32:33.000000000","message":"Added an inline comment to make this explicit","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":203,"context_line":"        objects.register_all(), oslo.privsep, os-brick/os-vif, etc."},{"line_number":204,"context_line":"        Not currently used (bug 2151537)."},{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        from nova import config  # noqa: PLC0415"},{"line_number":207,"context_line":"        config.parse_args(sys.argv)"},{"line_number":208,"context_line":"        manager_class \u003d importutils.import_class(self.manager_class_name)"},{"line_number":209,"context_line":"        self.manager \u003d manager_class("}],"source_content_type":"text/x-python","patch_set":3,"id":"ea249928_37ee6571","line":206,"range":{"start_line":206,"start_character":41,"end_line":206,"end_character":48},"updated":"2026-10-19 13:33:53.000000000","message":"are we using ruff now? or is this also a flake8 comaptible number?","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"6f1ef2be7a336217929fce93bc72ef3718f502ca","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        objects.register_all(), oslo.privsep, os-brick/os-vif, etc."},{"line_number":204,"context_line":"        Not currently used (bug 2151537)."},{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        from nova import config  # noqa: PLC0415"},{"line_number":207,"context_line":"        config.parse_args(sys.argv)"},{"line_number":208,"context_line":"        manager_class \u003d importutils.import_class(self.manager_class_name)"},{"line_number":209,"context_line":"        self.manager \u003d manager_class("}],"source_content_type":"text/x-python","patch_set":3,"id":"5dbd6e06_2308f63d","line":206,"range":{"start_line":206,"start_character":41,"end_line":206,"end_character":48},"in_reply_to":"ea249928_37ee6571","updated":"2026-10-20 12:32:33.000000000","message":"Done","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":206,"context_line":"        from nova import config  # noqa: PLC0415"},{"line_number":207,"context_line":"        config.parse_args(sys.argv)"},{"line_number":208,"context_line":"        manager_class \u003d importutils.import_class(self.manager_class_name)"},{"line_number":209,"context_line":"        self.manager \u003d manager_class("},{"line_number":210,"context_line":"            host\u003dself.host, *self.saved_args, **self.saved_kwargs)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def start(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"84be13e9_62167b0e","line":209,"updated":"2026-10-19 13:33:53.000000000","message":"We create a new Manager in the worker here. As we do so can we simply not serialize self.manager in Service so that it is not pushed to the worker as it is anyhow reinitialized there? If so then we would not need to change the Manager class to allow its serialization.","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"6f1ef2be7a336217929fce93bc72ef3718f502ca","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        from nova import config  # noqa: PLC0415"},{"line_number":207,"context_line":"        config.parse_args(sys.argv)"},{"line_number":208,"context_line":"        manager_class \u003d importutils.import_class(self.manager_class_name)"},{"line_number":209,"context_line":"        self.manager \u003d manager_class("},{"line_number":210,"context_line":"            host\u003dself.host, *self.saved_args, **self.saved_kwargs)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def start(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"43d6ab83_011df22b","line":209,"in_reply_to":"84be13e9_62167b0e","updated":"2026-10-20 12:32:33.000000000","message":"Thanks, great suggestion, this simplified patch a lot!","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"75c24b4bd6e02ccac887e723760ca33bb9fcfdbc","unresolved":true,"context_lines":[{"line_number":232,"context_line":"        # Only in spawn (fresh interpreter) is TRANSPORT unset; rebuild"},{"line_number":233,"context_line":"        # runtime state here (see _reinit_after_spawn for details, bug"},{"line_number":234,"context_line":"        # 2151537)."},{"line_number":235,"context_line":"        if rpc.TRANSPORT is None:"},{"line_number":236,"context_line":"            self._reinit_after_spawn()"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        verstr \u003d version.version_string_with_package()"}],"source_content_type":"text/x-python","patch_set":3,"id":"f479fa2f_23510f14","line":235,"updated":"2026-10-19 13:33:53.000000000","message":"hm rpc.TRANSPORT is global, isn\u0027t that pickled over to the worker process?","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"548a6ce14fc4b5690bacd1222d370c0f2563680b","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # Only in spawn (fresh interpreter) is TRANSPORT unset; rebuild"},{"line_number":233,"context_line":"        # runtime state here (see _reinit_after_spawn for details, bug"},{"line_number":234,"context_line":"        # 2151537)."},{"line_number":235,"context_line":"        if rpc.TRANSPORT is None:"},{"line_number":236,"context_line":"            self._reinit_after_spawn()"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        verstr \u003d version.version_string_with_package()"}],"source_content_type":"text/x-python","patch_set":3,"id":"2708a77f_180394b7","line":235,"in_reply_to":"f479fa2f_23510f14","updated":"2026-10-21 09:26:43.000000000","message":"Done","commit_id":"7958908fe0d2aed1658cfa467fb6ca0b8e4a22f1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"548a6ce14fc4b5690bacd1222d370c0f2563680b","unresolved":true,"context_lines":[{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        # In a spawned child manager is None (dropped by __getstate__);"},{"line_number":245,"context_line":"        # rebuild config and RPC state before proceeding (bug 2151537)."},{"line_number":246,"context_line":"        if self.manager is None:"},{"line_number":247,"context_line":"            self._reinit_after_spawn()"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        verstr \u003d version.version_string_with_package()"}],"source_content_type":"text/x-python","patch_set":4,"id":"8c2a9161_8ee86b85","line":246,"updated":"2026-10-21 09:26:43.000000000","message":"based on the fact that we hit this in the child we know that start() is called in the child (too). So what if we make one more step further and move the content of the `_reinit_after_spawn` from `__init__` to `start`, including the manager creation. I feel that should create a single codepath where we do the real initialization (in the start) and then the main and the child would call the same start without difference. So the only logic change would be compared to baseline that we don\u0027t serialize the manager from main to child via the getstate method as you proposed.","commit_id":"601617c550ac1c89cf879c12433b1784b83341d2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"83f7f74a167c82af08d4078a8357718e1ea46816","unresolved":false,"context_lines":[{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        # In a spawned child manager is None (dropped by __getstate__);"},{"line_number":245,"context_line":"        # rebuild config and RPC state before proceeding (bug 2151537)."},{"line_number":246,"context_line":"        if self.manager is None:"},{"line_number":247,"context_line":"            self._reinit_after_spawn()"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        verstr \u003d version.version_string_with_package()"}],"source_content_type":"text/x-python","patch_set":4,"id":"b0ad7fa7_e9d6d885","line":246,"in_reply_to":"8c2a9161_8ee86b85","updated":"2026-10-29 10:21:46.000000000","message":"Done","commit_id":"601617c550ac1c89cf879c12433b1784b83341d2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"83f7f74a167c82af08d4078a8357718e1ea46816","unresolved":true,"context_lines":[{"line_number":216,"context_line":"        context.CELL_CACHE \u003d {}"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        # NOTE(ksambor): Manager creation is deferred from __init__ to here so"},{"line_number":219,"context_line":"        # that the Service object is picklable (bug 2151537). Only create it"},{"line_number":220,"context_line":"        # on the first start(); a service that is stopped and started again"},{"line_number":221,"context_line":"        # keeps the manager it already has, as it did when the manager was"},{"line_number":222,"context_line":"        # created in __init__."},{"line_number":223,"context_line":"        if self.manager is None:"},{"line_number":224,"context_line":"            # A spawned child has a fresh interpreter: CONF is unpopulated and"}],"source_content_type":"text/x-python","patch_set":7,"id":"5c2e838d_6f308261","line":221,"range":{"start_line":219,"start_character":62,"end_line":221,"end_character":42},"updated":"2026-10-29 10:21:46.000000000","message":"OK that is good point I did not considered before. Do we have cases when we stop() and then start() the service? In general I feel we only stop() it when we are going to stop the whole process, ie shutting down. If so then start() is not expected after that stop().","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6d4cfcdb5bd64bd26688bf0b63dbb49b0e9c8f47","unresolved":true,"context_lines":[{"line_number":216,"context_line":"        context.CELL_CACHE \u003d {}"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        # NOTE(ksambor): Manager creation is deferred from __init__ to here so"},{"line_number":219,"context_line":"        # that the Service object is picklable (bug 2151537). Only create it"},{"line_number":220,"context_line":"        # on the first start(); a service that is stopped and started again"},{"line_number":221,"context_line":"        # keeps the manager it already has, as it did when the manager was"},{"line_number":222,"context_line":"        # created in __init__."},{"line_number":223,"context_line":"        if self.manager is None:"},{"line_number":224,"context_line":"            # A spawned child has a fresh interpreter: CONF is unpopulated and"}],"source_content_type":"text/x-python","patch_set":7,"id":"c262a278_b01139a4","line":221,"range":{"start_line":219,"start_character":62,"end_line":221,"end_character":42},"in_reply_to":"1985e46d_47268eee","updated":"2026-11-02 12:58:34.000000000","message":"Hm.\nThe first ref is a single test case using stop() and start() There I would say that it is not an indication of support of start should work after stop. It is more like the test used that fact of start work after stop in the test env to test something else (the capabilities)\n\nThe second ref talks about restarting compute service in functional test. It uses stop, but also it hints that the start_service later will create an independent service instead of starting up the stopped one. \nAlso compute is special in the context of the current patch as today compute does not use any forking of spawning, it runs totally in the main process.\n\nDoes things start to fail if we stop assuming that start can be called after stop? (except that single test case that then need a reformulation)","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"1ba8e69410565ac21f5dbf26bbf971730a7b1758","unresolved":true,"context_lines":[{"line_number":216,"context_line":"        context.CELL_CACHE \u003d {}"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        # NOTE(ksambor): Manager creation is deferred from __init__ to here so"},{"line_number":219,"context_line":"        # that the Service object is picklable (bug 2151537). Only create it"},{"line_number":220,"context_line":"        # on the first start(); a service that is stopped and started again"},{"line_number":221,"context_line":"        # keeps the manager it already has, as it did when the manager was"},{"line_number":222,"context_line":"        # created in __init__."},{"line_number":223,"context_line":"        if self.manager is None:"},{"line_number":224,"context_line":"            # A spawned child has a fresh interpreter: CONF is unpopulated and"}],"source_content_type":"text/x-python","patch_set":7,"id":"1985e46d_47268eee","line":221,"range":{"start_line":219,"start_character":62,"end_line":221,"end_character":42},"in_reply_to":"5c2e838d_6f308261","updated":"2026-10-30 10:17:12.000000000","message":"I noticed this specific behavior in the tests: https://github.com/openstack/nova/blob/37cbad653babdf943351b27ec010629b17e31691/nova/tests/functional/api_sample_tests/test_server_shares.py#L119 calls stop()/start() inside mock.patch.dict(self.compute.driver.capabilities, ...) and relies on the manager surviving. I based this approach on https://github.com/openstack/nova/blob/37cbad653babdf943351b27ec010629b17e31691/nova/test.py#L582, and I\u0027ve also added test_restart_keeps_the_same_manager to explicitly pin this behavior down","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"83f7f74a167c82af08d4078a8357718e1ea46816","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        # keeps the manager it already has, as it did when the manager was"},{"line_number":222,"context_line":"        # created in __init__."},{"line_number":223,"context_line":"        if self.manager is None:"},{"line_number":224,"context_line":"            # A spawned child has a fresh interpreter: CONF is unpopulated and"},{"line_number":225,"context_line":"            # RPC is not yet initialized.  Parse config (which also calls"},{"line_number":226,"context_line":"            # rpc.init) so the child can function normally.  In the main"},{"line_number":227,"context_line":"            # process this was already done at startup, so config.parse_args"}],"source_content_type":"text/x-python","patch_set":7,"id":"10b53b55_5cc3e213","line":224,"updated":"2026-10-29 10:21:46.000000000","message":"hm, isn\u0027t it we have the CONF pickling probe in oslo.service to see if CONF can be copied from main to worker? This patch fixed the pickling of CONF in utils. So I assume we can now pickle CONF and therefore get the CONF copied from main to worker. What am I missing?","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"1ba8e69410565ac21f5dbf26bbf971730a7b1758","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        # keeps the manager it already has, as it did when the manager was"},{"line_number":222,"context_line":"        # created in __init__."},{"line_number":223,"context_line":"        if self.manager is None:"},{"line_number":224,"context_line":"            # A spawned child has a fresh interpreter: CONF is unpopulated and"},{"line_number":225,"context_line":"            # RPC is not yet initialized.  Parse config (which also calls"},{"line_number":226,"context_line":"            # rpc.init) so the child can function normally.  In the main"},{"line_number":227,"context_line":"            # process this was already done at startup, so config.parse_args"}],"source_content_type":"text/x-python","patch_set":7,"id":"edc5b79e_1c0ca1e4","line":224,"in_reply_to":"10b53b55_5cc3e213","updated":"2026-10-30 10:17:12.000000000","message":"You\u0027re right, removed. oslo_config_glue.link() binds CONF into the on_new_worker partial, cotyledon pickles it to the child, and ConfigOpts.__reduce__ special-cases self is CONF so unpickling restores the global singleton","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6d4cfcdb5bd64bd26688bf0b63dbb49b0e9c8f47","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        # keeps the manager it already has, as it did when the manager was"},{"line_number":222,"context_line":"        # created in __init__."},{"line_number":223,"context_line":"        if self.manager is None:"},{"line_number":224,"context_line":"            # A spawned child has a fresh interpreter: CONF is unpopulated and"},{"line_number":225,"context_line":"            # RPC is not yet initialized.  Parse config (which also calls"},{"line_number":226,"context_line":"            # rpc.init) so the child can function normally.  In the main"},{"line_number":227,"context_line":"            # process this was already done at startup, so config.parse_args"}],"source_content_type":"text/x-python","patch_set":7,"id":"4d7e09f4_defc555c","line":224,"in_reply_to":"edc5b79e_1c0ca1e4","updated":"2026-11-02 12:58:34.000000000","message":"Acknowledged","commit_id":"8788fc92268d71d9cbc270f82fd1c3f1afdd49aa"}],"nova/tests/unit/test_service.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"7bf8d57ccdba16eef210215d47a61d66ba113ff3","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import os.path"},{"line_number":22,"context_line":"from multiprocessing.reduction import ForkingPickler"},{"line_number":23,"context_line":"from unittest import mock"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":1,"id":"c6c85275_1a165360","line":22,"updated":"2026-08-14 11:55:30.000000000","message":"pep8: H306: imports not in alphabetical order (os.path, multiprocessing.reduction.forkingpickler)","commit_id":"fd561c8fe1063110f5a84fef96fde48b3635db34"}]}
