)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"07a59088ccc15bd67dba0d28d53dde53eb1f040d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix wrong port bindings of HA router interfaces"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The disruption of the overlay network will cause the slave node of a HA"},{"line_number":10,"context_line":"router to be premoted as master but the master node will not be degraded"},{"line_number":11,"context_line":"to slave. If the newly premoted master node is degraded to slave after"},{"line_number":12,"context_line":"the network is restored, the router interface still points to the host"},{"line_number":13,"context_line":"where the slave node resides."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da6895a0_51c6d848","line":10,"range":{"start_line":10,"start_character":13,"end_line":10,"end_character":21},"updated":"2016-10-25 10:41:34.000000000","message":"promoted","commit_id":"81aad8c6e211ab9ef05a0742110a8f658f9d8635"},{"author":{"_account_id":21249,"name":"Quan Tian","email":"qtian@vmware.com","username":"tianquan"},"change_message_id":"37fa63697a660638d0406689349355edab9866eb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix wrong port bindings of HA router interfaces"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The disruption of the overlay network will cause the slave node of a HA"},{"line_number":10,"context_line":"router to be premoted as master but the master node will not be degraded"},{"line_number":11,"context_line":"to slave. If the newly premoted master node is degraded to slave after"},{"line_number":12,"context_line":"the network is restored, the router interface still points to the host"},{"line_number":13,"context_line":"where the slave node resides."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da6895a0_71903ced","line":10,"range":{"start_line":10,"start_character":13,"end_line":10,"end_character":21},"in_reply_to":"da6895a0_51c6d848","updated":"2016-10-25 10:46:11.000000000","message":"Done","commit_id":"81aad8c6e211ab9ef05a0742110a8f658f9d8635"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"07a59088ccc15bd67dba0d28d53dde53eb1f040d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The disruption of the overlay network will cause the slave node of a HA"},{"line_number":10,"context_line":"router to be premoted as master but the master node will not be degraded"},{"line_number":11,"context_line":"to slave. If the newly premoted master node is degraded to slave after"},{"line_number":12,"context_line":"the network is restored, the router interface still points to the host"},{"line_number":13,"context_line":"where the slave node resides."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da6895a0_71c11c2e","line":11,"range":{"start_line":11,"start_character":23,"end_line":11,"end_character":31},"updated":"2016-10-25 10:41:34.000000000","message":"promoted","commit_id":"81aad8c6e211ab9ef05a0742110a8f658f9d8635"},{"author":{"_account_id":21249,"name":"Quan Tian","email":"qtian@vmware.com","username":"tianquan"},"change_message_id":"37fa63697a660638d0406689349355edab9866eb","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The disruption of the overlay network will cause the slave node of a HA"},{"line_number":10,"context_line":"router to be premoted as master but the master node will not be degraded"},{"line_number":11,"context_line":"to slave. If the newly premoted master node is degraded to slave after"},{"line_number":12,"context_line":"the network is restored, the router interface still points to the host"},{"line_number":13,"context_line":"where the slave node resides."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da6895a0_91bdd06a","line":11,"range":{"start_line":11,"start_character":23,"end_line":11,"end_character":31},"in_reply_to":"da6895a0_71c11c2e","updated":"2016-10-25 10:46:11.000000000","message":"Done","commit_id":"81aad8c6e211ab9ef05a0742110a8f658f9d8635"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fd4e0dd4f29d4972c7c14822e6be556ac4bcd055","unresolved":false,"context_lines":[{"line_number":740,"context_line":"                                              {attributes.PORT: port})"},{"line_number":741,"context_line":"            except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":742,"context_line":"                    n_exc.PortNotFound):"},{"line_number":743,"context_line":"                # Take concurrently deleted interfaces in to account"},{"line_number":744,"context_line":"                pass"},{"line_number":745,"context_line":"        for port in standby_ports:"},{"line_number":746,"context_line":"            active_host \u003d self.get_active_host_for_ha_router(context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_1c79d0f6","line":743,"range":{"start_line":743,"start_character":55,"end_line":743,"end_character":60},"updated":"2016-10-25 14:37:25.000000000","message":"could you also fix this typo? \"into\"","commit_id":"ae87c04a93bd8d00798df973f97a2bb554410975"},{"author":{"_account_id":21249,"name":"Quan Tian","email":"qtian@vmware.com","username":"tianquan"},"change_message_id":"4b33d4603632914591982f4754634831561e198c","unresolved":false,"context_lines":[{"line_number":740,"context_line":"                                              {attributes.PORT: port})"},{"line_number":741,"context_line":"            except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":742,"context_line":"                    n_exc.PortNotFound):"},{"line_number":743,"context_line":"                # Take concurrently deleted interfaces in to account"},{"line_number":744,"context_line":"                pass"},{"line_number":745,"context_line":"        for port in standby_ports:"},{"line_number":746,"context_line":"            active_host \u003d self.get_active_host_for_ha_router(context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_7064ad21","line":743,"range":{"start_line":743,"start_character":55,"end_line":743,"end_character":60},"in_reply_to":"da6895a0_1c79d0f6","updated":"2016-10-25 17:06:02.000000000","message":"Done","commit_id":"ae87c04a93bd8d00798df973f97a2bb554410975"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fd4e0dd4f29d4972c7c14822e6be556ac4bcd055","unresolved":false,"context_lines":[{"line_number":752,"context_line":"                                                  {attributes.PORT: port})"},{"line_number":753,"context_line":"                except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":754,"context_line":"                        n_exc.PortNotFound):"},{"line_number":755,"context_line":"                    # Take concurrently deleted interfaces in to account"},{"line_number":756,"context_line":"                    pass"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_1c22b000","line":755,"range":{"start_line":755,"start_character":59,"end_line":755,"end_character":64},"updated":"2016-10-25 14:37:25.000000000","message":"typo: into","commit_id":"ae87c04a93bd8d00798df973f97a2bb554410975"},{"author":{"_account_id":21249,"name":"Quan Tian","email":"qtian@vmware.com","username":"tianquan"},"change_message_id":"4b33d4603632914591982f4754634831561e198c","unresolved":false,"context_lines":[{"line_number":752,"context_line":"                                                  {attributes.PORT: port})"},{"line_number":753,"context_line":"                except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":754,"context_line":"                        n_exc.PortNotFound):"},{"line_number":755,"context_line":"                    # Take concurrently deleted interfaces in to account"},{"line_number":756,"context_line":"                    pass"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_90678124","line":755,"range":{"start_line":755,"start_character":59,"end_line":755,"end_character":64},"in_reply_to":"da6895a0_1c22b000","updated":"2016-10-25 17:06:02.000000000","message":"Done","commit_id":"ae87c04a93bd8d00798df973f97a2bb554410975"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fd4e0dd4f29d4972c7c14822e6be556ac4bcd055","unresolved":false,"context_lines":[{"line_number":733,"context_line":"        standby_ports \u003d (port for port in ports"},{"line_number":734,"context_line":"            if states[port[\u0027device_id\u0027]] \u003d\u003d n_const.HA_ROUTER_STATE_STANDBY)"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"        for port in active_ports:"},{"line_number":737,"context_line":"            port[portbindings.HOST_ID] \u003d host"},{"line_number":738,"context_line":"            try:"},{"line_number":739,"context_line":"                self._core_plugin.update_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":740,"context_line":"                                              {attributes.PORT: port})"},{"line_number":741,"context_line":"            except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":742,"context_line":"                    n_exc.PortNotFound):"},{"line_number":743,"context_line":"                # Take concurrently deleted interfaces in to account"},{"line_number":744,"context_line":"                pass"},{"line_number":745,"context_line":"        for port in standby_ports:"},{"line_number":746,"context_line":"            active_host \u003d self.get_active_host_for_ha_router(context,"},{"line_number":747,"context_line":"                                                             port[\u0027device_id\u0027])"},{"line_number":748,"context_line":"            if active_host:"},{"line_number":749,"context_line":"                port[portbindings.HOST_ID] \u003d active_host"},{"line_number":750,"context_line":"                try:"},{"line_number":751,"context_line":"                    self._core_plugin.update_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":752,"context_line":"                                                  {attributes.PORT: port})"},{"line_number":753,"context_line":"                except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":754,"context_line":"                        n_exc.PortNotFound):"},{"line_number":755,"context_line":"                    # Take concurrently deleted interfaces in to account"},{"line_number":756,"context_line":"                    pass"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"def is_ha_router(router):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_dc5f583f","line":756,"range":{"start_line":736,"start_character":0,"end_line":756,"end_character":24},"updated":"2016-10-25 14:37:25.000000000","message":"This code is duplicated. It can be rewritten like:\n\n def _update_router_port(ports, active_host\u003dNone):\n     for port in ports:\n         if not active_host:\n             # NOTE: standby use-case\n             active_host \u003d self.get_active_host_for_ha_router(context, port[\u0027device_id\u0027])\n         \n         if active_host:\n             port[portbindings.HOST_ID] \u003d active_host\n             try: (...)\n             except: (...)\n\n _update_router_port(active_ports, host)\n _update_router_port(standby_ports)","commit_id":"ae87c04a93bd8d00798df973f97a2bb554410975"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"795089a1586d8dc14df6f24f2703cc91c65ff71c","unresolved":false,"context_lines":[{"line_number":733,"context_line":"        standby_ports \u003d (port for port in ports"},{"line_number":734,"context_line":"            if states[port[\u0027device_id\u0027]] \u003d\u003d n_const.HA_ROUTER_STATE_STANDBY)"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"        for port in active_ports:"},{"line_number":737,"context_line":"            port[portbindings.HOST_ID] \u003d host"},{"line_number":738,"context_line":"            try:"},{"line_number":739,"context_line":"                self._core_plugin.update_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":740,"context_line":"                                              {attributes.PORT: port})"},{"line_number":741,"context_line":"            except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":742,"context_line":"                    n_exc.PortNotFound):"},{"line_number":743,"context_line":"                # Take concurrently deleted interfaces in to account"},{"line_number":744,"context_line":"                pass"},{"line_number":745,"context_line":"        for port in standby_ports:"},{"line_number":746,"context_line":"            active_host \u003d self.get_active_host_for_ha_router(context,"},{"line_number":747,"context_line":"                                                             port[\u0027device_id\u0027])"},{"line_number":748,"context_line":"            if active_host:"},{"line_number":749,"context_line":"                port[portbindings.HOST_ID] \u003d active_host"},{"line_number":750,"context_line":"                try:"},{"line_number":751,"context_line":"                    self._core_plugin.update_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":752,"context_line":"                                                  {attributes.PORT: port})"},{"line_number":753,"context_line":"                except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":754,"context_line":"                        n_exc.PortNotFound):"},{"line_number":755,"context_line":"                    # Take concurrently deleted interfaces in to account"},{"line_number":756,"context_line":"                    pass"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"def is_ha_router(router):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_0b6500e0","line":756,"range":{"start_line":736,"start_character":0,"end_line":756,"end_character":24},"in_reply_to":"da6895a0_b06e45ff","updated":"2016-10-25 17:20:52.000000000","message":"Makes sense too. Thanks","commit_id":"ae87c04a93bd8d00798df973f97a2bb554410975"},{"author":{"_account_id":21249,"name":"Quan Tian","email":"qtian@vmware.com","username":"tianquan"},"change_message_id":"4b33d4603632914591982f4754634831561e198c","unresolved":false,"context_lines":[{"line_number":733,"context_line":"        standby_ports \u003d (port for port in ports"},{"line_number":734,"context_line":"            if states[port[\u0027device_id\u0027]] \u003d\u003d n_const.HA_ROUTER_STATE_STANDBY)"},{"line_number":735,"context_line":""},{"line_number":736,"context_line":"        for port in active_ports:"},{"line_number":737,"context_line":"            port[portbindings.HOST_ID] \u003d host"},{"line_number":738,"context_line":"            try:"},{"line_number":739,"context_line":"                self._core_plugin.update_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":740,"context_line":"                                              {attributes.PORT: port})"},{"line_number":741,"context_line":"            except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":742,"context_line":"                    n_exc.PortNotFound):"},{"line_number":743,"context_line":"                # Take concurrently deleted interfaces in to account"},{"line_number":744,"context_line":"                pass"},{"line_number":745,"context_line":"        for port in standby_ports:"},{"line_number":746,"context_line":"            active_host \u003d self.get_active_host_for_ha_router(context,"},{"line_number":747,"context_line":"                                                             port[\u0027device_id\u0027])"},{"line_number":748,"context_line":"            if active_host:"},{"line_number":749,"context_line":"                port[portbindings.HOST_ID] \u003d active_host"},{"line_number":750,"context_line":"                try:"},{"line_number":751,"context_line":"                    self._core_plugin.update_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":752,"context_line":"                                                  {attributes.PORT: port})"},{"line_number":753,"context_line":"                except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":754,"context_line":"                        n_exc.PortNotFound):"},{"line_number":755,"context_line":"                    # Take concurrently deleted interfaces in to account"},{"line_number":756,"context_line":"                    pass"},{"line_number":757,"context_line":""},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"def is_ha_router(router):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_b06e45ff","line":756,"range":{"start_line":736,"start_character":0,"end_line":756,"end_character":24},"in_reply_to":"da6895a0_dc5f583f","updated":"2016-10-25 17:06:02.000000000","message":"Thanks. Extracting a method is not necessary, use another way to prevent duplication.","commit_id":"ae87c04a93bd8d00798df973f97a2bb554410975"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"db9aa6826c8dd9f1fa8d5a54bbc43fa128cbec44","unresolved":false,"context_lines":[{"line_number":734,"context_line":"            if states[port[\u0027device_id\u0027]] \u003d\u003d n_const.HA_ROUTER_STATE_ACTIVE:"},{"line_number":735,"context_line":"                active_host \u003d host"},{"line_number":736,"context_line":"            elif states[port[\u0027device_id\u0027]] \u003d\u003d n_const.HA_ROUTER_STATE_STANDBY:"},{"line_number":737,"context_line":"                active_host \u003d self.get_active_host_for_ha_router("},{"line_number":738,"context_line":"                    context, port[\u0027device_id\u0027])"},{"line_number":739,"context_line":"            if active_host:"},{"line_number":740,"context_line":"                port[portbindings.HOST_ID] \u003d active_host"},{"line_number":741,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_6cba3870","line":738,"range":{"start_line":737,"start_character":16,"end_line":738,"end_character":47},"updated":"2016-10-29 03:15:35.000000000","message":"By your bug description, if there are more than one hosts are disconnecting from the overlay network, and if we only connect one of them, there will be more than one active hosts. If there are two or more than two active hosts, how to deal with?","commit_id":"89fe394daec7bde17a3c2949698c8ee7619b72bb"},{"author":{"_account_id":21249,"name":"Quan Tian","email":"qtian@vmware.com","username":"tianquan"},"change_message_id":"32a64d4536753161ab2d5e0003518b485523eb3d","unresolved":false,"context_lines":[{"line_number":734,"context_line":"            if states[port[\u0027device_id\u0027]] \u003d\u003d n_const.HA_ROUTER_STATE_ACTIVE:"},{"line_number":735,"context_line":"                active_host \u003d host"},{"line_number":736,"context_line":"            elif states[port[\u0027device_id\u0027]] \u003d\u003d n_const.HA_ROUTER_STATE_STANDBY:"},{"line_number":737,"context_line":"                active_host \u003d self.get_active_host_for_ha_router("},{"line_number":738,"context_line":"                    context, port[\u0027device_id\u0027])"},{"line_number":739,"context_line":"            if active_host:"},{"line_number":740,"context_line":"                port[portbindings.HOST_ID] \u003d active_host"},{"line_number":741,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_92ffa2a9","line":738,"range":{"start_line":737,"start_character":16,"end_line":738,"end_character":47},"in_reply_to":"ba5da102_6cba3870","updated":"2016-10-29 05:46:28.000000000","message":"During overlay network interruption,all slave nodes which didn\u0027t receive vrrp packet will be promoted and the last one will be bound with the router interface. Whether the ha router is reachable depends on the last promoted node is connected to overlay network  or not. \nIf the node is turning to standy and there are still two or more active hosts in db, it may not choose the right active node this round. But once network recovery, the last \"turning to slave\" or \"turing to master\" message will always correct the port binding.\nAs the bug description  said, the fix is not aiming at solving the dual-master problem during network interruption, but the state of router and the port binding of its interface after network recovery. Thanks.","commit_id":"89fe394daec7bde17a3c2949698c8ee7619b72bb"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"6455f2393a1f360dead2514ce4ca840d90c6f61d","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            if active_host:"},{"line_number":740,"context_line":"                port[portbindings.HOST_ID] \u003d active_host"},{"line_number":741,"context_line":"                try:"},{"line_number":742,"context_line":"                    self._core_plugin.update_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":743,"context_line":"                                                  {attributes.PORT: port})"},{"line_number":744,"context_line":"                except (orm.exc.StaleDataError, orm.exc.ObjectDeletedError,"},{"line_number":745,"context_line":"                        n_exc.PortNotFound):"},{"line_number":746,"context_line":"                    # Take concurrently deleted interfaces into account"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_993502dc","line":743,"range":{"start_line":742,"start_character":0,"end_line":743,"end_character":74},"updated":"2016-10-31 03:17:33.000000000","message":"Actually this only updates the DB records. Assuming that one HA router has 1 master and N standby. If overlay network triggered down and up, then there will have N masters turn to become standby. They just update the same ports N times. The required tunnels [1] is still not existed, so traffic is still not reachable.\n\n[1] https://bugs.launchpad.net/neutron/+bug/1637452","commit_id":"89fe394daec7bde17a3c2949698c8ee7619b72bb"}]}
