)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"2165078ce1dcddb36ed3ab70c392f480b64da7a8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b4563042_49eb57fc","updated":"2024-07-16 09:49:49.000000000","message":"Need to tune (probably) remaining unit tests, so please ignore for now.","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2e99b394345a91aecf3be1c6349903f237f107a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2df0e484_aca3425b","updated":"2024-07-16 13:02:53.000000000","message":"Probably it\u0027s early to post these... but I hope some of these are useful for further brush-up.","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"91c9a27d61ed484360094e398070d7807f6eb22b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"172c8b37_edb2d68b","updated":"2024-07-16 13:44:23.000000000","message":"Thanks for the comments.","commit_id":"562541f7b771742a90d0183d81e6bb40ec5b4b3f"},{"author":{"_account_id":32968,"name":"Juan Larriba","email":"jlarriba@redhat.com","username":"jlarriba"},"change_message_id":"5247a82990bcf9e23858bcea8c318053632aab63","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"59d40b20_c3bbbfbc","updated":"2024-07-26 07:33:21.000000000","message":"I feel a little bit strange that we are changing the \"polling\" essential pattern of Ceilometer to open a receiving socket. I don\u0027t say its wrong, I only think that it it skind of a strange pattern.\n\nHave we considered getting the heartbeat reporting in origin and get Ceilometer to poll the information?","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"c6a9f73d5ccf8f7fd1dd1831626c334ce28d9436","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"d3585683_95daa1cd","updated":"2024-07-29 10:22:10.000000000","message":"I think I don\u0027t understand what are you trying to achieve Juan. What I read from your comment is that polling agent should poll on it\u0027s own heat beat data?\n\nThe point of heart beat is to allow collection of data about healthiness of the polling agent itself. The next step would be a health check script (usually container health check script) collecting such data, deciding if the agent is healthy or not and reporting the result to monitoring framework.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"50855e19b554f2b0584b004aa03a97d7877450f5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"7bdfad3c_a8f60487","in_reply_to":"51d95fd5_67ee16eb","updated":"2024-07-30 11:32:43.000000000","message":"I see, you are basically asking to include heart beat data to the rest of the ceilometer metrics, so that Prometheus can collect it.\n\nThat would suite well if you consider just collection of the data. But we need to be able to decide whether the container is healthy or not without Prometheus in the play for the reason to avoid a data loop (polling agent [provide the data and in paralel export it for Prometheus to scrape] -\u003e podman [call proper Prometheus query in HC script] -\u003e Prometheus [provide data] -\u003e podman [decide if container is healthy and act on the result]). Without a requirement on any monitoring framework it is just: polling agent [provide the data] -\u003e podman [decide if container is healthy and act on the result].\n\nAlso, we are going to use podman exporter to collect status metrics because of the other services running on dataplane nodes anyway, so creating another inconsistency is not what we want to do (currently we have containerized and non-containerized services. If we would implement what you suggest, we would have process for containerized services, non-containerized services and special Prometheus dependent process for polling agent).","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":32968,"name":"Juan Larriba","email":"jlarriba@redhat.com","username":"jlarriba"},"change_message_id":"8c572a280aabf9870e2ebbb759e07971dc265853","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"7d0c29db_29da0720","in_reply_to":"7bdfad3c_a8f60487","updated":"2024-07-30 15:36:08.000000000","message":"OK, now I get it.\n\nThank you very much for your explanations.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":32968,"name":"Juan Larriba","email":"jlarriba@redhat.com","username":"jlarriba"},"change_message_id":"38d3423a928f0f002f7428de48fdda955e9822f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"51d95fd5_67ee16eb","in_reply_to":"d3585683_95daa1cd","updated":"2024-07-30 08:45:46.000000000","message":"Maybe I am confused, but I thought that the health check scripts would report to some other place (maybe kube-state-metrics) that would aggregate and hold all the health checks.\n\nWhat I was proposing is that ideally, Ceilometer would poll that aggregator and retrieve the metrics. That would prevent the need to open a socket to receive information in the poller and let Ceilometer poller to continue to be just polling.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"change_message_id":"740c2a73763c834c5377e386f4952c9f9355f379","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"e877aa95_cc05979f","updated":"2024-08-12 15:44:15.000000000","message":"could you please fix the pep8 issues?","commit_id":"f7c2cb5da344695080f64b17faa215912f74af1a"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"60d8f312e33d80e4fc666b673ab813929148d2df","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"992cb452_a6c6985f","updated":"2024-09-05 14:37:28.000000000","message":"Is there anything else that needs to be done in this patch?","commit_id":"48f4089e39370d82f6e7e3637c31606e57905fcb"}],"ceilometer/polling/manager.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2e99b394345a91aecf3be1c6349903f237f107a6","unresolved":true,"context_lines":[{"line_number":223,"context_line":"                        self.manager._queue.put_nowait(hb)"},{"line_number":224,"context_line":"                        LOG.debug(f\"Polster heartbeat update: {hb[\u0027pollster\u0027]}\")"},{"line_number":225,"context_line":"                    except queue.Full:"},{"line_number":226,"context_line":"                        LOG.warn(f\"Heartbeat queue full. Update failed: {hb}\")"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"                    for sample in samples:"},{"line_number":229,"context_line":"                        # Note(yuywz): Unify the timestamp of polled samples"}],"source_content_type":"text/x-python","patch_set":1,"id":"f259c302_9d0b5041","line":226,"range":{"start_line":226,"start_character":24,"end_line":226,"end_character":78},"updated":"2024-07-16 13:02:53.000000000","message":"this may be red-herring in deployment without any monitoring tool listening on the socket. Probably we should make this feature optional ? (Set heartbeat_socket_dir to None by default and enable the feature when the option is set to non-empty path).","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f8c314c519f8c3ab64f2b93f482fd4e6ecae692","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                        self.manager._queue.put_nowait(hb)"},{"line_number":224,"context_line":"                        LOG.debug(f\"Polster heartbeat update: {hb[\u0027pollster\u0027]}\")"},{"line_number":225,"context_line":"                    except queue.Full:"},{"line_number":226,"context_line":"                        LOG.warn(f\"Heartbeat queue full. Update failed: {hb}\")"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"                    for sample in samples:"},{"line_number":229,"context_line":"                        # Note(yuywz): Unify the timestamp of polled samples"}],"source_content_type":"text/x-python","patch_set":1,"id":"165b4d4b_9b1ca8fa","line":226,"range":{"start_line":226,"start_character":24,"end_line":226,"end_character":78},"in_reply_to":"5f66fb2b_1425529d","updated":"2024-07-31 01:52:51.000000000","message":"Done","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"91c9a27d61ed484360094e398070d7807f6eb22b","unresolved":true,"context_lines":[{"line_number":223,"context_line":"                        self.manager._queue.put_nowait(hb)"},{"line_number":224,"context_line":"                        LOG.debug(f\"Polster heartbeat update: {hb[\u0027pollster\u0027]}\")"},{"line_number":225,"context_line":"                    except queue.Full:"},{"line_number":226,"context_line":"                        LOG.warn(f\"Heartbeat queue full. Update failed: {hb}\")"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"                    for sample in samples:"},{"line_number":229,"context_line":"                        # Note(yuywz): Unify the timestamp of polled samples"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f66fb2b_1425529d","line":226,"range":{"start_line":226,"start_character":24,"end_line":226,"end_character":78},"in_reply_to":"f259c302_9d0b5041","updated":"2024-07-16 13:44:23.000000000","message":"That is good point, will implement.","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2e99b394345a91aecf3be1c6349903f237f107a6","unresolved":true,"context_lines":[{"line_number":315,"context_line":"        if type(namespaces) is not list:"},{"line_number":316,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        self._queue \u003d queue"},{"line_number":319,"context_line":"        self._status \u003d dict()"},{"line_number":320,"context_line":"        self._sock_pth \u003d os.path.join("},{"line_number":321,"context_line":"            conf.polling.heartbeat_socket_dir,"}],"source_content_type":"text/x-python","patch_set":1,"id":"31dd1780_899fdfc9","line":318,"range":{"start_line":318,"start_character":22,"end_line":318,"end_character":27},"updated":"2024-07-16 13:02:53.000000000","message":"If the queue should not be None then it\u0027d be better to remove its default (\u003dNone)","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"91c9a27d61ed484360094e398070d7807f6eb22b","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        if type(namespaces) is not list:"},{"line_number":316,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        self._queue \u003d queue"},{"line_number":319,"context_line":"        self._status \u003d dict()"},{"line_number":320,"context_line":"        self._sock_pth \u003d os.path.join("},{"line_number":321,"context_line":"            conf.polling.heartbeat_socket_dir,"}],"source_content_type":"text/x-python","patch_set":1,"id":"2659b38d_d77bf044","line":318,"range":{"start_line":318,"start_character":22,"end_line":318,"end_character":27},"in_reply_to":"31dd1780_899fdfc9","updated":"2024-07-16 13:44:23.000000000","message":"Acknowledged","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2e99b394345a91aecf3be1c6349903f237f107a6","unresolved":true,"context_lines":[{"line_number":328,"context_line":"            self._sock.bind(self._sock_pth)"},{"line_number":329,"context_line":"            self._sock.listen(1)"},{"line_number":330,"context_line":"        except socket.error as err:"},{"line_number":331,"context_line":"            raise PollingException(f\"Failed to open socket file ({addr}): \""},{"line_number":332,"context_line":"                                   f\"{err}\", conf)"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        LOG.debug(\"Starting heartbeat child service. Listening\""}],"source_content_type":"text/x-python","patch_set":1,"id":"90f94dc8_d0f2156e","line":331,"range":{"start_line":331,"start_character":18,"end_line":331,"end_character":34},"updated":"2024-07-16 13:02:53.000000000","message":"I\u0027d suggest creating a new exception because PollingException would be specific to polling actions.","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"91c9a27d61ed484360094e398070d7807f6eb22b","unresolved":false,"context_lines":[{"line_number":328,"context_line":"            self._sock.bind(self._sock_pth)"},{"line_number":329,"context_line":"            self._sock.listen(1)"},{"line_number":330,"context_line":"        except socket.error as err:"},{"line_number":331,"context_line":"            raise PollingException(f\"Failed to open socket file ({addr}): \""},{"line_number":332,"context_line":"                                   f\"{err}\", conf)"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        LOG.debug(\"Starting heartbeat child service. Listening\""}],"source_content_type":"text/x-python","patch_set":1,"id":"cfa3d953_90aef0e9","line":331,"range":{"start_line":331,"start_character":18,"end_line":331,"end_character":34},"in_reply_to":"90f94dc8_d0f2156e","updated":"2024-07-16 13:44:23.000000000","message":"Acknowledged","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2e99b394345a91aecf3be1c6349903f237f107a6","unresolved":true,"context_lines":[{"line_number":393,"context_line":"        super(AgentManager, self).__init__(worker_id)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        self.conf \u003d conf"},{"line_number":396,"context_line":"        self._queue \u003d queue"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"        if type(namespaces) is not list:"},{"line_number":399,"context_line":"            namespaces \u003d [namespaces]"}],"source_content_type":"text/x-python","patch_set":1,"id":"6f22f97d_7cece800","line":396,"range":{"start_line":396,"start_character":8,"end_line":396,"end_character":27},"updated":"2024-07-16 13:02:53.000000000","message":"This is not used ?","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f8c314c519f8c3ab64f2b93f482fd4e6ecae692","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        super(AgentManager, self).__init__(worker_id)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        self.conf \u003d conf"},{"line_number":396,"context_line":"        self._queue \u003d queue"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"        if type(namespaces) is not list:"},{"line_number":399,"context_line":"            namespaces \u003d [namespaces]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1cc15961_98641039","line":396,"range":{"start_line":396,"start_character":8,"end_line":396,"end_character":27},"in_reply_to":"4906b862_7567d937","updated":"2024-07-31 01:52:51.000000000","message":"Ah, ok.","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"91c9a27d61ed484360094e398070d7807f6eb22b","unresolved":true,"context_lines":[{"line_number":393,"context_line":"        super(AgentManager, self).__init__(worker_id)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        self.conf \u003d conf"},{"line_number":396,"context_line":"        self._queue \u003d queue"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"        if type(namespaces) is not list:"},{"line_number":399,"context_line":"            namespaces \u003d [namespaces]"}],"source_content_type":"text/x-python","patch_set":1,"id":"4906b862_7567d937","line":396,"range":{"start_line":396,"start_character":8,"end_line":396,"end_character":27},"in_reply_to":"6f22f97d_7cece800","updated":"2024-07-16 13:44:23.000000000","message":"It is used on line 223","commit_id":"02ebd86fbd40f2d9a10ba91506d754cb781e0fe3"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f8c314c519f8c3ab64f2b93f482fd4e6ecae692","unresolved":true,"context_lines":[{"line_number":219,"context_line":"                    )"},{"line_number":220,"context_line":"                    sample_batch \u003d []"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"                    if self.manager._queue is not None:"},{"line_number":223,"context_line":"                        try:"},{"line_number":224,"context_line":"                            # send poll heartbeat"},{"line_number":225,"context_line":"                            hb \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"8027b125_1687f2f9","line":222,"range":{"start_line":222,"start_character":36,"end_line":222,"end_character":43},"updated":"2024-07-31 01:52:51.000000000","message":"It is quite tricky to access a private item from AgentManager. I wonder if we can create the `heartbeat` method in AgentManager and call it here.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"2558a76c5b7fbd889d10d44e552ec0248d9d4a48","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                    )"},{"line_number":220,"context_line":"                    sample_batch \u003d []"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"                    if self.manager._queue is not None:"},{"line_number":223,"context_line":"                        try:"},{"line_number":224,"context_line":"                            # send poll heartbeat"},{"line_number":225,"context_line":"                            hb \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"91b3554b_3d3a0e4d","line":222,"range":{"start_line":222,"start_character":36,"end_line":222,"end_character":43},"in_reply_to":"8027b125_1687f2f9","updated":"2024-08-05 11:03:34.000000000","message":"Acknowledged","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f8c314c519f8c3ab64f2b93f482fd4e6ecae692","unresolved":true,"context_lines":[{"line_number":315,"context_line":"        )"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class AgentHeartBeat(cotyledon.Service):"},{"line_number":319,"context_line":"    def __init__(self, worker_id, conf, namespaces\u003dNone, queue\u003dNone):"},{"line_number":320,"context_line":"        super(AgentHeartBeat, self).__init__(worker_id)"},{"line_number":321,"context_line":"        self.conf \u003d conf"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf8ad0a9_ed13ea03","line":318,"range":{"start_line":318,"start_character":6,"end_line":318,"end_character":20},"updated":"2024-07-31 01:52:51.000000000","message":"This class does not represent heartbeat protocal but is a class to manage the service framework for periodic heartbeat. I wonder if `AgentHeartBeatManager` can be a better naming.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"74fdc4ef6fd80f75cf3cc7b27e5f2b71977121ba","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        )"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class AgentHeartBeat(cotyledon.Service):"},{"line_number":319,"context_line":"    def __init__(self, worker_id, conf, namespaces\u003dNone, queue\u003dNone):"},{"line_number":320,"context_line":"        super(AgentHeartBeat, self).__init__(worker_id)"},{"line_number":321,"context_line":"        self.conf \u003d conf"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf803f37_67c0fdcf","line":318,"range":{"start_line":318,"start_character":6,"end_line":318,"end_character":20},"in_reply_to":"83f268c9_46f4143f","updated":"2024-08-15 09:45:01.000000000","message":"Done","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"2558a76c5b7fbd889d10d44e552ec0248d9d4a48","unresolved":true,"context_lines":[{"line_number":315,"context_line":"        )"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class AgentHeartBeat(cotyledon.Service):"},{"line_number":319,"context_line":"    def __init__(self, worker_id, conf, namespaces\u003dNone, queue\u003dNone):"},{"line_number":320,"context_line":"        super(AgentHeartBeat, self).__init__(worker_id)"},{"line_number":321,"context_line":"        self.conf \u003d conf"}],"source_content_type":"text/x-python","patch_set":5,"id":"83f268c9_46f4143f","line":318,"range":{"start_line":318,"start_character":6,"end_line":318,"end_character":20},"in_reply_to":"bf8ad0a9_ed13ea03","updated":"2024-08-05 11:03:34.000000000","message":"Sure, if the current name is out of naming conventions, I\u0027ll change it.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f8c314c519f8c3ab64f2b93f482fd4e6ecae692","unresolved":true,"context_lines":[{"line_number":324,"context_line":"            LOG.info(\"Heartbeat reporting disabled\")"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if type(namespaces) is not list:"},{"line_number":328,"context_line":"            if namespaces is None:"},{"line_number":329,"context_line":"                namespaces \u003d \"\""},{"line_number":330,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        self._queue \u003d queue"},{"line_number":333,"context_line":"        self._status \u003d dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"99083440_72110f36","line":330,"range":{"start_line":327,"start_character":0,"end_line":330,"end_character":37},"updated":"2024-07-31 01:52:51.000000000","message":"conf.polling_namespaces should be always a list.\n\nhttps://github.com/openstack/ceilometer/blob/6c114aac7346ae5e0844915528b62a84ad64d885/ceilometer/cmd/polling.py#L48","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"74fdc4ef6fd80f75cf3cc7b27e5f2b71977121ba","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            LOG.info(\"Heartbeat reporting disabled\")"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if type(namespaces) is not list:"},{"line_number":328,"context_line":"            if namespaces is None:"},{"line_number":329,"context_line":"                namespaces \u003d \"\""},{"line_number":330,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        self._queue \u003d queue"},{"line_number":333,"context_line":"        self._status \u003d dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"e0dfc2b4_329a410f","line":330,"range":{"start_line":327,"start_character":0,"end_line":330,"end_character":37},"in_reply_to":"292406eb_7774ceb0","updated":"2024-08-15 09:45:01.000000000","message":"Hmm that\u0027s wired but I confirmed AgentManager has the same logic...  We can leave this now for a separate work.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"2558a76c5b7fbd889d10d44e552ec0248d9d4a48","unresolved":true,"context_lines":[{"line_number":324,"context_line":"            LOG.info(\"Heartbeat reporting disabled\")"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if type(namespaces) is not list:"},{"line_number":328,"context_line":"            if namespaces is None:"},{"line_number":329,"context_line":"                namespaces \u003d \"\""},{"line_number":330,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        self._queue \u003d queue"},{"line_number":333,"context_line":"        self._status \u003d dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"292406eb_7774ceb0","line":330,"range":{"start_line":327,"start_character":0,"end_line":330,"end_character":37},"in_reply_to":"3a600491_73552c49","updated":"2024-08-05 11:03:34.000000000","message":"When I was writing this piece of code I hit the case where it was a string (IIRC like when you use just one option --namespace). There is also similar block of code somewhere else in the code. I can definitely doublecheck that.","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"02291dab126b5b74749fa3060f2c3dd053381121","unresolved":true,"context_lines":[{"line_number":324,"context_line":"            LOG.info(\"Heartbeat reporting disabled\")"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        if type(namespaces) is not list:"},{"line_number":328,"context_line":"            if namespaces is None:"},{"line_number":329,"context_line":"                namespaces \u003d \"\""},{"line_number":330,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        self._queue \u003d queue"},{"line_number":333,"context_line":"        self._status \u003d dict()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a600491_73552c49","line":330,"range":{"start_line":327,"start_character":0,"end_line":330,"end_character":37},"in_reply_to":"99083440_72110f36","updated":"2024-07-31 01:54:27.000000000","message":"\u003e conf.polling_namespaces should be always a list.\n\u003e \n\u003e https://github.com/openstack/ceilometer/blob/6c114aac7346ae5e0844915528b62a84ad64d885/ceilometer/cmd/polling.py#L48","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f8c314c519f8c3ab64f2b93f482fd4e6ecae692","unresolved":true,"context_lines":[{"line_number":337,"context_line":"        )"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        self._delete_socket()"},{"line_number":340,"context_line":"        self._sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)"},{"line_number":341,"context_line":"        try:"},{"line_number":342,"context_line":"            self._sock.bind(self._sock_pth)"},{"line_number":343,"context_line":"            self._sock.listen(1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"e36ab3a9_82a50af0","line":340,"range":{"start_line":340,"start_character":13,"end_line":340,"end_character":19},"updated":"2024-07-31 01:52:51.000000000","message":"Instead of relying on hasattr check, can we set self._sock early and do `if self._sock` check instead of hasattr check ?","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"2558a76c5b7fbd889d10d44e552ec0248d9d4a48","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        )"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        self._delete_socket()"},{"line_number":340,"context_line":"        self._sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)"},{"line_number":341,"context_line":"        try:"},{"line_number":342,"context_line":"            self._sock.bind(self._sock_pth)"},{"line_number":343,"context_line":"            self._sock.listen(1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"06a32627_2ba7a5c2","line":340,"range":{"start_line":340,"start_character":13,"end_line":340,"end_character":19},"in_reply_to":"67bc31e3_312690b1","updated":"2024-08-05 11:03:34.000000000","message":"Acknowledged","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"02291dab126b5b74749fa3060f2c3dd053381121","unresolved":true,"context_lines":[{"line_number":337,"context_line":"        )"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        self._delete_socket()"},{"line_number":340,"context_line":"        self._sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)"},{"line_number":341,"context_line":"        try:"},{"line_number":342,"context_line":"            self._sock.bind(self._sock_pth)"},{"line_number":343,"context_line":"            self._sock.listen(1)"}],"source_content_type":"text/x-python","patch_set":5,"id":"67bc31e3_312690b1","line":340,"range":{"start_line":340,"start_character":13,"end_line":340,"end_character":19},"in_reply_to":"e36ab3a9_82a50af0","updated":"2024-07-31 01:54:27.000000000","message":"I mean add `self._sock \u003d None` before L323 .","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f8c314c519f8c3ab64f2b93f482fd4e6ecae692","unresolved":true,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        LOG.debug(\"Started heartbeat child process.\")"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        status_lock \u003d threading.Lock()"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        def _read_queue():"},{"line_number":393,"context_line":"            LOG.debug(\"Started heartbeat update thread\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"c3c5186b_94d60608","line":390,"range":{"start_line":390,"start_character":8,"end_line":390,"end_character":20},"updated":"2024-07-31 01:52:51.000000000","message":"If we do not expect concurrent call of run in a single process, we can make this belong to the instance (self.status_lock) and create it in `__init__`","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"2558a76c5b7fbd889d10d44e552ec0248d9d4a48","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        LOG.debug(\"Started heartbeat child process.\")"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        status_lock \u003d threading.Lock()"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        def _read_queue():"},{"line_number":393,"context_line":"            LOG.debug(\"Started heartbeat update thread\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"dafe0503_5e0738a8","line":390,"range":{"start_line":390,"start_character":8,"end_line":390,"end_character":20},"in_reply_to":"c3c5186b_94d60608","updated":"2024-08-05 11:03:34.000000000","message":"Acknowledged","commit_id":"140d115c34db727efa929c34da7d92a96bd3332e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"6b61f011d34d325df617e632e46d29c3f749e364","unresolved":true,"context_lines":[{"line_number":310,"context_line":"        self._sock \u003d None"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        if conf.polling.heartbeat_socket_dir is None:"},{"line_number":313,"context_line":"            LOG.info(\"Heartbeat reporting disabled\")"},{"line_number":314,"context_line":"            return"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        if type(namespaces) is not list:"},{"line_number":317,"context_line":"            if namespaces is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fb0257f9_fb6d22a9","line":314,"range":{"start_line":313,"start_character":0,"end_line":314,"end_character":18},"updated":"2024-08-15 09:49:38.000000000","message":"I now noticed that this logic is never actually used because AgentHeartBeatManager is created only when heartbeat_socket_dir is not None.\n\nhttps://review.opendev.org/c/openstack/ceilometer/+/924205/6/ceilometer/cmd/polling.py#105\n\nIf we check the option in upper layer then we can remove this (or raise ConfigException) and all `self._sock is None` check.","commit_id":"f7c2cb5da344695080f64b17faa215912f74af1a"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"41bfd1fdef3c7f619fbc4bf19cc7b8d830dd036a","unresolved":true,"context_lines":[{"line_number":310,"context_line":"        self._sock \u003d None"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        if conf.polling.heartbeat_socket_dir is None:"},{"line_number":313,"context_line":"            LOG.info(\"Heartbeat reporting disabled\")"},{"line_number":314,"context_line":"            return"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        if type(namespaces) is not list:"},{"line_number":317,"context_line":"            if namespaces is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fbcf6729_536c6bd7","line":314,"range":{"start_line":313,"start_character":0,"end_line":314,"end_character":18},"in_reply_to":"fb0257f9_fb6d22a9","updated":"2024-08-15 09:50:15.000000000","message":"I intend that this is not a very strict blocker and can be addressed in follow-up.","commit_id":"f7c2cb5da344695080f64b17faa215912f74af1a"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"11d85a5623a72c903e922153d7c771dba0a0b846","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        self._sock \u003d None"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        if conf.polling.heartbeat_socket_dir is None:"},{"line_number":313,"context_line":"            LOG.info(\"Heartbeat reporting disabled\")"},{"line_number":314,"context_line":"            return"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        if type(namespaces) is not list:"},{"line_number":317,"context_line":"            if namespaces is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"355d1efc_eea94324","line":314,"range":{"start_line":313,"start_character":0,"end_line":314,"end_character":18},"in_reply_to":"fbcf6729_536c6bd7","updated":"2024-09-06 05:45:13.000000000","message":"Done","commit_id":"f7c2cb5da344695080f64b17faa215912f74af1a"}]}
