)]}'
{"networking_ovn/ml2/mech_driver.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"583a3e82cc76932cb8cfd865f3cc05f3afc6a1d5","unresolved":false,"context_lines":[{"line_number":878,"context_line":"        try:"},{"line_number":879,"context_line":"            updated_at \u003d stats.AgentStats.get_stat(id_).updated_at"},{"line_number":880,"context_line":"        except ovn_exc.AgentStatsNotFound:"},{"line_number":881,"context_line":"            return False"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        if (now - updated_at).total_seconds() \u003c cfg.CONF.agent_down_time:"},{"line_number":884,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_eef34e6c","line":881,"updated":"2018-10-09 16:27:44.000000000","message":"So do we think the event processing thread where we look for matching events is delaying the updating of AgentStat stuff enough that if we really quickly create a Chassis and check agent_alive() that it is failing (even though we already got back the Row object)? I guess theoretically a chassis could be deleted after we get the row object as well...I think in either case this should be fine as the next call will have the updated state?","commit_id":"062a05ade43def985dcd735f13460a973a594939"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f5149597735fcfbb2bb319517735ad9252ee03b9","unresolved":false,"context_lines":[{"line_number":878,"context_line":"        try:"},{"line_number":879,"context_line":"            updated_at \u003d stats.AgentStats.get_stat(id_).updated_at"},{"line_number":880,"context_line":"        except ovn_exc.AgentStatsNotFound:"},{"line_number":881,"context_line":"            return False"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        if (now - updated_at).total_seconds() \u003c cfg.CONF.agent_down_time:"},{"line_number":884,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_d80abfcf","line":881,"in_reply_to":"3f79a3b5_2c161c5a","updated":"2018-10-10 12:14:05.000000000","message":"Thanks folks! Yes, as you rightly pointed out we do have some potential races in place. What this patch is doing is probably the most simple/naive way of handling such errors.\n\nA better representation would be to have a \"unknown\" value for the \"alive\" attribute that would indicate that the state of the agent is not yet known but, we can\u0027t have it since the value type must be a boolean; therefore I\u0027m just returning False (which isn\u0027t precise but not terrible either IMO).","commit_id":"062a05ade43def985dcd735f13460a973a594939"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1d155a25d07483e15d35d5b65a4d61d85379583f","unresolved":false,"context_lines":[{"line_number":878,"context_line":"        try:"},{"line_number":879,"context_line":"            updated_at \u003d stats.AgentStats.get_stat(id_).updated_at"},{"line_number":880,"context_line":"        except ovn_exc.AgentStatsNotFound:"},{"line_number":881,"context_line":"            return False"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        if (now - updated_at).total_seconds() \u003c cfg.CONF.agent_down_time:"},{"line_number":884,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_2c161c5a","line":881,"in_reply_to":"3f79a3b5_eef34e6c","updated":"2018-10-10 10:28:47.000000000","message":"Yes, a chassis can be deleted after we get the row object I\u0027d say. Also I\u0027ve got sometimes events like \"this chassis has been deleted\" and after that \"the same chassis has been updated\".\nEither way i think we should be fine as the state should be updated by then as Terry says.","commit_id":"062a05ade43def985dcd735f13460a973a594939"}]}
