)]}'
{"neutron/agent/l3/agent.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        # Get the list of service plugins from Neutron Server"},{"line_number":239,"context_line":"        # This is the first place where we contact neutron-server on startup"},{"line_number":240,"context_line":"        # so retry in case its not ready to respond."},{"line_number":241,"context_line":"        while True:"},{"line_number":242,"context_line":"            try:"},{"line_number":243,"context_line":"                self.ha_router_count \u003d int("}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_b5671626","line":240,"updated":"2019-01-21 10:22:23.000000000","message":"This comment should be changed now","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"dc6ccf0d489df0c5eb47c0642284d62f39cffd71","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        # Get the list of service plugins from Neutron Server"},{"line_number":239,"context_line":"        # This is the first place where we contact neutron-server on startup"},{"line_number":240,"context_line":"        # so retry in case its not ready to respond."},{"line_number":241,"context_line":"        while True:"},{"line_number":242,"context_line":"            try:"},{"line_number":243,"context_line":"                self.ha_router_count \u003d int("}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_9a246d0f","line":240,"in_reply_to":"9fdfeff1_b5671626","updated":"2019-01-22 05:36:27.000000000","message":"Done","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                self.ha_router_count \u003d int("},{"line_number":244,"context_line":"                    self.plugin_rpc.get_host_ha_router_count(self.context))"},{"line_number":245,"context_line":"            except oslo_messaging.MessagingTimeout as e:"},{"line_number":246,"context_line":"                LOG.warning(\u0027l3-agent cannot contact neutron server \u0027"},{"line_number":247,"context_line":"                            \u0027to retrieve service plugins enabled. \u0027"},{"line_number":248,"context_line":"                            \u0027Check connectivity to neutron server. \u0027"},{"line_number":249,"context_line":"                            \u0027Retrying... \u0027"},{"line_number":250,"context_line":"                            \u0027Detailed message: %(msg)s.\u0027, {\u0027msg\u0027: e})"},{"line_number":251,"context_line":"                continue"},{"line_number":252,"context_line":"            break"},{"line_number":253,"context_line":"        LOG.info(\"Agent HA router count %s\", self.ha_router_count)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_7571aee0","line":250,"range":{"start_line":246,"start_character":28,"end_line":250,"end_character":68},"updated":"2019-01-21 10:22:23.000000000","message":"this message also should be changed in such case","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"dc6ccf0d489df0c5eb47c0642284d62f39cffd71","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                self.ha_router_count \u003d int("},{"line_number":244,"context_line":"                    self.plugin_rpc.get_host_ha_router_count(self.context))"},{"line_number":245,"context_line":"            except oslo_messaging.MessagingTimeout as e:"},{"line_number":246,"context_line":"                LOG.warning(\u0027l3-agent cannot contact neutron server \u0027"},{"line_number":247,"context_line":"                            \u0027to retrieve service plugins enabled. \u0027"},{"line_number":248,"context_line":"                            \u0027Check connectivity to neutron server. \u0027"},{"line_number":249,"context_line":"                            \u0027Retrying... \u0027"},{"line_number":250,"context_line":"                            \u0027Detailed message: %(msg)s.\u0027, {\u0027msg\u0027: e})"},{"line_number":251,"context_line":"                continue"},{"line_number":252,"context_line":"            break"},{"line_number":253,"context_line":"        LOG.info(\"Agent HA router count %s\", self.ha_router_count)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_3a21c1fc","line":250,"range":{"start_line":246,"start_character":28,"end_line":250,"end_character":68},"in_reply_to":"9fdfeff1_7571aee0","updated":"2019-01-22 05:36:27.000000000","message":"Done","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        consumers \u003d [[topics.NETWORK, topics.UPDATE]]"},{"line_number":280,"context_line":"        agent_rpc.create_consumers([self], topics.AGENT, consumers)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        # We set HA network port status to DOWN to let l2 agent update it"},{"line_number":283,"context_line":"        # to ACTIVE after wiring. This allows us to spawn keepalived only"},{"line_number":284,"context_line":"        # when l2 agent finished wiring the port."},{"line_number":285,"context_line":"        vrrp_pcount \u003d linux_utils.get_process_count_by_name(\"keepalived\")"},{"line_number":286,"context_line":"        LOG.debug(\"VRRP process count %s.\", vrrp_pcount)"},{"line_number":287,"context_line":"        vrrp_st_pcount \u003d linux_utils.get_process_count_by_name("}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_b535d6f9","line":284,"range":{"start_line":282,"start_character":8,"end_line":284,"end_character":49},"updated":"2019-01-21 10:22:23.000000000","message":"this comment is also outdated now","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"dc6ccf0d489df0c5eb47c0642284d62f39cffd71","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        consumers \u003d [[topics.NETWORK, topics.UPDATE]]"},{"line_number":280,"context_line":"        agent_rpc.create_consumers([self], topics.AGENT, consumers)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        # We set HA network port status to DOWN to let l2 agent update it"},{"line_number":283,"context_line":"        # to ACTIVE after wiring. This allows us to spawn keepalived only"},{"line_number":284,"context_line":"        # when l2 agent finished wiring the port."},{"line_number":285,"context_line":"        vrrp_pcount \u003d linux_utils.get_process_count_by_name(\"keepalived\")"},{"line_number":286,"context_line":"        LOG.debug(\"VRRP process count %s.\", vrrp_pcount)"},{"line_number":287,"context_line":"        vrrp_st_pcount \u003d linux_utils.get_process_count_by_name("}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_5a1e05bb","line":284,"range":{"start_line":282,"start_character":8,"end_line":284,"end_character":49},"in_reply_to":"9fdfeff1_b535d6f9","updated":"2019-01-22 05:36:27.000000000","message":"Move to Line 298","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        if (self.conf.agent_mode in [lib_const.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":292,"context_line":"                                     lib_const.L3_AGENT_MODE_LEGACY] and"},{"line_number":293,"context_line":"                self.ha_router_count \u003e 0 and not ("},{"line_number":294,"context_line":"                    vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":295,"context_line":"                    vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":296,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":297,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_3521e6b5","line":294,"range":{"start_line":294,"start_character":32,"end_line":294,"end_character":35},"updated":"2019-01-21 10:22:23.000000000","message":"why this divide by 2 here?","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5f3b36a207e77e0b7f651d4b416b85021ced0fa0","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        if (self.conf.agent_mode in [lib_const.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":292,"context_line":"                                     lib_const.L3_AGENT_MODE_LEGACY] and"},{"line_number":293,"context_line":"                self.ha_router_count \u003e 0 and not ("},{"line_number":294,"context_line":"                    vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":295,"context_line":"                    vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":296,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":297,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_ff4c8b77","line":294,"range":{"start_line":294,"start_character":32,"end_line":294,"end_character":35},"in_reply_to":"9fdfeff1_3521e6b5","updated":"2019-01-22 02:44:48.000000000","message":"One ha router has two keepalived processes in a host.","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        if (self.conf.agent_mode in [lib_const.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":292,"context_line":"                                     lib_const.L3_AGENT_MODE_LEGACY] and"},{"line_number":293,"context_line":"                self.ha_router_count \u003e 0 and not ("},{"line_number":294,"context_line":"                    vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":295,"context_line":"                    vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":296,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":297,"context_line":"            try:"},{"line_number":298,"context_line":"                self.plugin_rpc.update_all_ha_network_port_statuses("}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_350a4626","line":295,"range":{"start_line":294,"start_character":20,"end_line":295,"end_character":59},"updated":"2019-01-21 10:22:23.000000000","message":"why You want to switch ports to DOWN when there is more keepalived or neutron-keepalived-state-change processes than HA routers hosted by agent? Shouldn\u0027t be in opposite way?","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5f3b36a207e77e0b7f651d4b416b85021ced0fa0","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        if (self.conf.agent_mode in [lib_const.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":292,"context_line":"                                     lib_const.L3_AGENT_MODE_LEGACY] and"},{"line_number":293,"context_line":"                self.ha_router_count \u003e 0 and not ("},{"line_number":294,"context_line":"                    vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":295,"context_line":"                    vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":296,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":297,"context_line":"            try:"},{"line_number":298,"context_line":"                self.plugin_rpc.update_all_ha_network_port_statuses("}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_7f409b36","line":295,"range":{"start_line":294,"start_character":20,"end_line":295,"end_character":59},"in_reply_to":"9fdfeff1_350a4626","updated":"2019-01-22 02:44:48.000000000","message":"No, we have a \u0027not\u0027 in line 293.","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":297,"context_line":"            try:"},{"line_number":298,"context_line":"                self.plugin_rpc.update_all_ha_network_port_statuses("},{"line_number":299,"context_line":"                    self.context)"},{"line_number":300,"context_line":"            except Exception:"},{"line_number":301,"context_line":"                LOG.exception(\u0027update_all_ha_network_port_statuses failed\u0027)"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_b51e366e","line":299,"updated":"2019-01-21 10:22:23.000000000","message":"what if e.g. one router will not have spawned those processes? Will it be switched to DOWN for all routers in such case?","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5f3b36a207e77e0b7f651d4b416b85021ced0fa0","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":297,"context_line":"            try:"},{"line_number":298,"context_line":"                self.plugin_rpc.update_all_ha_network_port_statuses("},{"line_number":299,"context_line":"                    self.context)"},{"line_number":300,"context_line":"            except Exception:"},{"line_number":301,"context_line":"                LOG.exception(\u0027update_all_ha_network_port_statuses failed\u0027)"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_df74279c","line":299,"in_reply_to":"9fdfeff1_b51e366e","updated":"2019-01-22 02:44:48.000000000","message":"It\u0027s better to redo the original procedure, since we have no idea what happened. Let all router do such action looks like a more proper way. And it is indeed the original code procedure.","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"ca622895338b457b77e3f5b6a45d390280c22b4b","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        consumers \u003d [[topics.NETWORK, topics.UPDATE]]"},{"line_number":280,"context_line":"        agent_rpc.create_consumers([self], topics.AGENT, consumers)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        vrrp_pcount \u003d linux_utils.get_process_count_by_name(\"keepalived\")"},{"line_number":283,"context_line":"        LOG.debug(\"VRRP process count %s.\", vrrp_pcount)"},{"line_number":284,"context_line":"        vrrp_st_pcount \u003d linux_utils.get_process_count_by_name("},{"line_number":285,"context_line":"            \"neutron-keepalived-state-change\")"},{"line_number":286,"context_line":"        LOG.debug(\"neutron-keepalived-state-change process count %s.\","},{"line_number":287,"context_line":"                  vrrp_st_pcount)"},{"line_number":288,"context_line":"        if (self.conf.agent_mode in [lib_const.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":289,"context_line":"                                     lib_const.L3_AGENT_MODE_LEGACY] and"},{"line_number":290,"context_line":"                self.ha_router_count \u003e 0 and not ("}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_735af3f3","line":287,"range":{"start_line":282,"start_character":8,"end_line":287,"end_character":33},"updated":"2019-01-23 15:26:02.000000000","message":"It seems like this only needs to be invoked if the agent is in L3_AGENT_MODE_DVR_SNAT or L3_AGENT_MODE_LEGACY. Perhaps we can make it so we only pull this information off the system and shell out for these commands if the agent is running in a mode that requires it?","commit_id":"159ee4439ccc15da1d828c279990e88186b28e18"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"ca622895338b457b77e3f5b6a45d390280c22b4b","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        if (self.conf.agent_mode in [lib_const.L3_AGENT_MODE_DVR_SNAT,"},{"line_number":289,"context_line":"                                     lib_const.L3_AGENT_MODE_LEGACY] and"},{"line_number":290,"context_line":"                self.ha_router_count \u003e 0 and not ("},{"line_number":291,"context_line":"                    vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":292,"context_line":"                    vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":293,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":294,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_7014294f","line":291,"range":{"start_line":291,"start_character":20,"end_line":291,"end_character":35},"updated":"2019-01-23 15:26:02.000000000","message":"This may seem a really opaque in the future. I believe the value of vrrp_pcount includes the monitor process for keepalived for each HA router. It took a minute for this to register in my mind, down the line as we maintain this code it might be nice to refactor this a little bit so it\u0027s more clear what this value is.","commit_id":"159ee4439ccc15da1d828c279990e88186b28e18"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"ebb7e6b793e0de4c67a104b897c6b7b78933db55","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        LOG.debug(\"neutron-keepalived-state-change process count %s.\","},{"line_number":305,"context_line":"                  vrrp_st_pcount)"},{"line_number":306,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":307,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":308,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":309,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":310,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_064a307f","line":307,"range":{"start_line":307,"start_character":16,"end_line":307,"end_character":31},"updated":"2019-01-24 17:57:27.000000000","message":"Nit: maybe a comment explaining why we\u0027re dividing by 2 here?","commit_id":"68fe4e4f1dffbdbc0dad2d857a10e1925799ec19"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70bf978125d1380b844bfa3181d43e2d42891a08","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                            \u0027Detailed message: %(msg)s.\u0027, {\u0027msg\u0027: e})"},{"line_number":251,"context_line":"                continue"},{"line_number":252,"context_line":"            break"},{"line_number":253,"context_line":"        LOG.info(\"Agent HA router count %s\", self.ha_router_count)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        self.init_extension_manager(self.plugin_rpc)"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_8243166c","line":253,"range":{"start_line":253,"start_character":27,"end_line":253,"end_character":33},"updated":"2019-01-30 10:16:47.000000000","message":"nit: routers","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"1e495ecaf2cb04ed51095cd26a796fe14c1487cd","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                            \u0027Detailed message: %(msg)s.\u0027, {\u0027msg\u0027: e})"},{"line_number":251,"context_line":"                continue"},{"line_number":252,"context_line":"            break"},{"line_number":253,"context_line":"        LOG.info(\"Agent HA router count %s\", self.ha_router_count)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        self.init_extension_manager(self.plugin_rpc)"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_c51a83ca","line":253,"range":{"start_line":253,"start_character":27,"end_line":253,"end_character":33},"in_reply_to":"9fdfeff1_8243166c","updated":"2019-01-30 15:29:20.000000000","message":"Done","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70bf978125d1380b844bfa3181d43e2d42891a08","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Due to the process structure design of keepalived and the current"},{"line_number":308,"context_line":"        # config of l3-ha router, it will run one main \u0027keepalived\u0027 process"},{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_0205e613","line":309,"range":{"start_line":309,"start_character":69,"end_line":309,"end_character":76},"updated":"2019-01-30 10:16:47.000000000","message":"nit: \"divided number of processes by 2\"","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"1e495ecaf2cb04ed51095cd26a796fe14c1487cd","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Due to the process structure design of keepalived and the current"},{"line_number":308,"context_line":"        # config of l3-ha router, it will run one main \u0027keepalived\u0027 process"},{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_e54547b5","line":309,"range":{"start_line":309,"start_character":69,"end_line":309,"end_character":76},"in_reply_to":"9fdfeff1_0205e613","updated":"2019-01-30 15:29:20.000000000","message":"Done","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70bf978125d1380b844bfa3181d43e2d42891a08","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":313,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":314,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":315,"context_line":"            try:"},{"line_number":316,"context_line":"                # We set HA network port status to DOWN to let l2 agent"},{"line_number":317,"context_line":"                # update it to ACTIVE after wiring. This allows us to spawn"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_d6055f12","line":314,"range":{"start_line":314,"start_character":62,"end_line":314,"end_character":66},"updated":"2019-01-30 10:16:47.000000000","message":"nit: I think You can use constant from https://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L25\nAlso this it don\u0027t need to be inside quotation marks","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"1e495ecaf2cb04ed51095cd26a796fe14c1487cd","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":313,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":314,"context_line":"            LOG.debug(\"Call neutron server to set HA port to \u0027DOWN\u0027 state.\")"},{"line_number":315,"context_line":"            try:"},{"line_number":316,"context_line":"                # We set HA network port status to DOWN to let l2 agent"},{"line_number":317,"context_line":"                # update it to ACTIVE after wiring. This allows us to spawn"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_0543abb0","line":314,"range":{"start_line":314,"start_character":62,"end_line":314,"end_character":66},"in_reply_to":"9fdfeff1_d6055f12","updated":"2019-01-30 15:29:20.000000000","message":"Done","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"0c3024e42f6e2cc2a3e9ed8b91cf32f53c0c60d2","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        LOG.debug(\"neutron-keepalived-state-change process count %s.\","},{"line_number":305,"context_line":"                  vrrp_st_pcount)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Due to the process structure design of keepalived and the current"},{"line_number":308,"context_line":"        # config of l3-ha router, it will run one main \u0027keepalived\u0027 process"},{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # number of processes by 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_4e01e269","line":309,"range":{"start_line":307,"start_character":8,"end_line":309,"end_character":37},"updated":"2019-02-13 17:15:22.000000000","message":"Could be config changed to run only one keepalived?","commit_id":"6281a8bc1fdde1268f3de4dba99af4969353a94a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3af88e59761e02f6162636fb8dee2674b610dff3","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        LOG.debug(\"neutron-keepalived-state-change process count %s.\","},{"line_number":305,"context_line":"                  vrrp_st_pcount)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Due to the process structure design of keepalived and the current"},{"line_number":308,"context_line":"        # config of l3-ha router, it will run one main \u0027keepalived\u0027 process"},{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # number of processes by 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_0515ebe4","line":309,"range":{"start_line":307,"start_character":8,"end_line":309,"end_character":37},"in_reply_to":"9fdfeff1_4e01e269","updated":"2019-02-14 09:02:45.000000000","message":"Negative, it is keepalived itself. The main \u0027keepalived\u0027 process does not have any VRRP functionality.","commit_id":"6281a8bc1fdde1268f3de4dba99af4969353a94a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f96745170c49aecf8237af59b20045d290082f63","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # config of l3-ha router, it will run one main \u0027keepalived\u0027 process"},{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # number of processes by 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":313,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":314,"context_line":"            LOG.debug(\"Call neutron server to set HA port to DOWN state.\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_2efc9e70","line":311,"updated":"2019-02-13 17:14:34.000000000","message":"This check could be moved earlier by itself, after L296, then we wouldn\u0027t even have to make the ps calls at all.  That way the new LOG.debug calls are only in the case when they are interesting.","commit_id":"6281a8bc1fdde1268f3de4dba99af4969353a94a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3af88e59761e02f6162636fb8dee2674b610dff3","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # config of l3-ha router, it will run one main \u0027keepalived\u0027 process"},{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # number of processes by 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":313,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":314,"context_line":"            LOG.debug(\"Call neutron server to set HA port to DOWN state.\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_65e637b3","line":311,"in_reply_to":"9fdfeff1_2efc9e70","updated":"2019-02-14 09:02:45.000000000","message":"Done","commit_id":"6281a8bc1fdde1268f3de4dba99af4969353a94a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"65fc5e5154486e196926bf27662cc5869f3daa6e","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # config of l3-ha router, it will run one main \u0027keepalived\u0027 process"},{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # number of processes by 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":313,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":314,"context_line":"            LOG.debug(\"Call neutron server to set HA port to DOWN state.\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_ee88d6c6","line":311,"in_reply_to":"9fdfeff1_2efc9e70","updated":"2019-02-13 17:20:40.000000000","message":"Good catch, I think that makes sense.","commit_id":"6281a8bc1fdde1268f3de4dba99af4969353a94a"},{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"0c3024e42f6e2cc2a3e9ed8b91cf32f53c0c60d2","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # number of processes by 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":313,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":314,"context_line":"            LOG.debug(\"Call neutron server to set HA port to DOWN state.\")"},{"line_number":315,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_aeef2eaf","line":312,"range":{"start_line":312,"start_character":16,"end_line":312,"end_character":31},"updated":"2019-02-13 17:15:22.000000000","message":"What if config of keepalived will require 2 child processes? Is config of this keepalived hard-coded?","commit_id":"6281a8bc1fdde1268f3de4dba99af4969353a94a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3af88e59761e02f6162636fb8dee2674b610dff3","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        # and a child  \u0027VRRP\u0027 process. So in the following check, we divided"},{"line_number":310,"context_line":"        # number of processes by 2 to match the ha router count."},{"line_number":311,"context_line":"        if (self.ha_router_count \u003e 0 and not ("},{"line_number":312,"context_line":"                vrrp_pcount / 2 \u003e\u003d self.ha_router_count and"},{"line_number":313,"context_line":"                vrrp_st_pcount \u003e\u003d self.ha_router_count)):"},{"line_number":314,"context_line":"            LOG.debug(\"Call neutron server to set HA port to DOWN state.\")"},{"line_number":315,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_257eef18","line":312,"range":{"start_line":312,"start_character":16,"end_line":312,"end_character":31},"in_reply_to":"9fdfeff1_aeef2eaf","updated":"2019-02-14 09:02:45.000000000","message":"It is hard code now:\nhttps://github.com/openstack/neutron/blob/master/neutron/agent/linux/keepalived.py#L286","commit_id":"6281a8bc1fdde1268f3de4dba99af4969353a94a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"56d65c75167418affbc87211dbb6dcc9ff1f2d5b","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                                         lib_const.L3_AGENT_MODE_LEGACY]):"},{"line_number":296,"context_line":"            return"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        if self.ha_router_count \u003c\u003d 0:"},{"line_number":299,"context_line":"            return"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        # HA routers VRRP (keepalived) process count"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_54be35d5","line":298,"updated":"2019-02-14 19:41:01.000000000","message":"I hope the count can\u0027t be \u003c 0 :)","commit_id":"5b7d444b3176dd3f8bf166d332781ac93670a51d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"10413ba1374f1a90d64a05951e60dad08f5ddb7a","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                                         lib_const.L3_AGENT_MODE_LEGACY]):"},{"line_number":296,"context_line":"            return"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        if self.ha_router_count \u003c\u003d 0:"},{"line_number":299,"context_line":"            return"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        # HA routers VRRP (keepalived) process count"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_8cc25184","line":298,"in_reply_to":"9fdfeff1_54be35d5","updated":"2019-02-15 01:15:43.000000000","message":"It can\u0027t, just in case. : )","commit_id":"5b7d444b3176dd3f8bf166d332781ac93670a51d"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"eca1b371a03ee87ce6d5ce36b9d8343883e05997","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        # HA routers state change python monitor process count"},{"line_number":305,"context_line":"        vrrp_st_pcount \u003d linux_utils.get_process_count_by_name("},{"line_number":306,"context_line":"            \"neutron-keepalived-state-change\")"},{"line_number":307,"context_line":"        LOG.debug(\"neutron-keepalived-state-change process count %s.\","},{"line_number":308,"context_line":"                  vrrp_st_pcount)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        # Due to the process structure design of keepalived and the current"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_0d196920","line":307,"updated":"2019-02-15 21:39:38.000000000","message":"Nit: debug lines at 303 and 307 could be collapsed to a single line.  No need to fill disks in debug mode any faster than we need to.","commit_id":"5b7d444b3176dd3f8bf166d332781ac93670a51d"}],"neutron/agent/linux/utils.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                      log_fail_as_error\u003dFalse)"},{"line_number":206,"context_line":"    except exceptions.ProcessExecutionError:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":208,"context_line":"            return 0"},{"line_number":209,"context_line":"    return len(out.strip(\u0027\\n\u0027).split(\u0027\\n\u0027))"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_50083827","line":208,"updated":"2019-01-21 10:22:23.000000000","message":"If You just want to return some constant value here, why You want to reraise original exception also?","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5f3b36a207e77e0b7f651d4b416b85021ced0fa0","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                      log_fail_as_error\u003dFalse)"},{"line_number":206,"context_line":"    except exceptions.ProcessExecutionError:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":208,"context_line":"            return 0"},{"line_number":209,"context_line":"    return len(out.strip(\u0027\\n\u0027).split(\u0027\\n\u0027))"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_7f3bbbd0","line":208,"in_reply_to":"9fdfeff1_50083827","updated":"2019-01-22 02:44:48.000000000","message":"\u0027reraise\u0027 is False.","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70bf978125d1380b844bfa3181d43e2d42891a08","unresolved":false,"context_lines":[{"line_number":202,"context_line":"    \"\"\"Find the process count by name.\"\"\""},{"line_number":203,"context_line":"    try:"},{"line_number":204,"context_line":"        out \u003d execute([\u0027ps\u0027, \u0027-C\u0027, name, \u0027-o\u0027, \u0027comm\u003d\u0027],"},{"line_number":205,"context_line":"                      log_fail_as_error\u003dFalse)"},{"line_number":206,"context_line":"    except exceptions.ProcessExecutionError:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":208,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_56adefe6","line":205,"updated":"2019-01-30 10:16:47.000000000","message":"what in case if e.g. there will be no keepalived process running for one of routers but there will be \"external\" keepalived process run on host? Will it reconfigure this router with missing keepalived or not?","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"47b983c0e6a1ca9077afa66d905709af7f608e20","unresolved":false,"context_lines":[{"line_number":202,"context_line":"    \"\"\"Find the process count by name.\"\"\""},{"line_number":203,"context_line":"    try:"},{"line_number":204,"context_line":"        out \u003d execute([\u0027ps\u0027, \u0027-C\u0027, name, \u0027-o\u0027, \u0027comm\u003d\u0027],"},{"line_number":205,"context_line":"                      log_fail_as_error\u003dFalse)"},{"line_number":206,"context_line":"    except exceptions.ProcessExecutionError:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":208,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_ccbe30b3","line":205,"in_reply_to":"9fdfeff1_56adefe6","updated":"2019-01-30 13:02:41.000000000","message":"This can happen. But anyway, this fix will act the original behavior finally.","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"eca1b371a03ee87ce6d5ce36b9d8343883e05997","unresolved":false,"context_lines":[{"line_number":201,"context_line":"def get_process_count_by_name(name):"},{"line_number":202,"context_line":"    \"\"\"Find the process count by name.\"\"\""},{"line_number":203,"context_line":"    try:"},{"line_number":204,"context_line":"        out \u003d execute([\u0027ps\u0027, \u0027-C\u0027, name, \u0027-o\u0027, \u0027comm\u003d\u0027],"},{"line_number":205,"context_line":"                      log_fail_as_error\u003dFalse)"},{"line_number":206,"context_line":"    except exceptions.ProcessExecutionError:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception(reraise\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_6d1ef50c","line":204,"updated":"2019-02-15 21:39:38.000000000","message":"Do you have any thoughts on whether it\u0027s better to shell out for this as opposed to using a psutil oneshot to grab the names of running processes and keeping it pythonic?","commit_id":"5b7d444b3176dd3f8bf166d332781ac93670a51d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9d22277c2341d84c020b9baa982b37762fec1c5b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"def get_process_count_by_name(name):"},{"line_number":202,"context_line":"    \"\"\"Find the process count by name.\"\"\""},{"line_number":203,"context_line":"    try:"},{"line_number":204,"context_line":"        out \u003d execute([\u0027ps\u0027, \u0027-C\u0027, name, \u0027-o\u0027, \u0027comm\u003d\u0027],"},{"line_number":205,"context_line":"                      log_fail_as_error\u003dFalse)"},{"line_number":206,"context_line":"    except exceptions.ProcessExecutionError:"},{"line_number":207,"context_line":"        with excutils.save_and_reraise_exception(reraise\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_3026fdcf","line":204,"in_reply_to":"9fdfeff1_6d1ef50c","updated":"2019-02-16 15:33:02.000000000","message":"Seems no way to get processes by name, it will iterator all the process then compare by name one by one:\nhttps://psutil.readthedocs.io/en/latest/#processes","commit_id":"5b7d444b3176dd3f8bf166d332781ac93670a51d"}],"neutron/api/rpc/handlers/l3_rpc.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    def get_service_plugin_list(self, context, **kwargs):"},{"line_number":252,"context_line":"        return directory.get_plugins().keys()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def get_host_ha_router_count(self, context, host):"},{"line_number":255,"context_line":"        return self.l3plugin.get_host_ha_router_count(context, host)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    @db_api.retry_db_errors"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_902780b7","line":254,"range":{"start_line":254,"start_character":20,"end_line":254,"end_character":26},"updated":"2019-01-21 10:22:23.000000000","message":"routers would be better IMHO","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70bf978125d1380b844bfa3181d43e2d42891a08","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        return net_id"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def get_service_plugin_list(self, context, **kwargs):"},{"line_number":252,"context_line":"        return directory.get_plugins().keys()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def get_host_ha_router_count(self, context, host):"},{"line_number":255,"context_line":"        return self.l3plugin.get_host_ha_router_count(context, host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_d68a3f68","line":252,"updated":"2019-01-30 10:16:47.000000000","message":"According to http://codesearch.openstack.org/?q\u003dget_service_plugin_list\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d I think that we can maybe remove this old method as it isn\u0027t used anymore","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f41f51364b9160a649b8fc80e0da2ac845948bd8","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        return net_id"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def get_service_plugin_list(self, context, **kwargs):"},{"line_number":252,"context_line":"        return directory.get_plugins().keys()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def get_host_ha_router_count(self, context, host):"},{"line_number":255,"context_line":"        return self.l3plugin.get_host_ha_router_count(context, host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_b9799ac8","line":252,"in_reply_to":"9fdfeff1_99ece88f","updated":"2019-01-31 08:23:20.000000000","message":"ok, makes sense for me","commit_id":"9422648b14bfa049709929118f5c87872a22688f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"47b983c0e6a1ca9077afa66d905709af7f608e20","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        return net_id"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def get_service_plugin_list(self, context, **kwargs):"},{"line_number":252,"context_line":"        return directory.get_plugins().keys()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def get_host_ha_router_count(self, context, host):"},{"line_number":255,"context_line":"        return self.l3plugin.get_host_ha_router_count(context, host)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_99ece88f","line":252,"in_reply_to":"9fdfeff1_d68a3f68","updated":"2019-01-30 13:02:41.000000000","message":"It should be done with a RPC version change, so I\u0027d like to do it in a independent patch.","commit_id":"9422648b14bfa049709929118f5c87872a22688f"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    def get_host_ha_router_count(self, context, host):"},{"line_number":317,"context_line":"        router_ids \u003d self.list_router_ids_on_host(context, host)"},{"line_number":318,"context_line":"        up_routers \u003d l3_objs.Router.get_objects(context, id\u003drouter_ids,"},{"line_number":319,"context_line":"                                                admin_state_up\u003dTrue)"},{"line_number":320,"context_line":"        return len(l3_objs.RouterExtraAttributes.get_objects("},{"line_number":321,"context_line":"            context, router_id\u003d[obj.id for obj in up_routers], ha\u003dTrue))"},{"line_number":322,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_5021189f","line":319,"updated":"2019-01-21 10:22:23.000000000","message":"I\u0027m not sure but can\u0027t You just filter here with \"ha\u003dTrue\" also?","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5f3b36a207e77e0b7f651d4b416b85021ced0fa0","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    def get_host_ha_router_count(self, context, host):"},{"line_number":317,"context_line":"        router_ids \u003d self.list_router_ids_on_host(context, host)"},{"line_number":318,"context_line":"        up_routers \u003d l3_objs.Router.get_objects(context, id\u003drouter_ids,"},{"line_number":319,"context_line":"                                                admin_state_up\u003dTrue)"},{"line_number":320,"context_line":"        return len(l3_objs.RouterExtraAttributes.get_objects("},{"line_number":321,"context_line":"            context, router_id\u003d[obj.id for obj in up_routers], ha\u003dTrue))"},{"line_number":322,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_1f2dcf94","line":319,"in_reply_to":"9fdfeff1_5021189f","updated":"2019-01-22 02:44:48.000000000","message":"Router obj or router table does not have \u0027ha\u0027 property : ).","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"}],"neutron/tests/unit/agent/l3/test_agent.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b95e806a37f87cc19a78b1b925a55bc40cad52f7","unresolved":false,"context_lines":[{"line_number":2863,"context_line":"    def test_get_service_plugin_list_retried(self):"},{"line_number":2864,"context_line":"        raise_timeout \u003d oslo_messaging.MessagingTimeout()"},{"line_number":2865,"context_line":"        # Raise a timeout the first 2 times it calls"},{"line_number":2866,"context_line":"        # get_host_ha_router_count then return a empty tuple"},{"line_number":2867,"context_line":"        self.plugin_api.get_host_ha_router_count.side_effect \u003d ("},{"line_number":2868,"context_line":"            raise_timeout, 0"},{"line_number":2869,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_5056f808","line":2866,"range":{"start_line":2866,"start_character":49,"end_line":2866,"end_character":60},"updated":"2019-01-21 10:22:23.000000000","message":"this comment is outdated also","commit_id":"d234b6334076a80088fd0db738ae7830668451f9"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"8234eef50edffd24fe32f575d75112d1da4e440f","unresolved":false,"context_lines":[{"line_number":2854,"context_line":"            ri.process_address_scope()"},{"line_number":2855,"context_line":"            self.assertEqual(2, mocked_func.call_count)"},{"line_number":2856,"context_line":""},{"line_number":2857,"context_line":"    def test_get_service_plugin_list(self):"},{"line_number":2858,"context_line":"        self.plugin_api.get_host_ha_router_count.return_value \u003d 1"},{"line_number":2859,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":2860,"context_line":"        self.assertEqual(1, agent.ha_router_count)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_6a95e93f","line":2857,"range":{"start_line":2857,"start_character":8,"end_line":2857,"end_character":36},"updated":"2019-01-25 16:39:26.000000000","message":"Can we rename this test? It doesn\u0027t seem to accurately describe what is being tested now that we\u0027re making these changes.","commit_id":"fe042ef39d97f7bfcbcdd8448c3c3b274f4e3568"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6cc4b0e8b8355ef4a2c93fa19a56568738473891","unresolved":false,"context_lines":[{"line_number":2854,"context_line":"            ri.process_address_scope()"},{"line_number":2855,"context_line":"            self.assertEqual(2, mocked_func.call_count)"},{"line_number":2856,"context_line":""},{"line_number":2857,"context_line":"    def test_get_service_plugin_list(self):"},{"line_number":2858,"context_line":"        self.plugin_api.get_host_ha_router_count.return_value \u003d 1"},{"line_number":2859,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":2860,"context_line":"        self.assertEqual(1, agent.ha_router_count)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_7f6b5f1d","line":2857,"range":{"start_line":2857,"start_character":8,"end_line":2857,"end_character":36},"in_reply_to":"9fdfeff1_6a95e93f","updated":"2019-01-26 10:43:51.000000000","message":"Nice catch. Done","commit_id":"fe042ef39d97f7bfcbcdd8448c3c3b274f4e3568"}]}
