)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab99f0cac48e7becc7a5c643ccac324e10e5a28a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Target cell on local delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This fixes an issue where we don\u0027t actually target the cell if we\u0027re"},{"line_number":10,"context_line":"doing a local delete. We might have the cell from earlier in the checks,"},{"line_number":11,"context_line":"but if not, we look it up and use it."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ff0f0b1f_dedec0d8","line":9,"updated":"2017-05-23 18:44:17.000000000","message":"Is there an actual reported bug for this? Like is this something we should be considering as a backport to Ocata?","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"28bcd2d8fb2bb7b09403459e103da32347f5cbb9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Target cell on local delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This fixes an issue where we don\u0027t actually target the cell if we\u0027re"},{"line_number":10,"context_line":"doing a local delete. We might have the cell from earlier in the checks,"},{"line_number":11,"context_line":"but if not, we look it up and use it."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ff0f0b1f_9a01576d","line":9,"in_reply_to":"ff0f0b1f_dedec0d8","updated":"2017-05-24 13:54:40.000000000","message":"No, it\u0027s only reproducible with multiple cells. I hit it with my canary patch above this (which is now the live migration fix), that depended on the devstack multicell change. It\u0027s not a problem for us now, it\u0027s just another \"multicell won\u0027t work until we fix this\" thing like the rest in this stack.\n\nYou probably don\u0027t remember, but this is the issue I was debugging at summit and you were looking over my shoulder suggesting that I wasn\u0027t even looking in the right place for where we were doing an untargeted delete operation. That was this :P\n\nI can say something about this in the commit message.","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab99f0cac48e7becc7a5c643ccac324e10e5a28a","unresolved":false,"context_lines":[{"line_number":2024,"context_line":"                # If instance is in shelved_offloaded state or compute node"},{"line_number":2025,"context_line":"                # isn\u0027t up, delete instance from db and clean bdms info and"},{"line_number":2026,"context_line":"                # network info"},{"line_number":2027,"context_line":"                if cell is None:"},{"line_number":2028,"context_line":"                    # NOTE(danms): If we didn\u0027t get our cell from one of the"},{"line_number":2029,"context_line":"                    # paths above, look it up now."},{"line_number":2030,"context_line":"                    cell, instance \u003d self._lookup_instance(context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_bebf8c5f","line":2027,"updated":"2017-05-23 18:44:17.000000000","message":"In the normal case, the instance._context is already targeted to a cell from _get_instance, so couldn\u0027t we also check that? It seems excessive to pull the instance from the DB all over again just to get the cell mapping.\n\nAlternatively, rather than use _lookup_instance, which also pulls the instance from the DB again, just get the instance mapping via instance uuid and get the cell mapping that way if you need it.","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"28bcd2d8fb2bb7b09403459e103da32347f5cbb9","unresolved":false,"context_lines":[{"line_number":2024,"context_line":"                # If instance is in shelved_offloaded state or compute node"},{"line_number":2025,"context_line":"                # isn\u0027t up, delete instance from db and clean bdms info and"},{"line_number":2026,"context_line":"                # network info"},{"line_number":2027,"context_line":"                if cell is None:"},{"line_number":2028,"context_line":"                    # NOTE(danms): If we didn\u0027t get our cell from one of the"},{"line_number":2029,"context_line":"                    # paths above, look it up now."},{"line_number":2030,"context_line":"                    cell, instance \u003d self._lookup_instance(context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_ba33fb61","line":2027,"in_reply_to":"ff0f0b1f_bebf8c5f","updated":"2017-05-24 13:54:40.000000000","message":"Pulling the instance again has the benefit of us knowing if we raced with something else, and it just mirrors what we do above. But sure, if you would prefer this to just pull the map that\u0027s fine.","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab99f0cac48e7becc7a5c643ccac324e10e5a28a","unresolved":false,"context_lines":[{"line_number":2030,"context_line":"                    cell, instance \u003d self._lookup_instance(context,"},{"line_number":2031,"context_line":"                                                           instance.uuid)"},{"line_number":2032,"context_line":"                    if not instance or not cell:"},{"line_number":2033,"context_line":"                        # NOTE(danms): If we couldn\u0027t find our instance and our"},{"line_number":2034,"context_line":"                        # cell, we can\u0027t do anything in local delete."},{"line_number":2035,"context_line":"                        return"},{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"                LOG.debug(\u0027Doing local delete in cell %s\u0027, cell.identity)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_fea86420","line":2034,"range":{"start_line":2033,"start_character":24,"end_line":2034,"end_character":69},"updated":"2017-05-23 18:44:17.000000000","message":"Wouldn\u0027t it be prudent to log something at debug here? I don\u0027t think we should really get to this, because if this is the case, I\u0027d think we\u0027d have already returned on L1899 above.","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab99f0cac48e7becc7a5c643ccac324e10e5a28a","unresolved":false,"context_lines":[{"line_number":2034,"context_line":"                        # cell, we can\u0027t do anything in local delete."},{"line_number":2035,"context_line":"                        return"},{"line_number":2036,"context_line":""},{"line_number":2037,"context_line":"                LOG.debug(\u0027Doing local delete in cell %s\u0027, cell.identity)"},{"line_number":2038,"context_line":"                with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":2039,"context_line":"                    self._local_delete(cctxt, instance, bdms, delete_type, cb)"},{"line_number":2040,"context_line":"                    quotas.commit()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_be4d4c9b","line":2037,"updated":"2017-05-23 18:44:17.000000000","message":"Add instance\u003dinstance for context on what\u0027s actually being deleted. -1 for this.","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab99f0cac48e7becc7a5c643ccac324e10e5a28a","unresolved":false,"context_lines":[{"line_number":2037,"context_line":"                LOG.debug(\u0027Doing local delete in cell %s\u0027, cell.identity)"},{"line_number":2038,"context_line":"                with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":2039,"context_line":"                    self._local_delete(cctxt, instance, bdms, delete_type, cb)"},{"line_number":2040,"context_line":"                    quotas.commit()"},{"line_number":2041,"context_line":""},{"line_number":2042,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2043,"context_line":"            # NOTE(comstud): Race condition. Instance already gone."}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_1e5e7843","line":2040,"range":{"start_line":2040,"start_character":20,"end_line":2040,"end_character":35},"updated":"2017-05-23 18:44:17.000000000","message":"Shouldn\u0027t this be outside of the context manager? Maybe it doesn\u0027t matter as the quotas object created above would be targeted to context which isn\u0027t targeted to a cell, but it\u0027s confusing.","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"28bcd2d8fb2bb7b09403459e103da32347f5cbb9","unresolved":false,"context_lines":[{"line_number":2037,"context_line":"                LOG.debug(\u0027Doing local delete in cell %s\u0027, cell.identity)"},{"line_number":2038,"context_line":"                with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":2039,"context_line":"                    self._local_delete(cctxt, instance, bdms, delete_type, cb)"},{"line_number":2040,"context_line":"                    quotas.commit()"},{"line_number":2041,"context_line":""},{"line_number":2042,"context_line":"        except exception.InstanceNotFound:"},{"line_number":2043,"context_line":"            # NOTE(comstud): Race condition. Instance already gone."}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_da7eafe2","line":2040,"range":{"start_line":2040,"start_character":20,"end_line":2040,"end_character":35},"in_reply_to":"ff0f0b1f_1e5e7843","updated":"2017-05-24 13:54:40.000000000","message":"It doesn\u0027t matter, but it happens against the cell DB so I thought it was more intuitive to put it inside.","commit_id":"161136703fe6ca93d1c8c93592c69f63884dfb5b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3a2e5a83f3f4d24dea9f1c656285cc9cdc6971da","unresolved":false,"context_lines":[{"line_number":2040,"context_line":"                LOG.debug(\u0027Doing local delete in cell %s\u0027, cell.identity,"},{"line_number":2041,"context_line":"                          instance\u003dinstance)"},{"line_number":2042,"context_line":"                with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":2043,"context_line":"                    self._local_delete(cctxt, instance, bdms, delete_type, cb)"},{"line_number":2044,"context_line":"                    quotas.commit()"},{"line_number":2045,"context_line":""},{"line_number":2046,"context_line":"        except exception.InstanceNotFound:"}],"source_content_type":"text/x-python","patch_set":11,"id":"df140735_06a32451","line":2043,"updated":"2017-05-31 22:50:28.000000000","message":"This is odd because it means the instance._context has been correctly targeted to a cell already, but the context argument we need for other local delete tasks was not targeted yet. Makes me wonder if we should just be using instance._context instead for calls like this.\n\nAnyway, just a note that we are seeing cases where instance._context !\u003d context argument passed in.","commit_id":"03364f849daec47034bef819f254725f229c046c"}]}
