)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"4416187469e178fd83af26a268c32c9bcfa2b6a4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Update OVN metadata agent health status"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Right now we don\u0027t have any mechanism to tell the status of OVN"},{"line_number":10,"context_line":"metadata agent. As we want to stay away from rabbit to report the"},{"line_number":11,"context_line":"status back to neutron server, this patch is making use of the"},{"line_number":12,"context_line":"nb_cfg mechanism described at [0]."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"3f79a3b5_1952a436","line":10,"range":{"start_line":10,"start_character":45,"end_line":10,"end_character":51},"updated":"2018-09-13 05:26:14.000000000","message":"raabitmq?","commit_id":"3c9b1703d05a534c6550d79101b9e73b18141630"}],"networking_ovn/agent/metadata/agent.py":[{"author":{"_account_id":19853,"name":"Nguyen Hung Phuong","email":"phuongnh@vn.fujitsu.com","username":"phuongnh"},"change_message_id":"4bf8fda8fdfe04d70acd4905b78dbec698fcd013","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        if row.nb_cfg and row.nb_cfg \u003e old.nb_cfg:"},{"line_number":136,"context_line":"            LOG.debug(\"NB cfg updated on SB_Global %s\", row.nb_cfg)"},{"line_number":137,"context_line":"            self.agent.sb_idl.update_metadata_health_status(self.agent.chassis,"},{"line_number":138,"context_line":"                    row.nb_cfg).execute()"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"class MetadataAgent(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_78b667fc","line":138,"updated":"2018-06-28 09:19:51.000000000","message":"Please update indent at line 138.","commit_id":"7b18aae1aa96cc0841a210dca38f00f4f2009223"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"49f2a7ab5e84ee07706f2fe7686de988ab7c5749","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def __init__(self, metadata_agent):"},{"line_number":127,"context_line":"        self.agent \u003d metadata_agent"},{"line_number":128,"context_line":"        self.first_time \u003d True"},{"line_number":129,"context_line":"        table \u003d \u0027SB_Global\u0027"},{"line_number":130,"context_line":"        events \u003d (self.ROW_UPDATE)"},{"line_number":131,"context_line":"        super(SbGlobalUpdateEvent, self).__init__(events, table, None)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_5609302e","line":128,"range":{"start_line":128,"start_character":13,"end_line":128,"end_character":23},"updated":"2018-09-07 16:42:45.000000000","message":"is first_time used for this event?","commit_id":"d925958f15da76bd54b308935a06bcc404a7b914"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"fc835490ff59366895365ecba4314ecf800abe21","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def __init__(self, metadata_agent):"},{"line_number":127,"context_line":"        self.agent \u003d metadata_agent"},{"line_number":128,"context_line":"        self.first_time \u003d True"},{"line_number":129,"context_line":"        table \u003d \u0027SB_Global\u0027"},{"line_number":130,"context_line":"        events \u003d (self.ROW_UPDATE)"},{"line_number":131,"context_line":"        super(SbGlobalUpdateEvent, self).__init__(events, table, None)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_6f71caa8","line":128,"range":{"start_line":128,"start_character":13,"end_line":128,"end_character":23},"in_reply_to":"3f79a3b5_5609302e","updated":"2018-09-10 17:58:16.000000000","message":"opss leftover! thanks :)","commit_id":"d925958f15da76bd54b308935a06bcc404a7b914"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"49f2a7ab5e84ee07706f2fe7686de988ab7c5749","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.event_name \u003d \u0027SbGlobalUpdateEvent\u0027"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def run(self, event, row, old):"},{"line_number":135,"context_line":"        if row.nb_cfg and row.nb_cfg \u003e old.nb_cfg:"},{"line_number":136,"context_line":"            self.agent.sb_idl.update_metadata_health_status("},{"line_number":137,"context_line":"                self.agent.chassis, row.nb_cfg).execute()"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_b99bd7c6","line":135,"updated":"2018-09-07 16:42:45.000000000","message":"we probably don\u0027t have to worry about the value rolling over the integer boundary, but technically anyone can change nb_cfg to whatever they want. So if nb_cfg was at 100 and for some reason someone wrote to the field and set it to 5, we\u0027d ignore that change until it was then updated to 6. So I\u0027m not sure we need to put the condition and can just update to whatever the value is so that it always matches the other nb_cfg values.","commit_id":"d925958f15da76bd54b308935a06bcc404a7b914"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"fc835490ff59366895365ecba4314ecf800abe21","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.event_name \u003d \u0027SbGlobalUpdateEvent\u0027"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def run(self, event, row, old):"},{"line_number":135,"context_line":"        if row.nb_cfg and row.nb_cfg \u003e old.nb_cfg:"},{"line_number":136,"context_line":"            self.agent.sb_idl.update_metadata_health_status("},{"line_number":137,"context_line":"                self.agent.chassis, row.nb_cfg).execute()"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_cf5fbe0d","line":135,"in_reply_to":"3f79a3b5_b99bd7c6","updated":"2018-09-10 17:58:16.000000000","message":"Yes you\u0027re right. We added this because tests weren\u0027t starting northd properly so we were getting updates of nb_cfg like 1 then 2 then again 1. But you fixed this already :)","commit_id":"d925958f15da76bd54b308935a06bcc404a7b914"}],"networking_ovn/ovsdb/impl_idl_ovn.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"eea46d57ca1b6db8ae1055d1b45cf6614bbb6d03","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                ip_address in r.mac[0].split(\u0027 \u0027)]"},{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_metadata_health_status(self, chassis, nb_cfg):"},{"line_number":740,"context_line":"        # TODO(twilson) This could just use DbSetCommand"},{"line_number":741,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":742,"context_line":"            self, chassis, {\u0027ovn-metadata-sb-cfg\u0027: str(nb_cfg)},"},{"line_number":743,"context_line":"            if_exists\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_af09122c","line":740,"updated":"2018-06-28 10:40:06.000000000","message":"Hmm why we are not using it then ? ovsdbapp version we depend on ?","commit_id":"35a8417dca93bb294e167c26eb0ac8bf6a250b75"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"fc835490ff59366895365ecba4314ecf800abe21","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                ip_address in r.mac[0].split(\u0027 \u0027)]"},{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_metadata_health_status(self, chassis, nb_cfg):"},{"line_number":740,"context_line":"        # TODO(twilson) This could just use DbSetCommand"},{"line_number":741,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":742,"context_line":"            self, chassis, {\u0027ovn-metadata-sb-cfg\u0027: str(nb_cfg)},"},{"line_number":743,"context_line":"            if_exists\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_0f705673","line":740,"in_reply_to":"3f79a3b5_a7b0a941","updated":"2018-09-10 17:58:16.000000000","message":"Looking into this with Terry, db_set is actually doing it so it won\u0027t buy anything. We can look into changing it in a different patch:\nhttps://github.com/openstack/ovsdbapp/blob/f15d014fc7cb4111c132e7e2b3b3f35e0dbf5e82/ovsdbapp/backend/ovs_idl/command.py#L117-L123","commit_id":"35a8417dca93bb294e167c26eb0ac8bf6a250b75"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"f2089d65614105e8598551616f46b21a6e310e26","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                ip_address in r.mac[0].split(\u0027 \u0027)]"},{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_metadata_health_status(self, chassis, nb_cfg):"},{"line_number":740,"context_line":"        # TODO(twilson) This could just use DbSetCommand"},{"line_number":741,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":742,"context_line":"            self, chassis, {\u0027ovn-metadata-sb-cfg\u0027: str(nb_cfg)},"},{"line_number":743,"context_line":"            if_exists\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_56d337d4","line":740,"in_reply_to":"5f7c97a3_252e838c","updated":"2018-06-28 14:22:17.000000000","message":"I originally intended people to use generic db operations whenever possible. So instead of having a command for updating external_ids on X, you\u0027d just do DbSetCommand(table\u003dx, \u0027external_ids\u0027, ...) or db_set() etc.\n\nThen, when writing the NB stuff, a lot of the individual commands that I was wrapping from ovn-nbctl updated specific fields (lsp_set_enabled/LspSetEnabledCommand) etc. I should have just returned db_set(...) in api.lsp_set_enabled, but I didn\u0027t. And people followed my bad example, and now it is pretty common to have a lot of useless commands. So, basically, I led people astray and gave up.","commit_id":"35a8417dca93bb294e167c26eb0ac8bf6a250b75"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"1052ac66e476bb68fe070260fd80b77fd7c9fbac","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                ip_address in r.mac[0].split(\u0027 \u0027)]"},{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_metadata_health_status(self, chassis, nb_cfg):"},{"line_number":740,"context_line":"        # TODO(twilson) This could just use DbSetCommand"},{"line_number":741,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":742,"context_line":"            self, chassis, {\u0027ovn-metadata-sb-cfg\u0027: str(nb_cfg)},"},{"line_number":743,"context_line":"            if_exists\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_a7b0a941","line":740,"in_reply_to":"5f7c97a3_513901cd","updated":"2018-09-06 17:50:00.000000000","message":"It is possible to use db_set like below. We don\u0027t need to copy the current external_ids, modify and set it back\n\nmetadata_nb_cfg \u003d {\u0027ovn-metadata-sb-cfg\u0027: str(nb_cfg)}\nself.ovn_nbdb_api.db_set(\n            \u0027Chassis\u0027, chassis_uuid,\n            (\u0027external_ids\u0027, metadata_nb_cfg)))\n\nwhich is equivalent to\novn-sbctl set chassis chassis_uuid external_ids:ovn-metadata-sb-cfg\u003d2","commit_id":"35a8417dca93bb294e167c26eb0ac8bf6a250b75"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"307339318e2fda3799a42b3153adfad8f04a47bc","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                ip_address in r.mac[0].split(\u0027 \u0027)]"},{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_metadata_health_status(self, chassis, nb_cfg):"},{"line_number":740,"context_line":"        # TODO(twilson) This could just use DbSetCommand"},{"line_number":741,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":742,"context_line":"            self, chassis, {\u0027ovn-metadata-sb-cfg\u0027: str(nb_cfg)},"},{"line_number":743,"context_line":"            if_exists\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_513901cd","line":740,"in_reply_to":"5f7c97a3_56d337d4","updated":"2018-06-28 14:31:35.000000000","message":"Hahah fair enough. I think the main point here is that the comment says that we can use DbSetCommand but in reality we can not [0] because we want to append a value to external_ids instead of overwriting external_ids with a new value (based on the link that @daniel provided of the current implementation). So I would just delete the comment to be honest.\n\nI just pointed it out here cause the comment was vague as to why we are not using that new command if we should, u know ? But it\u0027s a nit... I would prefer to not have the comment cause it just causes confusion.\n\n[0] I know it can be workarounded by copying the current external_ids from the object, appending the new value and then replacing the whole thing using the new command.","commit_id":"35a8417dca93bb294e167c26eb0ac8bf6a250b75"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ba39bc277e162d66da686747f01a5344238f85aa","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                ip_address in r.mac[0].split(\u0027 \u0027)]"},{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def update_metadata_health_status(self, chassis, nb_cfg):"},{"line_number":740,"context_line":"        # TODO(twilson) This could just use DbSetCommand"},{"line_number":741,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":742,"context_line":"            self, chassis, {\u0027ovn-metadata-sb-cfg\u0027: str(nb_cfg)},"},{"line_number":743,"context_line":"            if_exists\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_252e838c","line":740,"in_reply_to":"5f7c97a3_af09122c","updated":"2018-06-28 12:18:40.000000000","message":"as discussed, maybe the comment is wrong as DbSetCommand would overwrite the whole external_ids if i\u0027m not mistaken:\nhttps://github.com/openstack/ovsdbapp/blob/476b174f7d303c501fa2f3b91efda659ed9b9f3d/ovsdbapp/backend/ovs_idl/command.py#L123","commit_id":"35a8417dca93bb294e167c26eb0ac8bf6a250b75"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d02ace6010cdc66b52e9f3b7de69fb62523dc45b","unresolved":false,"context_lines":[{"line_number":758,"context_line":"    def update_metadata_health_status(self, chassis, nb_cfg):"},{"line_number":759,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":760,"context_line":"            self, chassis,"},{"line_number":761,"context_line":"            {ovn_const.OVN_AGENT_METADATA_SB_CFG_KEY: str(nb_cfg)},"},{"line_number":762,"context_line":"            if_exists\u003dTrue)"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"    def set_port_cidrs(self, name, cidrs):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f79a3b5_b5e48fa9","line":761,"updated":"2018-09-17 14:04:19.000000000","message":"I wonder if we should also register the timestamp here, similar to what we do at [0] so we can compare it later.\n\n[0] https://review.openstack.org/#/c/585027/","commit_id":"24a871a1271c23d05b57a0e5f85441eb6d2e9f5e"}],"networking_ovn/tests/functional/test_metadata_agent.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"6bdeb520a00dc143f0befbd5de1d1bcb5429b782","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # Assert that the metadata agent now populated the external_ids"},{"line_number":78,"context_line":"        # from the chassis with the nb_cfg"},{"line_number":79,"context_line":"        self.assertTrue(chassis_row[\u0027external_ids\u0027]["},{"line_number":80,"context_line":"            ovn_const.OVN_AGENT_METADATA_SB_CFG_KEY] \u003e 0)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_861f3859","line":80,"updated":"2018-07-25 01:11:55.000000000","message":"This is comparing a string to an int, since values in external_ids are defined as strings.","commit_id":"9d1e8709c130dbfe36ca557560841bc2eec79097"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a4de713d282e29b93b0e72d28298a29f4e5c4c01","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # Assert that the metadata agent now populated the external_ids"},{"line_number":78,"context_line":"        # from the chassis with the nb_cfg"},{"line_number":79,"context_line":"        self.assertTrue(chassis_row[\u0027external_ids\u0027]["},{"line_number":80,"context_line":"            ovn_const.OVN_AGENT_METADATA_SB_CFG_KEY] \u003e 0)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_9c25445e","line":80,"in_reply_to":"5f7c97a3_861f3859","updated":"2018-07-25 08:28:10.000000000","message":"Ouch, thanks!","commit_id":"9d1e8709c130dbfe36ca557560841bc2eec79097"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"8a1d6934f52ed0237e34f73d0ac9d955eb90c051","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self.assertNotIn(ovn_const.OVN_AGENT_METADATA_SB_CFG_KEY,"},{"line_number":69,"context_line":"                         chassis_row[\u0027external_ids\u0027])"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        self._make_network(self.fmt, \u0027n1\u0027, True)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        chassis_row \u003d self.sb_api.db_find("},{"line_number":74,"context_line":"            \u0027Chassis\u0027, (\u0027name\u0027, \u0027\u003d\u0027, self.chassis_name)).execute("}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_424d086f","line":71,"range":{"start_line":71,"start_character":13,"end_line":71,"end_character":26},"updated":"2018-07-31 15:38:56.000000000","message":"Creating a network will cause transactions to NB database which will result","commit_id":"4f53bf87d8ffb02761bdaabd9f8ae3f2f621ad66"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"1052ac66e476bb68fe070260fd80b77fd7c9fbac","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # Assert that the metadata agent now populated the external_ids"},{"line_number":88,"context_line":"        # from the chassis with the nb_cfg"},{"line_number":89,"context_line":"        self.assertTrue(int(chassis_row[\u0027external_ids\u0027]["},{"line_number":90,"context_line":"            ovn_const.OVN_AGENT_METADATA_SB_CFG_KEY]) \u003e 0)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_8cffd400","line":90,"updated":"2018-09-06 17:50:00.000000000","message":"Why not assertEqual to 2 ?","commit_id":"d925958f15da76bd54b308935a06bcc404a7b914"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"4416187469e178fd83af26a268c32c9bcfa2b6a4","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        # and make ovn-controller copy it over to SB_Global. Upon this event,"},{"line_number":79,"context_line":"        # Metadata agent will update the external_ids on its Chassis row to"},{"line_number":80,"context_line":"        # signal that it\u0027s healthy."},{"line_number":81,"context_line":"        self._make_network(self.fmt, \u0027n1\u0027, True)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        chassis_row \u003d self.sb_api.db_find("},{"line_number":84,"context_line":"            \u0027Chassis\u0027, (\u0027name\u0027, \u0027\u003d\u0027, self.chassis_name)).execute("}],"source_content_type":"text/x-python","patch_set":18,"id":"3f79a3b5_3c950e89","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":48},"updated":"2018-09-13 05:26:14.000000000","message":"no cleanup required?","commit_id":"3c9b1703d05a534c6550d79101b9e73b18141630"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"657992dfcf5d69dcf2196eea6514156604ae89df","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        # and make ovn-controller copy it over to SB_Global. Upon this event,"},{"line_number":79,"context_line":"        # Metadata agent will update the external_ids on its Chassis row to"},{"line_number":80,"context_line":"        # signal that it\u0027s healthy."},{"line_number":81,"context_line":"        self._make_network(self.fmt, \u0027n1\u0027, True)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        chassis_row \u003d self.sb_api.db_find("},{"line_number":84,"context_line":"            \u0027Chassis\u0027, (\u0027name\u0027, \u0027\u003d\u0027, self.chassis_name)).execute("}],"source_content_type":"text/x-python","patch_set":18,"id":"3f79a3b5_842b9931","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":48},"in_reply_to":"3f79a3b5_3c950e89","updated":"2018-09-17 15:02:50.000000000","message":"i don\u0027t think it\u0027s required (no other tests clean it up either). I assume that it gets deleted automatically because i\u0027m using the test helpers to create it. :?","commit_id":"3c9b1703d05a534c6550d79101b9e73b18141630"}]}
