)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1c8957849ac90dc734011d85b5e3e2ec6e7edf37","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix evacuation when host dies uncleanly"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If a host crashes and ovn-controller doesn\u0027t update clean up the"},{"line_number":10,"context_line":"Port_Binding chassis column, the Logical_Switch_Port is never set"},{"line_number":11,"context_line":"to DOWN, so we do not detect the up-\u003edown transition and update the"},{"line_number":12,"context_line":"port status with the driver. This patch watches for Port_Binding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7faddb67_73efa31c","line":9,"range":{"start_line":9,"start_character":45,"end_line":9,"end_character":51},"updated":"2019-08-21 14:17:30.000000000","message":"typo?","commit_id":"924d16857c4ec210a860dc06f43259681abff1e1"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"3bab6a546f6c98aa38c21dae194884aa0d3248cf","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix evacuation when host dies uncleanly"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If a host crashes and ovn-controller doesn\u0027t update clean up the"},{"line_number":10,"context_line":"Port_Binding chassis column, the Logical_Switch_Port is never set"},{"line_number":11,"context_line":"to DOWN, so we do not detect the up-\u003edown transition and update the"},{"line_number":12,"context_line":"port status with the driver. This patch watches for Port_Binding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7faddb67_2e7ea018","line":9,"range":{"start_line":9,"start_character":45,"end_line":9,"end_character":51},"in_reply_to":"7faddb67_73efa31c","updated":"2019-08-21 15:01:04.000000000","message":"yep!","commit_id":"924d16857c4ec210a860dc06f43259681abff1e1"}],"networking_ovn/ovsdb/ovsdb_monitor.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cc2248d41252b9e85954306b9131d847d4b75cb8","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        table \u003d \u0027Port_Binding\u0027"},{"line_number":152,"context_line":"        events \u003d (self.ROW_UPDATE,)"},{"line_number":153,"context_line":"        super(PortBindingChassisUpdateEvent, self).__init__("},{"line_number":154,"context_line":"            events, table, None)"},{"line_number":155,"context_line":"        self.event_name \u003d self.__class__.__name__"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def match_fn(self, event, row, old\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_d760caa7","line":154,"updated":"2019-08-21 08:38:20.000000000","message":"Quick question: Should we add a match condition here to make sure that the port \"up\" attribute didn\u0027t change from True ?\n\nFor example: __init__(events, table,((\u0027up\u0027, \u0027\u003d\u0027, True),), old_conditions\u003d((\u0027up\u0027, \u0027\u003d\u0027, True),))","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68a69cb19c1e8501602e6c4f7096a7b56ae8d12d","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        table \u003d \u0027Port_Binding\u0027"},{"line_number":152,"context_line":"        events \u003d (self.ROW_UPDATE,)"},{"line_number":153,"context_line":"        super(PortBindingChassisUpdateEvent, self).__init__("},{"line_number":154,"context_line":"            events, table, None)"},{"line_number":155,"context_line":"        self.event_name \u003d self.__class__.__name__"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def match_fn(self, event, row, old\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ec55f81e","line":154,"in_reply_to":"7faddb67_d760caa7","updated":"2019-08-21 11:51:47.000000000","message":"If we override match_fn, it replaces the checking for conditions.","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9bcd04f90b5310aa09c8a59badf626eacb69c659","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        table \u003d \u0027Port_Binding\u0027"},{"line_number":152,"context_line":"        events \u003d (self.ROW_UPDATE,)"},{"line_number":153,"context_line":"        super(PortBindingChassisUpdateEvent, self).__init__("},{"line_number":154,"context_line":"            events, table, None)"},{"line_number":155,"context_line":"        self.event_name \u003d self.__class__.__name__"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def match_fn(self, event, row, old\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_fff4bc56","line":154,"in_reply_to":"7faddb67_ec55f81e","updated":"2019-08-21 12:05:02.000000000","message":"Oh right, I thought it was complementary","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4a8b6b5f1145fd5161763c5d568a4de4a59e8acc","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self.event_name \u003d self.__class__.__name__"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def match_fn(self, event, row, old\u003dNone):"},{"line_number":158,"context_line":"        if not row.chassis or row.chassis \u003d\u003d old.chassis:"},{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        if row.type \u003d\u003d ovn_const.OVN_CHASSIS_REDIRECT:"},{"line_number":161,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_b77d0e6e","line":158,"range":{"start_line":158,"start_character":45,"end_line":158,"end_character":56},"updated":"2019-08-21 08:35:14.000000000","message":"Should we make the old parameter mandatory since we are using it without actually checking it\u0027s type value ? The default type (None) will result in a exception here (AttributeError)","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68a69cb19c1e8501602e6c4f7096a7b56ae8d12d","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self.event_name \u003d self.__class__.__name__"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def match_fn(self, event, row, old\u003dNone):"},{"line_number":158,"context_line":"        if not row.chassis or row.chassis \u003d\u003d old.chassis:"},{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        if row.type \u003d\u003d ovn_const.OVN_CHASSIS_REDIRECT:"},{"line_number":161,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_bf02c407","line":158,"range":{"start_line":158,"start_character":45,"end_line":158,"end_character":56},"in_reply_to":"7faddb67_b77d0e6e","updated":"2019-08-21 11:51:47.000000000","message":"That\u0027s just what match_fn() looks like at the abstract level. We don\u0027t have to check on this though because we are only ROW_UPDATE type, which always sends an \u0027old\u0027. I\u0027m not sure what the rule would be for changing a method signature that is called internally by a library that we don\u0027t control (normally ovsdbapp, but we define it above because we didn\u0027t want to depend on the latest ovsdbapp). I\u0027m happy to change it, just wasn\u0027t sure about what the style rules were.","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9bcd04f90b5310aa09c8a59badf626eacb69c659","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self.event_name \u003d self.__class__.__name__"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def match_fn(self, event, row, old\u003dNone):"},{"line_number":158,"context_line":"        if not row.chassis or row.chassis \u003d\u003d old.chassis:"},{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        if row.type \u003d\u003d ovn_const.OVN_CHASSIS_REDIRECT:"},{"line_number":161,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_3fad7430","line":158,"range":{"start_line":158,"start_character":45,"end_line":158,"end_character":56},"in_reply_to":"7faddb67_bf02c407","updated":"2019-08-21 12:05:02.000000000","message":"Gotcha! Yeah it just looks like it could crash. Maybe a small comment so other people looking at this code do not see this as a potential problem ?","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4a8b6b5f1145fd5161763c5d568a4de4a59e8acc","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        if row.type \u003d\u003d ovn_const.OVN_CHASSIS_REDIRECT:"},{"line_number":161,"context_line":"            return False"},{"line_number":162,"context_line":"        lsp \u003d self.driver._nb_ovn.lookup(\u0027Logical_Switch_Port\u0027,"},{"line_number":163,"context_line":"                                         row.logical_port)"},{"line_number":164,"context_line":"        return lsp.up"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":167,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_57ddba6d","line":164,"range":{"start_line":162,"start_character":0,"end_line":164,"end_character":21},"updated":"2019-08-21 08:35:14.000000000","message":"We have seeing cases which events may take a while to be processed when the driver is under heavy load and if the port is deleted before this event kicks in it will raise a RowNotFound exception. I think we should handle it here to be on the safe side.","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68a69cb19c1e8501602e6c4f7096a7b56ae8d12d","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        if row.type \u003d\u003d ovn_const.OVN_CHASSIS_REDIRECT:"},{"line_number":161,"context_line":"            return False"},{"line_number":162,"context_line":"        lsp \u003d self.driver._nb_ovn.lookup(\u0027Logical_Switch_Port\u0027,"},{"line_number":163,"context_line":"                                         row.logical_port)"},{"line_number":164,"context_line":"        return lsp.up"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":167,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_7fdc4c44","line":164,"range":{"start_line":162,"start_character":0,"end_line":164,"end_character":21},"in_reply_to":"7faddb67_57ddba6d","updated":"2019-08-21 11:51:47.000000000","message":"I was thinking that exceptions were caught by ovsdbapp code, but that is for run() in notify_loop(), but not for notify() which is where match_fn() ultimately would stem from. That\u0027s in python-ovs code. It too wraps it in a try/except: log() already as well though https://github.com/openvswitch/ovs/blob/master/python/ovs/db/idl.py#L605\n\nIs there something custom we should do on a RowNotFound, or should we let python-ovs handle it?","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9bcd04f90b5310aa09c8a59badf626eacb69c659","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            return False"},{"line_number":160,"context_line":"        if row.type \u003d\u003d ovn_const.OVN_CHASSIS_REDIRECT:"},{"line_number":161,"context_line":"            return False"},{"line_number":162,"context_line":"        lsp \u003d self.driver._nb_ovn.lookup(\u0027Logical_Switch_Port\u0027,"},{"line_number":163,"context_line":"                                         row.logical_port)"},{"line_number":164,"context_line":"        return lsp.up"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":167,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_1f60b800","line":164,"range":{"start_line":162,"start_character":0,"end_line":164,"end_character":21},"in_reply_to":"7faddb67_7fdc4c44","updated":"2019-08-21 12:05:02.000000000","message":"Thanks for the links. I think the benefit of handling it here is that we can LOG a proper message (with the right log level) for this specific problem (e.g a warning for it). Or, if we do not want to log anything we can just ignore the RowNotFound since it\u0027s not a problem and move on.\n\nThe problem with python-ovs handling it IMHO is because it will end up logging it as an actual error [0] (the level) which (almost) always confuses operators looking at those logs.\n\n[0] https://github.com/openvswitch/ovs/blob/15b527e2dc03e2caad4c0fa3a00afd63131707e1/python/ovs/db/idl.py#L611-L612","commit_id":"75dcc1f42b2b367803cfce4b266bc2646772c42d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1c8957849ac90dc734011d85b5e3e2ec6e7edf37","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                        {\u0027port\u0027: row.logical_port, \u0027binding\u0027: row.uuid})"},{"line_number":170,"context_line":"            return False"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return lsp.up"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":175,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_f3bb930b","line":172,"updated":"2019-08-21 14:17:30.000000000","message":"I lack some OVSDB-fu here :) I looked at the OVN NB DB schema and \u0027up\u0027 is conditional boolean - does it mean if, for any reason, the up is not defined then it\u0027s treated as False ?","commit_id":"924d16857c4ec210a860dc06f43259681abff1e1"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"f8cbf6c25bece72c7a1f98d4a711995897b10f9d","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                        {\u0027port\u0027: row.logical_port, \u0027binding\u0027: row.uuid})"},{"line_number":170,"context_line":"            return False"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return lsp.up"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":175,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_0e1964cf","line":172,"in_reply_to":"7faddb67_b38afb17","updated":"2019-08-21 15:03:35.000000000","message":"Yeah, paranoid me wanted to suggest bool(lsp.up) :) I don\u0027t think it will hurt us.","commit_id":"924d16857c4ec210a860dc06f43259681abff1e1"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"3bab6a546f6c98aa38c21dae194884aa0d3248cf","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                        {\u0027port\u0027: row.logical_port, \u0027binding\u0027: row.uuid})"},{"line_number":170,"context_line":"            return False"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return lsp.up"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def run(self, event, row, old\u003dNone):"},{"line_number":175,"context_line":"        self.driver.set_port_status_up(row.logical_port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_b38afb17","line":172,"in_reply_to":"7faddb67_f3bb930b","updated":"2019-08-21 15:01:04.000000000","message":"Eagle eyes.\n\nThe best I can find in the rfc is:\n\n The operation inserts \"row\" into \"table\".  If \"row\" does not specify\n   values for all the columns in \"table\", those columns receive default\n   values.  The default value for a column depends on its type.  The\n   default for a column whose \u003ctype\u003e specifies a \"min\" of 0 is an empty\n   set or empty map.  Otherwise, the default is a single value or a\n   single key-value pair, whose value(s) depend on its \u003catomic-type\u003e:\n\n   o  \"integer\" or \"real\": 0\n\n   o  \"boolean\": false\n\n   o  \"string\": \"\" (the empty string)\n\n   o  \"uuid\": 00000000-0000-0000-0000-000000000000\n\nso it looks like the default for boolean is false, but min 0 means []. Doing:\n\n    ovn-nbctl lsp-add test_sw test_port -- list Logical_Switch_Port test_port\n\nconfirms it is briefly [], but I assume that by the time we are getting a Port_Binding event referencing the LSP that it will be set to true/false? I can add return bool(lsp.up) just to be sure I suppose.","commit_id":"924d16857c4ec210a860dc06f43259681abff1e1"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"51903fe4bd1a07c92a098a325ff7c31c17e6a860","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    If the LSP is up and the Port_Binding chassis has just changed,"},{"line_number":144,"context_line":"    there is a good chance the host died without cleaning up the chassis"},{"line_number":145,"context_line":"    column on the Port_Binding, so the port never goes down and we won\u0027t"},{"line_number":146,"context_line":"    see update the driver with the LogicalSwitchPortUpdateUpEvent."},{"line_number":147,"context_line":"    \"\"\""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def __init__(self, driver):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5faad753_85940346","line":146,"range":{"start_line":145,"start_character":30,"end_line":146,"end_character":66},"updated":"2019-09-10 01:50:19.000000000","message":"nit: can you break this into 2 sentences? I am getting a little confused about the portions that talks about \" update the driver with the LogicalSwitchPortUpdateUpEvent\".","commit_id":"6c7be6a2442b092495cc890b0c1edf3891157241"}]}
