)]}'
{"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"}],"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"}]}
