)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"4b9841b1e0c28a7120be89e2bdbe4c2753fad6f0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"process will recreate the network in OVN and a second metadata port"},{"line_number":14,"context_line":"would be created again."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch fixes it by looking if the metadata port already exists."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I8ae32e131d34f132b55b956119f78e6ab9fe9972"},{"line_number":19,"context_line":"Signed-off-by: Daniel Alvarez \u003cdalvarez@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7f515b1d_5508a42a","line":16,"updated":"2017-09-26 19:25:15.000000000","message":"I don\u0027t see anything in the patch checking if ports exist.  Does this commit message still reflect what the patch is doing?","commit_id":"ff28dacfa89023cae0ab3fe1e20e344ff7a1f58c"}],"networking_ovn/common/ovn_client.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"099672a21185400015f7c609fde859df6c878639","unresolved":false,"context_lines":[{"line_number":1099,"context_line":"        # Retrieve the metadata port of this network"},{"line_number":1100,"context_line":"        metadata_port \u003d self._find_metadata_port(context, network_id)"},{"line_number":1101,"context_line":"        if not metadata_port:"},{"line_number":1102,"context_line":"            if config.is_ovn_metadata_enabled():"},{"line_number":1103,"context_line":"                LOG.error(\"Metadata port couldn\u0027t be found for network %s\","},{"line_number":1104,"context_line":"                          network_id)"},{"line_number":1105,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_381afc7c","line":1102,"updated":"2017-09-25 09:29:18.000000000","message":"not clear why you do not do this check at the beginning of the method.\nwhy read the metadata port if this is not enabled?","commit_id":"f7ab1e3c5d5615ea2bc5c55a021893f6e3b556cc"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"0e204750c1196f008eb0c34400e0deb44397037b","unresolved":false,"context_lines":[{"line_number":1099,"context_line":"        # Retrieve the metadata port of this network"},{"line_number":1100,"context_line":"        metadata_port \u003d self._find_metadata_port(context, network_id)"},{"line_number":1101,"context_line":"        if not metadata_port:"},{"line_number":1102,"context_line":"            if config.is_ovn_metadata_enabled():"},{"line_number":1103,"context_line":"                LOG.error(\"Metadata port couldn\u0027t be found for network %s\","},{"line_number":1104,"context_line":"                          network_id)"},{"line_number":1105,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_73e415ad","line":1102,"in_reply_to":"7f515b1d_381afc7c","updated":"2017-09-25 10:01:42.000000000","message":"Yeah that\u0027s absolutely right :) copy\u0026paste...\nThanks","commit_id":"f7ab1e3c5d5615ea2bc5c55a021893f6e3b556cc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9fecb14ea27ae292e53bcc2e99d8c6b06a2ffc8f","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"        This function will allocate an IP address for the metadata port of"},{"line_number":1094,"context_line":"        the given network in all its IPv4 subnets."},{"line_number":1095,"context_line":"        \"\"\""},{"line_number":1096,"context_line":"        if not config.is_ovn_metadata_enabled():"},{"line_number":1097,"context_line":"            return"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        # Retrieve the metadata port of this network"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_cbfa7e41","line":1096,"updated":"2017-09-28 10:02:51.000000000","message":"But the behaviour doesn\u0027t change in the way you explain in the commit message, or did I miss something?","commit_id":"01b3b83e47213d98730a02904cc0a1aa41198475"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e41fc3e489c58755322fb4799a46517e441b5c75","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"        ports \u003d self._plugin.get_ports(context, filters\u003ddict("},{"line_number":1069,"context_line":"            network_id\u003d[network_id], device_owner\u003d[\u0027network:dhcp\u0027]))"},{"line_number":1070,"context_line":"        # There should be only one metadata port per network"},{"line_number":1071,"context_line":"        if len(ports) \u003d\u003d 1:"},{"line_number":1072,"context_line":"            return ports[0]"},{"line_number":1073,"context_line":"        if config.is_ovn_metadata_enabled():"},{"line_number":1074,"context_line":"            LOG.error(\"Metadata port couldn\u0027t be found for network %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"7f515b1d_ab286296","side":"PARENT","line":1071,"updated":"2017-09-28 10:10:10.000000000","message":"should we, may be, return the first one regardless of how many do we have? (and emit a warning?)\n\nOtherwise couldn\u0027t you end up with 3 ports if you have 2?","commit_id":"88606b821b6218fe3aab977e54215535dc2b5b98"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"50fa0e82ace280a67e842efdf9d579b0551b0ef7","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"        ports \u003d self._plugin.get_ports(context, filters\u003ddict("},{"line_number":1069,"context_line":"            network_id\u003d[network_id], device_owner\u003d[\u0027network:dhcp\u0027]))"},{"line_number":1070,"context_line":"        # There should be only one metadata port per network"},{"line_number":1071,"context_line":"        if len(ports) \u003d\u003d 1:"},{"line_number":1072,"context_line":"            return ports[0]"},{"line_number":1073,"context_line":"        if config.is_ovn_metadata_enabled():"},{"line_number":1074,"context_line":"            LOG.error(\"Metadata port couldn\u0027t be found for network %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"7f515b1d_93d94623","side":"PARENT","line":1071,"in_reply_to":"7f515b1d_06c76b98","updated":"2017-09-29 08:16:06.000000000","message":"Thanks a lot for handling that, I see what you mean, in the current state of things it\u0027d be impossible without manual DB manipulation. But I was worried about it happening if we change the way we do things in the future :)\n\nGreat! :)","commit_id":"88606b821b6218fe3aab977e54215535dc2b5b98"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ae8751d65c21403f260724234fcf599fc366fda3","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"        ports \u003d self._plugin.get_ports(context, filters\u003ddict("},{"line_number":1069,"context_line":"            network_id\u003d[network_id], device_owner\u003d[\u0027network:dhcp\u0027]))"},{"line_number":1070,"context_line":"        # There should be only one metadata port per network"},{"line_number":1071,"context_line":"        if len(ports) \u003d\u003d 1:"},{"line_number":1072,"context_line":"            return ports[0]"},{"line_number":1073,"context_line":"        if config.is_ovn_metadata_enabled():"},{"line_number":1074,"context_line":"            LOG.error(\"Metadata port couldn\u0027t be found for network %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"7f515b1d_06c76b98","side":"PARENT","line":1071,"in_reply_to":"7f515b1d_ab286296","updated":"2017-09-28 10:20:35.000000000","message":"Yes, we could do that. This scenario you mention can\u0027t really happen since a metadata port is created upon a network creation and a network can only be created once. The reason why I wrote this patch is because there\u0027s a \"corner case\" where a Logical Switch is deleted from OVN DB and not neutron (or when the NB db is totally recreated) and the metadata port would be created again. In this case, I think that the current code would suffice. However, I\u0027ll include your suggestion in my next PS so that we can rest assured :-)","commit_id":"88606b821b6218fe3aab977e54215535dc2b5b98"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"89e868b6c522ccd96e4e3de6b4a7ebf93e2e5b5c","unresolved":false,"context_lines":[{"line_number":1083,"context_line":"            return"},{"line_number":1084,"context_line":""},{"line_number":1085,"context_line":"        return self._plugin.get_ports(context, filters\u003ddict("},{"line_number":1086,"context_line":"            network_id\u003d[network_id], device_owner\u003d[\u0027network:dhcp\u0027]))"},{"line_number":1087,"context_line":""},{"line_number":1088,"context_line":"    def create_metadata_port(self, context, network_id):"},{"line_number":1089,"context_line":"        if config.is_ovn_metadata_enabled():"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_c92a4e7d","line":1086,"range":{"start_line":1086,"start_character":50,"end_line":1086,"end_character":65},"updated":"2017-10-02 10:08:25.000000000","message":"Late comment...\n\nJust like this patch https://review.openstack.org/#/c/507031, let\u0027s use the constant here for the dhcp owner.","commit_id":"2b5103e42895198f35299b7e153195750f0cc7da"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ad769534e4ba85eb8a479466e210d2bbc1f2ea1","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                         \u0027device_owner\u0027: const.DEVICE_OWNER_DHCP}}"},{"line_number":1097,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1098,"context_line":"            elif len(metadata_ports) \u003e 1:"},{"line_number":1099,"context_line":"                LOG.error(\"More than one metadata ports found for network %s. \""},{"line_number":1100,"context_line":"                          \"Please run the neutron-ovn-db-sync-util to fix it\")"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"    def update_metadata_port(self, context, network_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_57103a4e","line":1099,"range":{"start_line":1099,"start_character":74,"end_line":1099,"end_character":77},"updated":"2017-10-02 09:03:24.000000000","message":"The log is missing the network_id for this mask.\n\nAlso, does having more than one metadata port break anything ? If not, we may want to downgrade this to WARNING level.","commit_id":"2b5103e42895198f35299b7e153195750f0cc7da"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"41c2b67df0145eff89c8506e80d75b89b75bbcc5","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                         \u0027device_owner\u0027: const.DEVICE_OWNER_DHCP}}"},{"line_number":1097,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1098,"context_line":"            elif len(metadata_ports) \u003e 1:"},{"line_number":1099,"context_line":"                LOG.error(\"More than one metadata ports found for network %s. \""},{"line_number":1100,"context_line":"                          \"Please run the neutron-ovn-db-sync-util to fix it\")"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"    def update_metadata_port(self, context, network_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_e9418aa7","line":1099,"range":{"start_line":1099,"start_character":74,"end_line":1099,"end_character":77},"in_reply_to":"7f515b1d_57103a4e","updated":"2017-10-02 10:44:11.000000000","message":"Ooops :) good catch\nCurrent code assumes that there\u0027s only one metadata port and that metadata port is properly configured; ie. it has an IP address in all of the IPv4 subnets that the network has. If more than one metadata port exists for a network that\u0027s an error and the sync tool [0] would leave just one deleting the others.\nhttps://review.openstack.org/#/c/506570/","commit_id":"2b5103e42895198f35299b7e153195750f0cc7da"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e13c55a64bad63b437dbacb0a20db544282bbbb1","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"                         \u0027device_owner\u0027: const.DEVICE_OWNER_DHCP}}"},{"line_number":1097,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1098,"context_line":"            elif len(metadata_ports) \u003e 1:"},{"line_number":1099,"context_line":"                LOG.error(\"More than one metadata ports found for network %s. \""},{"line_number":1100,"context_line":"                          \"Please run the neutron-ovn-db-sync-util to fix it\")"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"    def update_metadata_port(self, context, network_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_a97ef2e0","line":1099,"range":{"start_line":1099,"start_character":74,"end_line":1099,"end_character":77},"in_reply_to":"7f515b1d_e9418aa7","updated":"2017-10-02 10:45:59.000000000","message":"Gotcha! Thanks for the explanation, let\u0027s leave it as ERROR then","commit_id":"2b5103e42895198f35299b7e153195750f0cc7da"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"50fa0e82ace280a67e842efdf9d579b0551b0ef7","unresolved":false,"context_lines":[{"line_number":1097,"context_line":"                p_utils.create_port(self._plugin, context, port)"},{"line_number":1098,"context_line":"            elif len(metadata_ports) \u003e 1:"},{"line_number":1099,"context_line":"                LOG.error(\"More than one metadata ports found for network %s. \""},{"line_number":1100,"context_line":"                          \"Please run the neutron-ovn-db-sync-util to fix it\")"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"    def update_metadata_port(self, context, network_id):"},{"line_number":1103,"context_line":"        \"\"\"Update metadata port."}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_b3f7a28b","line":1100,"updated":"2017-09-29 08:16:06.000000000","message":"nice!! :)","commit_id":"2b5103e42895198f35299b7e153195750f0cc7da"}]}
