)]}'
{"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e284ca7dc4e8a4109d23d976d10215bc2e2d8def","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    # we need new context to make sure we use different DB"},{"line_number":120,"context_line":"                    # transaction - otherwise we may fetch same agent record"},{"line_number":121,"context_line":"                    # each time due to REPEATABLE_READ isolation level"},{"line_number":122,"context_line":"                    context \u003d n_ctx.get_admin_context()"},{"line_number":123,"context_line":"                    agent \u003d self._get_agent(context, binding.l3_agent_id)"},{"line_number":124,"context_line":"                    if agent.is_active:"},{"line_number":125,"context_line":"                        agents_back_online.add(binding.l3_agent_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_834b342b","line":122,"updated":"2016-04-04 14:26:28.000000000","message":"So if there are multiple down_bindings here in an offline state, we could instantiate many new context\u0027s here.  Is it better to do this outside the for() loop even though we might never use it?","commit_id":"991a1430d061473bdf4d5f2b27fcbca2ada11ba5"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2b612e58c469e6c9fb69c1ac2ddfbb794c1277fa","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    # we need new context to make sure we use different DB"},{"line_number":120,"context_line":"                    # transaction - otherwise we may fetch same agent record"},{"line_number":121,"context_line":"                    # each time due to REPEATABLE_READ isolation level"},{"line_number":122,"context_line":"                    context \u003d n_ctx.get_admin_context()"},{"line_number":123,"context_line":"                    agent \u003d self._get_agent(context, binding.l3_agent_id)"},{"line_number":124,"context_line":"                    if agent.is_active:"},{"line_number":125,"context_line":"                        agents_back_online.add(binding.l3_agent_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_ab4baa2a","line":122,"in_reply_to":"9a061dce_834b342b","updated":"2016-04-04 15:42:21.000000000","message":"iurc, it\u0027s not a good idea as it would create a unique session\n\nhttps://github.com/openstack/neutron/blob/master/neutron/context.py#L113-L122","commit_id":"991a1430d061473bdf4d5f2b27fcbca2ada11ba5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1f7f326541f3bce6071895b201605dbe3ae3cf05","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    # we need new context to make sure we use different DB"},{"line_number":120,"context_line":"                    # transaction - otherwise we may fetch same agent record"},{"line_number":121,"context_line":"                    # each time due to REPEATABLE_READ isolation level"},{"line_number":122,"context_line":"                    context \u003d n_ctx.get_admin_context()"},{"line_number":123,"context_line":"                    agent \u003d self._get_agent(context, binding.l3_agent_id)"},{"line_number":124,"context_line":"                    if agent.is_active:"},{"line_number":125,"context_line":"                        agents_back_online.add(binding.l3_agent_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_5cf3b20a","line":122,"in_reply_to":"9a061dce_ab4baa2a","updated":"2016-04-04 16:33:10.000000000","message":"A new session is what we actually need here, as with one session we end up staying in the same db transaction (created lazily) so we never see agents back online.","commit_id":"991a1430d061473bdf4d5f2b27fcbca2ada11ba5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e284ca7dc4e8a4109d23d976d10215bc2e2d8def","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                     \u0027agent\u0027: binding.l3_agent_id,"},{"line_number":134,"context_line":"                     \u0027dead_time\u0027: agent_dead_limit})"},{"line_number":135,"context_line":"                try:"},{"line_number":136,"context_line":"                    self.reschedule_router(context, binding.router_id)"},{"line_number":137,"context_line":"                except (l3agentscheduler.RouterReschedulingFailed,"},{"line_number":138,"context_line":"                        oslo_messaging.RemoteError):"},{"line_number":139,"context_line":"                    # Catch individual router rescheduling errors here"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_43575c02","line":136,"updated":"2016-04-04 14:26:28.000000000","message":"I just wanted to make sure the intention was to also use the new context here as well.","commit_id":"991a1430d061473bdf4d5f2b27fcbca2ada11ba5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1f7f326541f3bce6071895b201605dbe3ae3cf05","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                     \u0027agent\u0027: binding.l3_agent_id,"},{"line_number":134,"context_line":"                     \u0027dead_time\u0027: agent_dead_limit})"},{"line_number":135,"context_line":"                try:"},{"line_number":136,"context_line":"                    self.reschedule_router(context, binding.router_id)"},{"line_number":137,"context_line":"                except (l3agentscheduler.RouterReschedulingFailed,"},{"line_number":138,"context_line":"                        oslo_messaging.RemoteError):"},{"line_number":139,"context_line":"                    # Catch individual router rescheduling errors here"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_fc6286ac","line":136,"in_reply_to":"9a061dce_43575c02","updated":"2016-04-04 16:33:10.000000000","message":"the context doesn\u0027t really matter much here, basically we just need admin context in order to reschedule.","commit_id":"991a1430d061473bdf4d5f2b27fcbca2ada11ba5"}]}
