)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f0bb2967cd389ee61b7bef412e71be07e4a97a03","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove up-call to API cell to delete consoleauth tokens"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"One goal of Cells v2 is to remove all up-calls from compute to API cells.  This change removes the up-call to delete consoleauth tokens during instance deletion and live migration.  Instead, the tokens are deleted near the start of these processes in the API cell.  To close the loop, new consoleauth tokens are not granted to instances in deleting or migrating task states."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ic7c68b75e22bad2b0237a2f861254611a86516f3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba5201f7_ec8ff2c9","line":9,"updated":"2017-01-04 17:09:09.000000000","message":"This needs to be fixed, wrap commit messages at 79 characters.","commit_id":"4a584adf8e7eaff9f8fe9392e9607b387b65e929"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f0bb2967cd389ee61b7bef412e71be07e4a97a03","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove up-call to API cell to delete consoleauth tokens"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"One goal of Cells v2 is to remove all up-calls from compute to API cells.  This change removes the up-call to delete consoleauth tokens during instance deletion and live migration.  Instead, the tokens are deleted near the start of these processes in the API cell.  To close the loop, new consoleauth tokens are not granted to instances in deleting or migrating task states."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ic7c68b75e22bad2b0237a2f861254611a86516f3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba5201f7_6cba2270","line":10,"updated":"2017-01-04 17:09:09.000000000","message":"Are we tracking this against an existing blueprint?","commit_id":"4a584adf8e7eaff9f8fe9392e9607b387b65e929"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"466a3ef406284649594a11884ad1c8bb9c026afb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove up-call to API cell to delete consoleauth tokens"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"One goal of Cells v2 is to remove all up-calls from compute to API cells.  This change removes the up-call to delete consoleauth tokens during instance deletion and live migration.  Instead, the tokens are deleted near the start of these processes in the API cell.  To close the loop, new consoleauth tokens are not granted to instances in deleting or migrating task states."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ic7c68b75e22bad2b0237a2f861254611a86516f3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba5201f7_39d02cf6","line":10,"in_reply_to":"ba5201f7_6cba2270","updated":"2017-01-05 16:37:22.000000000","message":"I\u0027m not sure...dansmith/melwitt?","commit_id":"4a584adf8e7eaff9f8fe9392e9607b387b65e929"}],"nova/compute/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1c6fa906a07263a1b00920a75b274212436576cf","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def check_instance_state(vm_state\u003dNone, task_state\u003d(None,),"},{"line_number":111,"context_line":"                         exclude_vm_state\u003dNone, exclude_task_state\u003dNone,"},{"line_number":112,"context_line":"                         must_have_launched\u003dTrue):"},{"line_number":113,"context_line":"    \"\"\"Decorator to check VM and/or task state before entry to API functions."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_e6538ae0","line":111,"updated":"2017-01-04 18:41:37.000000000","message":"For some reason \"exclude\" in this context doesn\u0027t make a lot of sense to me. Or rather, it\u0027s not immediately clear what that means. I wonder if it might be better to call this \"not_vm_state\u003dFOO\" or \"not_task_state\u003dBAR\" ?","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"2af7f05f316a9703bfc9c22106215eabf78214da","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def check_instance_state(vm_state\u003dNone, task_state\u003d(None,),"},{"line_number":111,"context_line":"                         exclude_vm_state\u003dNone, exclude_task_state\u003dNone,"},{"line_number":112,"context_line":"                         must_have_launched\u003dTrue):"},{"line_number":113,"context_line":"    \"\"\"Decorator to check VM and/or task state before entry to API functions."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_eebdea68","line":111,"in_reply_to":"ba5201f7_b200b102","updated":"2017-01-06 01:20:27.000000000","message":"Done\nChose to separate this to its own decorator.  What do you think?","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"98cc8f710d2e1d4e10a2b2cb8dc84b95f793ca6e","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def check_instance_state(vm_state\u003dNone, task_state\u003d(None,),"},{"line_number":111,"context_line":"                         exclude_vm_state\u003dNone, exclude_task_state\u003dNone,"},{"line_number":112,"context_line":"                         must_have_launched\u003dTrue):"},{"line_number":113,"context_line":"    \"\"\"Decorator to check VM and/or task state before entry to API functions."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_ea0b4828","line":111,"in_reply_to":"ba5201f7_e6538ae0","updated":"2017-01-04 22:58:38.000000000","message":"\"exclude\" mostly makes sense to me but I was thinking similarly, that something like disallow_*_state makes it a lot clearer what it means. I think not_*_state also gets the same point across with fewer letters.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"0d70393ee245f9da930882dc536886e1975b7b0b","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def check_instance_state(vm_state\u003dNone, task_state\u003d(None,),"},{"line_number":111,"context_line":"                         exclude_vm_state\u003dNone, exclude_task_state\u003dNone,"},{"line_number":112,"context_line":"                         must_have_launched\u003dTrue):"},{"line_number":113,"context_line":"    \"\"\"Decorator to check VM and/or task state before entry to API functions."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_b200b102","line":111,"in_reply_to":"ba5201f7_ea0b4828","updated":"2017-01-05 17:16:57.000000000","message":"Ok.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1c6fa906a07263a1b00920a75b274212436576cf","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"                quotas.commit()"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"                self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":1831,"context_line":"                    context, instance.uuid)"},{"line_number":1832,"context_line":"                return"},{"line_number":1833,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1834,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_2684b25c","line":1831,"updated":"2017-01-04 18:41:37.000000000","message":"This will only run if we\u0027re in the api cell of a cellsv1 deployment. I assume we want to run this for any delete, right? In that case, this should be de-dented one level.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"0d70393ee245f9da930882dc536886e1975b7b0b","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"                quotas.commit()"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"                self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":1831,"context_line":"                    context, instance.uuid)"},{"line_number":1832,"context_line":"                return"},{"line_number":1833,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1834,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_7ce0e296","line":1831,"in_reply_to":"ba5201f7_1d30d4e7","updated":"2017-01-05 17:16:57.000000000","message":"So cell type is going away?  How do we know whether we\u0027re in an API cell or a compute cell?\n\nWe don\u0027t want this to run in compute cells for v2, since consoleauth will only run in the top cells, right?","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"98cc8f710d2e1d4e10a2b2cb8dc84b95f793ca6e","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"                quotas.commit()"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"                self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":1831,"context_line":"                    context, instance.uuid)"},{"line_number":1832,"context_line":"                return"},{"line_number":1833,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1834,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_1d30d4e7","line":1831,"in_reply_to":"ba5201f7_2684b25c","updated":"2017-01-04 22:58:38.000000000","message":"Yeah, this needs to run for any delete except compute cell v1 cells. So I was thinking it needs to be in a separate \"if self.cell_type !\u003d \u0027compute\u0027\" block, but upon further checking, the cell_type option defaults to \u0027compute\u0027 which implies that\u0027s what it would be in a non-cells/cells v2 deployment (since we don\u0027t set cell_type in cells v2). I\u0027m not yet seeing a way we could do \"if api cell or if cells v2\" short of looking up a cell mapping or something. Hmm.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"2af7f05f316a9703bfc9c22106215eabf78214da","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"                quotas.commit()"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"                self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":1831,"context_line":"                    context, instance.uuid)"},{"line_number":1832,"context_line":"                return"},{"line_number":1833,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1834,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_2eb45280","line":1831,"in_reply_to":"ba5201f7_7ce0e296","updated":"2017-01-06 01:20:27.000000000","message":"Done\nPer IRC discussion.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1c6fa906a07263a1b00920a75b274212436576cf","unresolved":false,"context_lines":[{"line_number":3325,"context_line":""},{"line_number":3326,"context_line":"    @check_instance_host"},{"line_number":3327,"context_line":"    @check_instance_state("},{"line_number":3328,"context_line":"        exclude_task_state\u003d[task_states.DELETING, task_states.MIGRATING],"},{"line_number":3329,"context_line":"        must_have_launched\u003dFalse)"},{"line_number":3330,"context_line":"    def get_vnc_console(self, context, instance, console_type):"},{"line_number":3331,"context_line":"        \"\"\"Get a url to an instance Console.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_06e32e34","line":3328,"updated":"2017-01-04 18:41:37.000000000","message":"I haven\u0027t looked, but are you sure MIGRATING will cover cold migration, resize, and live migration?","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"0d70393ee245f9da930882dc536886e1975b7b0b","unresolved":false,"context_lines":[{"line_number":3325,"context_line":""},{"line_number":3326,"context_line":"    @check_instance_host"},{"line_number":3327,"context_line":"    @check_instance_state("},{"line_number":3328,"context_line":"        exclude_task_state\u003d[task_states.DELETING, task_states.MIGRATING],"},{"line_number":3329,"context_line":"        must_have_launched\u003dFalse)"},{"line_number":3330,"context_line":"    def get_vnc_console(self, context, instance, console_type):"},{"line_number":3331,"context_line":"        \"\"\"Get a url to an instance Console.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_fc469279","line":3328,"in_reply_to":"ba5201f7_06e32e34","updated":"2017-01-05 17:16:57.000000000","message":"I thought token deletion only occurred during live migration and deletion.  Will double check.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"2af7f05f316a9703bfc9c22106215eabf78214da","unresolved":false,"context_lines":[{"line_number":3325,"context_line":""},{"line_number":3326,"context_line":"    @check_instance_host"},{"line_number":3327,"context_line":"    @check_instance_state("},{"line_number":3328,"context_line":"        exclude_task_state\u003d[task_states.DELETING, task_states.MIGRATING],"},{"line_number":3329,"context_line":"        must_have_launched\u003dFalse)"},{"line_number":3330,"context_line":"    def get_vnc_console(self, context, instance, console_type):"},{"line_number":3331,"context_line":"        \"\"\"Get a url to an instance Console.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_cea58647","line":3328,"in_reply_to":"ba5201f7_fc469279","updated":"2017-01-06 01:20:27.000000000","message":"Done\nAs far as I can tell, live migration and deletion are the only cases where tokens are deleted.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1c6fa906a07263a1b00920a75b274212436576cf","unresolved":false,"context_lines":[{"line_number":3799,"context_line":"                                                          messaging_timeout)"},{"line_number":3800,"context_line":""},{"line_number":3801,"context_line":"        self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":3802,"context_line":"            context, instance.uuid)"},{"line_number":3803,"context_line":""},{"line_number":3804,"context_line":"    @check_instance_lock"},{"line_number":3805,"context_line":"    @check_instance_cell"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_86f63ef7","line":3802,"updated":"2017-01-04 18:41:37.000000000","message":"Why is this last? It\u0027s probably okay here, but it seems more logical to me to put it above the call that kicks this off. Anywhere after the task state change at the top of this method should be fine.\n\nAlso, looks like we still need this added to other methods that move instances, such as resize, cold migrate, and probably even shelve and evacuate.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"2af7f05f316a9703bfc9c22106215eabf78214da","unresolved":false,"context_lines":[{"line_number":3799,"context_line":"                                                          messaging_timeout)"},{"line_number":3800,"context_line":""},{"line_number":3801,"context_line":"        self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":3802,"context_line":"            context, instance.uuid)"},{"line_number":3803,"context_line":""},{"line_number":3804,"context_line":"    @check_instance_lock"},{"line_number":3805,"context_line":"    @check_instance_cell"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_8eaffe28","line":3802,"in_reply_to":"ba5201f7_3c249ac3","updated":"2017-01-06 01:20:27.000000000","message":"Done","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"98cc8f710d2e1d4e10a2b2cb8dc84b95f793ca6e","unresolved":false,"context_lines":[{"line_number":3799,"context_line":"                                                          messaging_timeout)"},{"line_number":3800,"context_line":""},{"line_number":3801,"context_line":"        self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":3802,"context_line":"            context, instance.uuid)"},{"line_number":3803,"context_line":""},{"line_number":3804,"context_line":"    @check_instance_lock"},{"line_number":3805,"context_line":"    @check_instance_cell"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_fdf07093","line":3802,"in_reply_to":"ba5201f7_86f63ef7","updated":"2017-01-04 22:58:38.000000000","message":"Agreed this should be earlier (after state change to MIGRATING). Currently in compute, tokens are only deleted when deleting instances or live migrating. Do you mean you think the way compute currently has it is missing some cases?","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"0d70393ee245f9da930882dc536886e1975b7b0b","unresolved":false,"context_lines":[{"line_number":3799,"context_line":"                                                          messaging_timeout)"},{"line_number":3800,"context_line":""},{"line_number":3801,"context_line":"        self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":3802,"context_line":"            context, instance.uuid)"},{"line_number":3803,"context_line":""},{"line_number":3804,"context_line":"    @check_instance_lock"},{"line_number":3805,"context_line":"    @check_instance_cell"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_3c249ac3","line":3802,"in_reply_to":"ba5201f7_fdf07093","updated":"2017-01-05 17:16:57.000000000","message":"Will move it up.","commit_id":"d27ca605a7a003ab01d63c7c0c95030aa3e3616a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7e1dfa73e6447792351012f1cc7bd98ea2c11c69","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    vm_state \u003d _set_or_none(vm_state)"},{"line_number":129,"context_line":"    task_state \u003d _set_or_none(task_state)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def outer(f):"},{"line_number":132,"context_line":"        @six.wraps(f)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_8589fa28","line":129,"updated":"2017-03-08 19:39:45.000000000","message":"This cleanup should ideally be in a separate patch.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"58ea93e96798d453812d7aa9c6a39773f219a388","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    vm_state \u003d _set_or_none(vm_state)"},{"line_number":129,"context_line":"    task_state \u003d _set_or_none(task_state)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def outer(f):"},{"line_number":132,"context_line":"        @six.wraps(f)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_cdb15491","line":129,"in_reply_to":"9a30ddce_8589fa28","updated":"2017-03-08 22:54:54.000000000","message":"Dropped from this patch in set 7.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7e1dfa73e6447792351012f1cc7bd98ea2c11c69","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            return f(self, context, instance, *args, **kw)"},{"line_number":153,"context_line":"        return inner"},{"line_number":154,"context_line":"    return outer"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reject_instance_state(vm_state\u003dNone, task_state\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_4578e22a","line":154,"updated":"2017-03-08 19:39:45.000000000","message":"This too.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5eca6bf4880f07515d17bc5a5e313e595af4cf46","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            return f(self, context, instance, *args, **kw)"},{"line_number":153,"context_line":"        return inner"},{"line_number":154,"context_line":"    return outer"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reject_instance_state(vm_state\u003dNone, task_state\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_b389ac28","line":154,"in_reply_to":"9a30ddce_0dac4c33","updated":"2017-03-09 23:37:05.000000000","message":"I think what dansmith meant is to split these cleanup/prep changes as-is into a separate dependent patch and then stack this patch on top of it. So you will have two patches, one containing the cleanup/prep changes and one that contains the specific handling of the upcall.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"58ea93e96798d453812d7aa9c6a39773f219a388","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            return f(self, context, instance, *args, **kw)"},{"line_number":153,"context_line":"        return inner"},{"line_number":154,"context_line":"    return outer"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reject_instance_state(vm_state\u003dNone, task_state\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_0dac4c33","line":154,"in_reply_to":"9a30ddce_4578e22a","updated":"2017-03-08 22:54:54.000000000","message":"Dropped from this patch in set 7.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"4e5f6d7cc193fd710c79fb40d2e72ad6549f17aa","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            return f(self, context, instance, *args, **kw)"},{"line_number":153,"context_line":"        return inner"},{"line_number":154,"context_line":"    return outer"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reject_instance_state(vm_state\u003dNone, task_state\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_f3ade484","line":154,"in_reply_to":"9a30ddce_b389ac28","updated":"2017-03-09 23:40:29.000000000","message":"Argh, sorry. I mistook the new reject_instance_state decorator as the cleanup of the check_instance_state decorator. I see now that you simply dropped the cleanup part.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"7fda17538e2586ce6af9516e1a6ec843bccf76da","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            return f(self, context, instance, *args, **kw)"},{"line_number":153,"context_line":"        return inner"},{"line_number":154,"context_line":"    return outer"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reject_instance_state(vm_state\u003dNone, task_state\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_b3b7ecd6","line":154,"in_reply_to":"9a30ddce_b389ac28","updated":"2017-03-09 23:43:17.000000000","message":"Ya.  I figured I would just drop the refactor of check_instance_state.  I\u0027m new here, anyway - what new guy goes around refactoring other people\u0027s code?\n\nThis way we can deal with this patch as is, and if we still want to refactor the other method, we can do that later.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"309b9716cf764aaeccf5a86763739f877f2740d9","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            return f(self, context, instance, *args, **kw)"},{"line_number":153,"context_line":"        return inner"},{"line_number":154,"context_line":"    return outer"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reject_instance_state(vm_state\u003dNone, task_state\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_33ddbce0","line":154,"in_reply_to":"9a30ddce_b3b7ecd6","updated":"2017-03-09 23:47:31.000000000","message":"Hah. We try to keep unrelated refactors and improvements contained so they hold their own throughout any reverts that might take place, and keep backports cleaner. And it makes reviewing easier. So ... fwiw.\n\nSure, makes sense. Was my bad that I read the change wrong at first.","commit_id":"b9a7115b64f54440ad074651cd1b07f73c56d69e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e33e70c036843066ad97598f0ffc4fc79d813d9a","unresolved":false,"context_lines":[{"line_number":1892,"context_line":"            if not CONF.cells.enable or self.cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":1893,"context_line":"                self.consoleauth_rpcapi.delete_tokens_for_instance("},{"line_number":1894,"context_line":"                    context, instance.uuid)"},{"line_number":1895,"context_line":""},{"line_number":1896,"context_line":"            if self.cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":1897,"context_line":"                # NOTE(comstud): If we\u0027re in the API cell, we need to"},{"line_number":1898,"context_line":"                # skip all remaining logic and just call the callback,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_d6efee1b","line":1895,"updated":"2017-03-10 00:26:00.000000000","message":"Note: So this is in the section of code that will only run for any case where instance.host is set, which makes sense since those are the only instances we can expect to have auth tokens for.","commit_id":"b0888281da5d93b78840d909e55d526746e5552d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e33e70c036843066ad97598f0ffc4fc79d813d9a","unresolved":false,"context_lines":[{"line_number":3466,"context_line":""},{"line_number":3467,"context_line":"        return {\u0027url\u0027: connect_info[\u0027access_url\u0027]}"},{"line_number":3468,"context_line":""},{"line_number":3469,"context_line":"    @check_instance_host"},{"line_number":3470,"context_line":"    def get_vnc_connect_info(self, context, instance, console_type):"},{"line_number":3471,"context_line":"        \"\"\"Used in a child cell to get console info.\"\"\""},{"line_number":3472,"context_line":"        connect_info \u003d self.compute_rpcapi.get_vnc_console(context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_969ad66c","line":3469,"updated":"2017-03-10 00:26:00.000000000","message":"I wonder if we should reject the instance states for getting the connect_info too, because if we\u0027re in these states it means we just deleted the token and are deleting or moving the instance. Does it make sense to query the driver for the connect_info and return it in those states?\n\nIt seems like the connect_info wouldn\u0027t be usable if the instance is deleting or it\u0027s moving but not yet landed at the destination.","commit_id":"b0888281da5d93b78840d909e55d526746e5552d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f123599e05587c388905d14cd53bc1adf942ec9b","unresolved":false,"context_lines":[{"line_number":3466,"context_line":""},{"line_number":3467,"context_line":"        return {\u0027url\u0027: connect_info[\u0027access_url\u0027]}"},{"line_number":3468,"context_line":""},{"line_number":3469,"context_line":"    @check_instance_host"},{"line_number":3470,"context_line":"    def get_vnc_connect_info(self, context, instance, console_type):"},{"line_number":3471,"context_line":"        \"\"\"Used in a child cell to get console info.\"\"\""},{"line_number":3472,"context_line":"        connect_info \u003d self.compute_rpcapi.get_vnc_console(context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_b170960c","line":3469,"in_reply_to":"9a30ddce_4dbee0ff","updated":"2017-03-10 23:55:15.000000000","message":"Guh, I didn\u0027t check and assumed it was a way for a user to get a connect url and was concerned it might be possible for them to get one from the migrating instance while it was at the source, then after it moves, the url is no longer good.\n\nOkay, so it\u0027s only used by cells v1. Yeah, I agree, the check in cells_api is the equivalent thing. As you pointed out, it might be possible to pass the first and fail the second, but I\u0027m not sure the net result is any different for a user.","commit_id":"b0888281da5d93b78840d909e55d526746e5552d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f6874713f704fbfa06f1e484a3336518994f97cb","unresolved":false,"context_lines":[{"line_number":3466,"context_line":""},{"line_number":3467,"context_line":"        return {\u0027url\u0027: connect_info[\u0027access_url\u0027]}"},{"line_number":3468,"context_line":""},{"line_number":3469,"context_line":"    @check_instance_host"},{"line_number":3470,"context_line":"    def get_vnc_connect_info(self, context, instance, console_type):"},{"line_number":3471,"context_line":"        \"\"\"Used in a child cell to get console info.\"\"\""},{"line_number":3472,"context_line":"        connect_info \u003d self.compute_rpcapi.get_vnc_console(context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_4dbee0ff","line":3469,"in_reply_to":"9a30ddce_969ad66c","updated":"2017-03-10 23:27:05.000000000","message":"So this is actually only used in cellsv1 it looks like? For some reason get_vnc_console() (above) is implemented in cells_api as a call to this get_vnc_connect_info() in the child.\n\nIt looks to me like we\u0027ll never get here once we\u0027re in one of those states because of the reject protections on get_vnc_console() in cells_api. Unless instance is refreshed somewhere before we pass it down to the child, a check here wouldn\u0027t buy us anything additional on top of the check that this patch adds to cells_api... right?\n\nMaybe it\u0027s a good idea to add it anyway (since it\u0027s low impact) but I\u0027m not sure we would ever pass the first one and fail the second one.","commit_id":"b0888281da5d93b78840d909e55d526746e5552d"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"19949bd38b59e61af1bea50d708fb1200b76d369","unresolved":false,"context_lines":[{"line_number":511,"context_line":"        self.compute_task_api \u003d conductor.ComputeTaskAPI()"},{"line_number":512,"context_line":"        self.is_neutron_security_groups \u003d ("},{"line_number":513,"context_line":"            openstack_driver.is_neutron_security_groups())"},{"line_number":514,"context_line":"        self.consoleauth_rpcapi \u003d consoleauth.rpcapi.ConsoleAuthAPI()"},{"line_number":515,"context_line":"        self.cells_rpcapi \u003d cells_rpcapi.CellsAPI()"},{"line_number":516,"context_line":"        self.scheduler_client \u003d scheduler_client.SchedulerClient()"},{"line_number":517,"context_line":"        self._resource_tracker \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_062a0290","side":"PARENT","line":514,"updated":"2017-03-11 19:09:45.000000000","message":"AFAICT, this is no longer used anymore and should be removed.","commit_id":"0c5d734fa605c756ea38819b8193adecebebe241"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f123599e05587c388905d14cd53bc1adf942ec9b","unresolved":false,"context_lines":[{"line_number":9470,"context_line":"              (\u0027mks\u0027, task_states.DELETING),"},{"line_number":9471,"context_line":"              (\u0027mks\u0027, task_states.MIGRATING),"},{"line_number":9472,"context_line":"              (\u0027serial\u0027, task_states.DELETING),"},{"line_number":9473,"context_line":"              (\u0027serial\u0027, task_states.MIGRATING))"},{"line_number":9474,"context_line":"    @ddt.unpack"},{"line_number":9475,"context_line":"    def test_get_console_invalid_task_state(self, console_type, task_state):"},{"line_number":9476,"context_line":"        instance \u003d self._create_fake_instance_obj("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_d1aeea2c","line":9473,"updated":"2017-03-10 23:55:15.000000000","message":"This a great situation to use ddt","commit_id":"b0888281da5d93b78840d909e55d526746e5552d"},{"author":{"_account_id":23882,"name":"Dan Peschman","email":"dpeschman@godaddy.com","username":"dtp"},"change_message_id":"357ffbc66c841ea724b2a95124ac6047ef6f15ad","unresolved":false,"context_lines":[{"line_number":9470,"context_line":"              (\u0027mks\u0027, task_states.DELETING),"},{"line_number":9471,"context_line":"              (\u0027mks\u0027, task_states.MIGRATING),"},{"line_number":9472,"context_line":"              (\u0027serial\u0027, task_states.DELETING),"},{"line_number":9473,"context_line":"              (\u0027serial\u0027, task_states.MIGRATING))"},{"line_number":9474,"context_line":"    @ddt.unpack"},{"line_number":9475,"context_line":"    def test_get_console_invalid_task_state(self, console_type, task_state):"},{"line_number":9476,"context_line":"        instance \u003d self._create_fake_instance_obj("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_1746b24e","line":9473,"in_reply_to":"9a30ddce_d1aeea2c","updated":"2017-03-11 01:43:17.000000000","message":"Thanks! :)","commit_id":"b0888281da5d93b78840d909e55d526746e5552d"}]}
