)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2a0dd62bbeb846f88b53752153d1b301269bfdc4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     hujin \u003chujin@chinac.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-26 05:59:58 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"ovs_lib.OVSBridge.get_ports_attributes returns ports attributes even port not in current ovsbridge"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This will cause the ports on the br-ex to be set with the tag attribute, and network unreachable"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa7ab95a_90afcbe2","line":7,"updated":"2016-08-26 08:50:14.000000000","message":"This should be summary of the fix, not a bug. Please fit in 50 chars","commit_id":"e16c25c1945cb82ea5712852b025dfd1520407a3"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2a0dd62bbeb846f88b53752153d1b301269bfdc4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"ovs_lib.OVSBridge.get_ports_attributes returns ports attributes even port not in current ovsbridge"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This will cause the ports on the br-ex to be set with the tag attribute, and network unreachable"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I037317c7783cfdf8feaca0b293ffe2f27a0c5d9d"},{"line_number":12,"context_line":"Closes-bug: #1616815"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa7ab95a_50f3830a","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":72},"updated":"2016-08-26 08:50:14.000000000","message":"Please format according to https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"e16c25c1945cb82ea5712852b025dfd1520407a3"}],"neutron/agent/common/ovs_lib.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"c4cc77a8c7f3d4a3fcf405c9fcd27a10ca67bb99","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                             check_error\u003dTrue, log_errors\u003dTrue,"},{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d ports or self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_b66212d7","line":383,"updated":"2016-08-26 04:42:20.000000000","message":"This does not look right.\n\nIf ports is passed as an argument, then port_names \u003d ports. So, unless I am misreading, we would then set the equivalent of port_names \u003d list(set(ports) \u0026 set(ports)) which would just be a potentially shuffled list of the same ports.\n\nThe problem, again if I am reading correctly, is that you can pass a port to get_ports_attributes that isn\u0027t on the bridge to begin with (why someone would do this, I don\u0027t know, it\u0027s definitely a bug).\n\nIt looks like we would need to always get and store the port_name_list, then filter to avoid this problem. Which I don\u0027t like doing since it is an extra transaction if you supposedly already know what ports you are interested in, but I guess we must.","commit_id":"6472a2ae5219f29454b6d4d449937c0c09b1ee03"},{"author":{"_account_id":22016,"name":"hujin","email":"guokehujin@163.com","username":"hujin"},"change_message_id":"95432b926b56ae7c5d86c883f6075cab56f2ef58","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                             check_error\u003dTrue, log_errors\u003dTrue,"},{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d ports or self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_a462d8d6","line":383,"in_reply_to":"fa7ab95a_b66212d7","updated":"2016-08-26 06:08:58.000000000","message":"Sorry, I made a mistake.\n\nI mean port_names \u003d self.get_port_name_list ().\n\nIf ports given, then filter out the values which in the port_names","commit_id":"6472a2ae5219f29454b6d4d449937c0c09b1ee03"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0786bae4dadd8dd3aaff7933f5ccf410edc38d99","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"},{"line_number":387,"context_line":"        return (self.ovsdb.db_list(table, port_names, columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_c15503c7","line":384,"range":{"start_line":384,"start_character":12,"end_line":384,"end_character":59},"updated":"2016-08-26 09:27:55.000000000","message":"is there a case where wrong ports are passed (not belonging to the bridge)?","commit_id":"4e62ab3ffe8ba1bc415763ea43b36e9708477bef"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d6c603b4735eb50ab8b29197347574763612d726","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"},{"line_number":387,"context_line":"        return (self.ovsdb.db_list(table, port_names, columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_124f38be","line":384,"range":{"start_line":384,"start_character":12,"end_line":384,"end_character":59},"in_reply_to":"fa7ab95a_a4148af5","updated":"2016-08-26 11:00:38.000000000","message":"Should we issue a warning in case someone passes port that doesn\u0027t exist on this bridge?","commit_id":"4e62ab3ffe8ba1bc415763ea43b36e9708477bef"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"8c59144ec191f7f750590eded661778a1e6097e7","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"},{"line_number":387,"context_line":"        return (self.ovsdb.db_list(table, port_names, columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_62d09954","line":384,"range":{"start_line":384,"start_character":12,"end_line":384,"end_character":59},"in_reply_to":"fa7ab95a_a4148af5","updated":"2016-08-26 16:27:53.000000000","message":"So, if I understand correctly, it sounds like in existing code this bug doesn\u0027t happen, it was just while writing a patch you created a situation where the wrong port was passed in? If there is existing code that could possibly pass the wrong port here, it should be fixed.\n\nI really don\u0027t like always adding an extra transaction, then iterating over all ports on a bridge to convert to a set, then iterating all passed in ports converting to a set, intersecting the sets, then iterating over them again to convert them back to a list--all because some other code incorrectly passed in a port that didn\u0027t belong to the bridge which we should already know.\n\nIt\u0027s especially annoying because this function would be so much easier with just the native interface--br.ports is already a list of port rows and we specifically throw away the rest of the data to match ovs-vsctl. And ovs-vsctl has the information in memory already, there\u0027s just no way to access it via the command line options available.\n\nI\u0027m looking for some kind of trick to make this better, but I doubt I find it.","commit_id":"4e62ab3ffe8ba1bc415763ea43b36e9708477bef"},{"author":{"_account_id":22016,"name":"hujin","email":"guokehujin@163.com","username":"hujin"},"change_message_id":"d235ed2dc4c7edb56a9cee76bb86d5f9f43851e0","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"},{"line_number":387,"context_line":"        return (self.ovsdb.db_list(table, port_names, columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_c1a3409d","line":384,"range":{"start_line":384,"start_character":12,"end_line":384,"end_character":59},"in_reply_to":"fa7ab95a_c15503c7","updated":"2016-08-26 10:08:36.000000000","message":"Assuming that the current bridge is br-int, but given the ports have a port on br-ex, but this method can still get the information on the port br-ex","commit_id":"4e62ab3ffe8ba1bc415763ea43b36e9708477bef"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"12d91a6943a834afe840f9f3a52cd98a129cbf55","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"},{"line_number":387,"context_line":"        return (self.ovsdb.db_list(table, port_names, columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_e4105251","line":384,"range":{"start_line":384,"start_character":12,"end_line":384,"end_character":59},"in_reply_to":"fa7ab95a_c1a3409d","updated":"2016-08-26 10:15:31.000000000","message":"Yeah, but is there a case someone is doing so?","commit_id":"4e62ab3ffe8ba1bc415763ea43b36e9708477bef"},{"author":{"_account_id":22016,"name":"hujin","email":"guokehujin@163.com","username":"hujin"},"change_message_id":"53a9e4b77341b7e3535dcb736fcd737e921d6d50","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                             if_exists\u003dFalse):"},{"line_number":382,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":383,"context_line":"        if ports:"},{"line_number":384,"context_line":"            port_names \u003d list(set(port_names) \u0026 set(ports))"},{"line_number":385,"context_line":"        if not port_names:"},{"line_number":386,"context_line":"            return []"},{"line_number":387,"context_line":"        return (self.ovsdb.db_list(table, port_names, columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_a4148af5","line":384,"range":{"start_line":384,"start_character":12,"end_line":384,"end_character":59},"in_reply_to":"fa7ab95a_e4105251","updated":"2016-08-26 10:19:57.000000000","message":"I am trying to update the database status of port on br-ex in ovs agent\nby updating method treat_devices_added_or_updated, and found the problem","commit_id":"4e62ab3ffe8ba1bc415763ea43b36e9708477bef"}]}
