)]}'
{"nova/context.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4b1331f0ec4979605c21ea671fae584252284b3d","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # It is only manipulated using the target_cell contextmanager"},{"line_number":123,"context_line":"        # provided by this module"},{"line_number":124,"context_line":"        self.db_connection \u003d None"},{"line_number":125,"context_line":"        self.cell_uuid \u003d None"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        self.user_auth_plugin \u003d user_auth_plugin"},{"line_number":128,"context_line":"        if self.is_admin is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_23a196f8","line":125,"updated":"2016-12-16 14:54:35.000000000","message":"If we\u0027re going to do this, why don\u0027t we just stash the whole cellmapping in here?\n\nI think what you\u0027ve got here means that on cold start we lookup cell mappings, grab the uuid, pass to rpc, which looks up the cellmapping again. Then it\u0027s cached for some amount of time, but we still do the double lookup seemingly for no reason.\n\nIf we stash the cellmapping here, then the act of calling rpc from a targeted api method will fill out the cache for us, right?\n\nEither way, I had assumed you\u0027d just stash the transport_url in here, and key/cache on that in the rpc layer so that if we had a transport_url already we could avoid doing the lookup since that\u0027s all we need.","commit_id":"4a3c647fa5f5e1aaf216ce7e2d9663836760fdaf"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"4c9fc7c8a858f92708da70a1207e123657dbb9e1","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # It is only manipulated using the target_cell contextmanager"},{"line_number":123,"context_line":"        # provided by this module"},{"line_number":124,"context_line":"        self.db_connection \u003d None"},{"line_number":125,"context_line":"        self.cell_uuid \u003d None"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        self.user_auth_plugin \u003d user_auth_plugin"},{"line_number":128,"context_line":"        if self.is_admin is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_67c71196","line":125,"in_reply_to":"1a6eadb0_23a196f8","updated":"2016-12-16 18:39:54.000000000","message":"I intentionally didn\u0027t put the whole CellMapping here because it contains the database and message queue usernames and passwords. We\u0027ve been avoiding placing those on the RequestContext since the context gets passed everywhere and we\u0027re limiting the scope of where the sensitive data goes. I mentioned it in a comment in nova/rpc.py but not here.\n\nYes, it means double lookup on cold start. Things stay cached as long as they\u0027ve been accessed within the stale removal timeout. I was thinking of having a much longer freshness timeout, like maybe an hour.\n\nSo far, I haven\u0027t come up with a better way to prevent passing the username/passwords around that doesn\u0027t involve creating a new rpc transport object every time target_cell is called. belliott had said that\u0027s expensive, but maybe it\u0027s less bad than this?","commit_id":"4a3c647fa5f5e1aaf216ce7e2d9663836760fdaf"}],"nova/rpc.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"4c9fc7c8a858f92708da70a1207e123657dbb9e1","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    @periodic_task.periodic_task"},{"line_number":398,"context_line":"    def _remove_stale_clients(self, context):"},{"line_number":399,"context_line":"        timeout \u003d 60"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        def stale(client_id, last_access_time):"},{"line_number":402,"context_line":"            if timeutils.is_older_than(last_access_time, timeout):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_47b695f9","line":399,"range":{"start_line":399,"start_character":8,"end_line":399,"end_character":20},"updated":"2016-12-16 18:39:54.000000000","message":"Note: If we do this, the timeout should be increased to an hour at least.","commit_id":"4a3c647fa5f5e1aaf216ce7e2d9663836760fdaf"}]}
