)]}'
{"masakarimonitors/hostmonitor/host_handler/handle_host.py":[{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"342911bdd856a5bd25dc8d4bbe01b034d6ec9b1e","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                               for n in node_state_tag_list"},{"line_number":350,"context_line":"                               if n.get(\u0027type\u0027) \u003d\u003d \u0027remote\u0027]"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Check the own host status."},{"line_number":353,"context_line":"        for node_state_tag in node_state_tag_list:"},{"line_number":354,"context_line":"            # If own host is not online, the hostmonitor doesn\u0027t need to"},{"line_number":355,"context_line":"            # monitor the other hosts."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_9afb9077","line":352,"range":{"start_line":352,"start_character":8,"end_line":352,"end_character":36},"updated":"2020-06-23 01:23:26.000000000","message":"# Check self host status is online or offline","commit_id":"4cf3da666b6f57ff55b0d3d60d4a7101487975d0"},{"author":{"_account_id":31996,"name":"Daisuke Suzuki","email":"suzuki-di@njk.co.jp","username":"DaisukeSuzuki"},"change_message_id":"c67b871734679319be2f648e2a82f26d1018dc69","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                               for n in node_state_tag_list"},{"line_number":350,"context_line":"                               if n.get(\u0027type\u0027) \u003d\u003d \u0027remote\u0027]"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Check the own host status."},{"line_number":353,"context_line":"        for node_state_tag in node_state_tag_list:"},{"line_number":354,"context_line":"            # If own host is not online, the hostmonitor doesn\u0027t need to"},{"line_number":355,"context_line":"            # monitor the other hosts."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_04b99013","line":352,"range":{"start_line":352,"start_character":8,"end_line":352,"end_character":36},"in_reply_to":"bf51134e_9afb9077","updated":"2020-06-29 06:51:14.000000000","message":"Done","commit_id":"4cf3da666b6f57ff55b0d3d60d4a7101487975d0"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"342911bdd856a5bd25dc8d4bbe01b034d6ec9b1e","unresolved":false,"context_lines":[{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Check the own host status."},{"line_number":353,"context_line":"        for node_state_tag in node_state_tag_list:"},{"line_number":354,"context_line":"            # If own host is not online, the hostmonitor doesn\u0027t need to"},{"line_number":355,"context_line":"            # monitor the other hosts."},{"line_number":356,"context_line":"            if node_state_tag.get(\u0027uname\u0027) \u003d\u003d self.my_hostname and \\"},{"line_number":357,"context_line":"                node_state_tag.get(\u0027crmd\u0027) !\u003d \u0027online\u0027:"},{"line_number":358,"context_line":"                return 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_1a2dc0fd","line":355,"range":{"start_line":354,"start_character":12,"end_line":355,"end_character":38},"updated":"2020-06-23 01:23:26.000000000","message":"# If self host status is offline then, there is no need to check the status of other hosts.","commit_id":"4cf3da666b6f57ff55b0d3d60d4a7101487975d0"},{"author":{"_account_id":31996,"name":"Daisuke Suzuki","email":"suzuki-di@njk.co.jp","username":"DaisukeSuzuki"},"change_message_id":"c67b871734679319be2f648e2a82f26d1018dc69","unresolved":false,"context_lines":[{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Check the own host status."},{"line_number":353,"context_line":"        for node_state_tag in node_state_tag_list:"},{"line_number":354,"context_line":"            # If own host is not online, the hostmonitor doesn\u0027t need to"},{"line_number":355,"context_line":"            # monitor the other hosts."},{"line_number":356,"context_line":"            if node_state_tag.get(\u0027uname\u0027) \u003d\u003d self.my_hostname and \\"},{"line_number":357,"context_line":"                node_state_tag.get(\u0027crmd\u0027) !\u003d \u0027online\u0027:"},{"line_number":358,"context_line":"                return 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_64396ca2","line":355,"range":{"start_line":354,"start_character":12,"end_line":355,"end_character":38},"in_reply_to":"bf51134e_1a2dc0fd","updated":"2020-06-29 06:51:14.000000000","message":"Done","commit_id":"4cf3da666b6f57ff55b0d3d60d4a7101487975d0"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"342911bdd856a5bd25dc8d4bbe01b034d6ec9b1e","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            # If own host is not online, the hostmonitor doesn\u0027t need to"},{"line_number":355,"context_line":"            # monitor the other hosts."},{"line_number":356,"context_line":"            if node_state_tag.get(\u0027uname\u0027) \u003d\u003d self.my_hostname and \\"},{"line_number":357,"context_line":"                node_state_tag.get(\u0027crmd\u0027) !\u003d \u0027online\u0027:"},{"line_number":358,"context_line":"                return 1"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        # Check if status changed."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_5ab458f2","line":357,"range":{"start_line":357,"start_character":43,"end_line":357,"end_character":54},"updated":"2020-06-23 01:23:26.000000000","message":"node_state_tag is of type CibSchemaCompliantTag and crmd can be either offline or online. For better understanding, I would prefer to use offline here explicitly.\n\nAlso, any reason why you don\u0027t need the same logic in method \"_check_host_status_by_cibadmin\"?","commit_id":"4cf3da666b6f57ff55b0d3d60d4a7101487975d0"},{"author":{"_account_id":31996,"name":"Daisuke Suzuki","email":"suzuki-di@njk.co.jp","username":"DaisukeSuzuki"},"change_message_id":"c67b871734679319be2f648e2a82f26d1018dc69","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            # If own host is not online, the hostmonitor doesn\u0027t need to"},{"line_number":355,"context_line":"            # monitor the other hosts."},{"line_number":356,"context_line":"            if node_state_tag.get(\u0027uname\u0027) \u003d\u003d self.my_hostname and \\"},{"line_number":357,"context_line":"                node_state_tag.get(\u0027crmd\u0027) !\u003d \u0027online\u0027:"},{"line_number":358,"context_line":"                return 1"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        # Check if status changed."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_6407accb","line":357,"range":{"start_line":357,"start_character":43,"end_line":357,"end_character":54},"in_reply_to":"bf51134e_5ab458f2","updated":"2020-06-29 06:51:14.000000000","message":"\u003e node_state_tag is of type CibSchemaCompliantTag and crmd can be either offline or online. For better understanding, I would prefer to use offline here explicitly.\n\nI modified to use \u0027offline\u0027 as the condition.\n\n\u003e Also, any reason why you don\u0027t need the same logic in method \"_check_host_status_by_cibadmin\"?\n\nThis issue need to be fixed only for the processing of monitoring the ComputeNode managed by \"pacemaker_remote\".\nIn the case of monitoring ComputeNode managed by \"pacemaker\"(not \"pacemaker_remote\"), the processing to prevent throwing the wrong notification has already been implemented in _check_hb_line.[1] \nSince _check_host_status_by_cibadmin is the processing that monitoring ComputeNodes managed by \"pacemaker\", it doesn\u0027t need to modify _check_host_status_by_cibadmin.\n[1]: In the case of \"pacemaker\", by using tcpdump command in _check_hb_line, hostmonitor sleeps until own node will be fenced by stonith when it is isolated in the network.","commit_id":"4cf3da666b6f57ff55b0d3d60d4a7101487975d0"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"4f17d51e307b905017fb52912e14d2cae7bfb72b","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            # If own host is not online, the hostmonitor doesn\u0027t need to"},{"line_number":355,"context_line":"            # monitor the other hosts."},{"line_number":356,"context_line":"            if node_state_tag.get(\u0027uname\u0027) \u003d\u003d self.my_hostname and \\"},{"line_number":357,"context_line":"                node_state_tag.get(\u0027crmd\u0027) !\u003d \u0027online\u0027:"},{"line_number":358,"context_line":"                return 1"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        # Check if status changed."}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_988335aa","line":357,"range":{"start_line":357,"start_character":43,"end_line":357,"end_character":54},"in_reply_to":"bf51134e_6407accb","updated":"2020-06-30 00:24:35.000000000","message":"So what you are saying is if pacemaker_remote is used, operator must set config option \"restrict_to_remotes\" to True. Is it correct?\n\nIf yes, I think there must be a pre-check logic while starting hostmonitor to confirm the configuration is done correctly otherwise it shouldn\u0027t start hostmonitor service.","commit_id":"4cf3da666b6f57ff55b0d3d60d4a7101487975d0"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"feb247bad15f43f1fc5e7de0478df739c311b9bf","unresolved":true,"context_lines":[{"line_number":103,"context_line":"                    LOG.error(\"%s\", msg)"},{"line_number":104,"context_line":"                    return 3"},{"line_number":105,"context_line":"        else:"},{"line_number":106,"context_line":"            if CONF.host.restrict_to_remotes:"},{"line_number":107,"context_line":"                msg \u003d (\"\\\"restrict_to_remotes\\\" in the host section \""},{"line_number":108,"context_line":"                       \"of the configuration file must be False \""},{"line_number":109,"context_line":"                       \"when it works on pacemaker.\")"},{"line_number":110,"context_line":"                LOG.error(\"%s\", msg)"},{"line_number":111,"context_line":"                return 3"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # Check whether the neccesary parameters are set."},{"line_number":114,"context_line":"        if CONF.host.corosync_multicast_interfaces is None or \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"2f21bad2_d2d9db18","line":111,"range":{"start_line":106,"start_character":0,"end_line":111,"end_character":24},"updated":"2021-03-14 19:43:49.000000000","message":"This breaks valid deployments.","commit_id":"bc96fb95c3432fd5113b9208193cafbd7dc6ea54"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"feb247bad15f43f1fc5e7de0478df739c311b9bf","unresolved":true,"context_lines":[{"line_number":365,"context_line":"                               for n in node_state_tag_list"},{"line_number":366,"context_line":"                               if n.get(\u0027type\u0027) \u003d\u003d \u0027remote\u0027]"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        # Check self host status is online or offline."},{"line_number":369,"context_line":"        for node_state_tag in node_state_tag_list:"},{"line_number":370,"context_line":"            # If self host status is offline then, there is no need to"},{"line_number":371,"context_line":"            # check the status of other hosts."},{"line_number":372,"context_line":"            if node_state_tag.get(\u0027uname\u0027) \u003d\u003d self.my_hostname and \\"},{"line_number":373,"context_line":"                node_state_tag.get(\u0027crmd\u0027) \u003d\u003d \u0027offline\u0027:"},{"line_number":374,"context_line":"                return 1"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        # Check if status changed."},{"line_number":377,"context_line":"        self._check_if_status_changed(node_state_tag_list)"}],"source_content_type":"text/x-python","patch_set":3,"id":"e785a9f5_cb826a1a","line":374,"range":{"start_line":368,"start_character":0,"end_line":374,"end_character":24},"updated":"2021-03-14 19:43:49.000000000","message":"This cannot happen on remote by definition of remote.","commit_id":"bc96fb95c3432fd5113b9208193cafbd7dc6ea54"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"d08f1c22c996b93460a78bbb0b1462b1d88ba1cd","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                pacemaker_remote_status \u003d self._check_pacemaker_services("},{"line_number":441,"context_line":"                    \u0027pacemaker_remote\u0027)"},{"line_number":442,"context_line":"                if pacemaker_remote_status is False:"},{"line_number":443,"context_line":"                    if self._check_host_status_by_crmadmin() !\u003d 0:"},{"line_number":444,"context_line":"                        LOG.warning(\"hostmonitor skips monitoring hosts.\")"},{"line_number":445,"context_line":"                        eventlet.greenthread.sleep("},{"line_number":446,"context_line":"                            CONF.host.monitoring_interval)"},{"line_number":447,"context_line":"                        continue"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"                # Check the host status is online or offline."},{"line_number":450,"context_line":"                if CONF.host.restrict_to_remotes:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_c9cb2a50","line":447,"range":{"start_line":443,"start_character":20,"end_line":447,"end_character":32},"updated":"2020-09-12 12:31:13.000000000","message":"this is the proper safeguard; hostmonitor should be treated as pacemaker proxy so should run on pacemaker nodes (not remotes)","commit_id":"bc96fb95c3432fd5113b9208193cafbd7dc6ea54"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"366e18e2cd81d482363b8c005692da14b5b85421","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                pacemaker_remote_status \u003d self._check_pacemaker_services("},{"line_number":441,"context_line":"                    \u0027pacemaker_remote\u0027)"},{"line_number":442,"context_line":"                if pacemaker_remote_status is False:"},{"line_number":443,"context_line":"                    if self._check_host_status_by_crmadmin() !\u003d 0:"},{"line_number":444,"context_line":"                        LOG.warning(\"hostmonitor skips monitoring hosts.\")"},{"line_number":445,"context_line":"                        eventlet.greenthread.sleep("},{"line_number":446,"context_line":"                            CONF.host.monitoring_interval)"},{"line_number":447,"context_line":"                        continue"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"                # Check the host status is online or offline."},{"line_number":450,"context_line":"                if CONF.host.restrict_to_remotes:"}],"source_content_type":"text/x-python","patch_set":3,"id":"b75bf308_f276fb61","line":447,"range":{"start_line":443,"start_character":20,"end_line":447,"end_character":32},"in_reply_to":"1f621f24_d5f11803","updated":"2020-12-13 09:53:13.000000000","message":"I have replied on the bug report now.","commit_id":"bc96fb95c3432fd5113b9208193cafbd7dc6ea54"},{"author":{"_account_id":31996,"name":"Daisuke Suzuki","email":"suzuki-di@njk.co.jp","username":"DaisukeSuzuki"},"change_message_id":"1948c4413f1da0abac9f0bfe736e821d5032bc3c","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                pacemaker_remote_status \u003d self._check_pacemaker_services("},{"line_number":441,"context_line":"                    \u0027pacemaker_remote\u0027)"},{"line_number":442,"context_line":"                if pacemaker_remote_status is False:"},{"line_number":443,"context_line":"                    if self._check_host_status_by_crmadmin() !\u003d 0:"},{"line_number":444,"context_line":"                        LOG.warning(\"hostmonitor skips monitoring hosts.\")"},{"line_number":445,"context_line":"                        eventlet.greenthread.sleep("},{"line_number":446,"context_line":"                            CONF.host.monitoring_interval)"},{"line_number":447,"context_line":"                        continue"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"                # Check the host status is online or offline."},{"line_number":450,"context_line":"                if CONF.host.restrict_to_remotes:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_d5f11803","line":447,"range":{"start_line":443,"start_character":20,"end_line":447,"end_character":32},"in_reply_to":"9f560f44_c9cb2a50","updated":"2020-11-16 06:24:54.000000000","message":"I\u0027m aware that the discussion in the bug report has been completed, could you please cancel \"Code-Review-1\" if your question is resolved?","commit_id":"bc96fb95c3432fd5113b9208193cafbd7dc6ea54"}]}
