)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ce0f2c35a03e0f1aa95a20f3ead5adf47932fa78","unresolved":false,"context_lines":[{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affect by this call"},{"line_number":14,"context_line":"path most probably becase evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch replaces remove_provider_from_instance_allocation() with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3f79a3b5_18b82510","line":14,"range":{"start_line":14,"start_character":19,"end_line":14,"end_character":25},"updated":"2018-10-11 08:07:36.000000000","message":"because","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd118677f4f4472ea7941735b9bac250901dea10","unresolved":false,"context_lines":[{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affect by this call"},{"line_number":14,"context_line":"path most probably becase evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch replaces remove_provider_from_instance_allocation() with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3f79a3b5_5fb8b510","line":14,"range":{"start_line":14,"start_character":19,"end_line":14,"end_character":25},"in_reply_to":"3f79a3b5_18b82510","updated":"2018-10-11 15:00:33.000000000","message":"Done","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ce0f2c35a03e0f1aa95a20f3ead5adf47932fa78","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch replaces remove_provider_from_instance_allocation() with"},{"line_number":18,"context_line":"remove_provider_tree_from_instance_allocation() and as the name suggests"},{"line_number":19,"context_line":"this call removes allocation agains the RP tree. After this change most"},{"line_number":20,"context_line":"of the evacuation functional tests passes without resource leak, except"},{"line_number":21,"context_line":"force evacuation. That will be handled in a subsequent patch."},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3f79a3b5_d8338dc3","line":19,"range":{"start_line":19,"start_character":29,"end_line":19,"end_character":35},"updated":"2018-10-11 08:07:36.000000000","message":"against","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd118677f4f4472ea7941735b9bac250901dea10","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch replaces remove_provider_from_instance_allocation() with"},{"line_number":18,"context_line":"remove_provider_tree_from_instance_allocation() and as the name suggests"},{"line_number":19,"context_line":"this call removes allocation agains the RP tree. After this change most"},{"line_number":20,"context_line":"of the evacuation functional tests passes without resource leak, except"},{"line_number":21,"context_line":"force evacuation. That will be handled in a subsequent patch."},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3f79a3b5_1f347dab","line":19,"range":{"start_line":19,"start_character":29,"end_line":19,"end_character":35},"in_reply_to":"3f79a3b5_d8338dc3","updated":"2018-10-11 15:00:33.000000000","message":"Done","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affect by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3f79a3b5_6f7b5ff2","line":13,"range":{"start_line":13,"start_character":53,"end_line":13,"end_character":59},"updated":"2018-10-12 22:13:04.000000000","message":"affected","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affect by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3f79a3b5_a9a08292","line":13,"range":{"start_line":13,"start_character":53,"end_line":13,"end_character":59},"in_reply_to":"3f79a3b5_6f7b5ff2","updated":"2018-10-15 08:44:52.000000000","message":"Done","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aed0df002b1f1584ba3fc558ac81d480bb2620a9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-10-15 11:12:40 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Consider nested allocations during allocation cleanup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova calls remove_provider_from_instance_allocation() in couple of"},{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_9a99a97b","line":7,"range":{"start_line":7,"start_character":9,"end_line":7,"end_character":27},"updated":"2018-10-22 16:57:44.000000000","message":"I mentioned this in a previous revision, but there\u0027s no such thing as a \"nested allocation\". There is such a thing as an allocation that consumes from multiple providers, some of which are child resource providers.\n\nIf we\u0027re going to create a new term called \"nested allocation\" then we should define this in our documentation. Or, just refer to it by the more explicit, if verbose, \"allocation involving child providers\".","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-10-15 11:12:40 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Consider nested allocations during allocation cleanup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova calls remove_provider_from_instance_allocation() in couple of"},{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_f0ae8e7e","line":7,"range":{"start_line":7,"start_character":9,"end_line":7,"end_character":27},"in_reply_to":"3f79a3b5_9a99a97b","updated":"2018-10-24 14:23:05.000000000","message":"Unfortunately \"allocation involving child providers\" is longer than what I happy to type each time. Will you be OK with adding \"nested allocation\" as terminology in [1]?\n\n[1] https://github.com/openstack/placement/blob/master/doc/source/usage/provider-tree.rst","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aed0df002b1f1584ba3fc558ac81d480bb2620a9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova calls remove_provider_from_instance_allocation() in couple of"},{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_3a82d500","line":11,"range":{"start_line":11,"start_character":20,"end_line":11,"end_character":43},"updated":"2018-10-22 16:57:44.000000000","message":"s/nested compute RP trees/provider trees with child providers/","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova calls remove_provider_from_instance_allocation() in couple of"},{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_b065764b","line":11,"range":{"start_line":11,"start_character":20,"end_line":11,"end_character":43},"in_reply_to":"3f79a3b5_3a82d500","updated":"2018-10-24 14:23:05.000000000","message":"Done","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova calls remove_provider_from_instance_allocation() in couple of"},{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_84d3c763","line":12,"range":{"start_line":11,"start_character":45,"end_line":12,"end_character":50},"updated":"2018-10-18 20:36:32.000000000","message":"At first I thought it seemed odd that you could remove allocations from the parent provider but not the children, but the allocations are keyed by provider and don\u0027t really have any kind of relationship per se for the allocation, so yeah I guess it makes sense.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb0a83fa85df640708693245655903b287e15a9f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova calls remove_provider_from_instance_allocation() in couple of"},{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_6abd1566","line":12,"range":{"start_line":11,"start_character":45,"end_line":12,"end_character":50},"in_reply_to":"3f79a3b5_84d3c763","updated":"2018-10-18 20:57:13.000000000","message":"Right, you can\u0027t remove a parent provider while it has child providers, but allocations aren\u0027t tied together across providers (except by consumer).","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_44ddaf6b","line":13,"range":{"start_line":13,"start_character":6,"end_line":13,"end_character":22},"updated":"2018-10-18 20:36:32.000000000","message":"Is this referring to something earlier in the series? We\u0027ve lost context at this point - would have been better to mention the actual test name, or a change ID, something like that for reference.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9bbac806610de5055431d1182baa73624366edd","unresolved":false,"context_lines":[{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_aadb2de8","line":13,"range":{"start_line":13,"start_character":6,"end_line":13,"end_character":22},"in_reply_to":"3f79a3b5_44ddaf6b","updated":"2018-10-18 20:39:43.000000000","message":"Oh I see, ServerMovingTestsWithNestedResourceRequests in this change.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"},{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_7044be9f","line":13,"range":{"start_line":13,"start_character":6,"end_line":13,"end_character":22},"in_reply_to":"3f79a3b5_aadb2de8","updated":"2018-10-24 14:23:05.000000000","message":"Clarified","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aed0df002b1f1584ba3fc558ac81d480bb2620a9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch replaces remove_provider_from_instance_allocation() with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_fa98dd67","line":14,"range":{"start_line":14,"start_character":5,"end_line":14,"end_character":19},"updated":"2018-10-22 16:57:44.000000000","message":"s/most probably// :)","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":11,"context_line":"allocations against nested compute RP trees. This leads to leaking"},{"line_number":12,"context_line":"allocations on the child providers during cleanup. As the functional"},{"line_number":13,"context_line":"tests previously shown mostly evacuation is directly affected by this call"},{"line_number":14,"context_line":"path most probably because evacuation still uses the instance_uuid as the"},{"line_number":15,"context_line":"consumer for both the source host and the destination host allocation."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch replaces remove_provider_from_instance_allocation() with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f79a3b5_b0d336d3","line":14,"range":{"start_line":14,"start_character":5,"end_line":14,"end_character":19},"in_reply_to":"3f79a3b5_fa98dd67","updated":"2018-10-24 14:23:05.000000000","message":"Done","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"48725ae718a9fa31564784a2d0ef8edaa8999b53","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-10-24 17:38:06 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Consider allocations invovling child providers during allocation cleanup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova calls remove_provider_from_instance_allocation() in couple of"},{"line_number":10,"context_line":"cleanup cases. As the name of the function suggests this does not handle"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3f79a3b5_11df8238","line":7,"range":{"start_line":7,"start_character":21,"end_line":7,"end_character":30},"updated":"2018-10-24 20:41:41.000000000","message":"involving","commit_id":"66297f0c4ac99e38d9cf1cb3fbeb6fbaa93217c6"}],"nova/compute/manager.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ce0f2c35a03e0f1aa95a20f3ead5adf47932fa78","unresolved":false,"context_lines":[{"line_number":711,"context_line":"            if not self.reportclient.\\"},{"line_number":712,"context_line":"                    remove_provider_tree_from_instance_allocation("},{"line_number":713,"context_line":"                context, instance.uuid, cn_uuid):"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"                LOG.error(\"Failed to clean allocation of evacuated instance \""},{"line_number":716,"context_line":"                          \"on the source node %s\","},{"line_number":717,"context_line":"                          cn_uuid, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_58cd3d5c","line":714,"updated":"2018-10-11 08:07:36.000000000","message":"unnecessary space.","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd118677f4f4472ea7941735b9bac250901dea10","unresolved":false,"context_lines":[{"line_number":711,"context_line":"            if not self.reportclient.\\"},{"line_number":712,"context_line":"                    remove_provider_tree_from_instance_allocation("},{"line_number":713,"context_line":"                context, instance.uuid, cn_uuid):"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"                LOG.error(\"Failed to clean allocation of evacuated instance \""},{"line_number":716,"context_line":"                          \"on the source node %s\","},{"line_number":717,"context_line":"                          cn_uuid, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_bf44691a","line":714,"in_reply_to":"3f79a3b5_58cd3d5c","updated":"2018-10-11 15:00:33.000000000","message":"Done","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"98c9f9a4a8c2c6dca4819091126c12e9abb403b4","unresolved":false,"context_lines":[{"line_number":3985,"context_line":"                         {\u0027node\u0027: nodename, \u0027mig\u0027: migration.uuid})"},{"line_number":3986,"context_line":"                return"},{"line_number":3987,"context_line":""},{"line_number":3988,"context_line":"        # TODO(danms): Remove below this line when we remove compatibility"},{"line_number":3989,"context_line":"        # for double-accounting migrations (likely rocky)"},{"line_number":3990,"context_line":"        LOG.info(_(\u0027Doing legacy allocation math for migration %(mig)s after \u0027"},{"line_number":3991,"context_line":"                   \u0027instance move\u0027),"},{"line_number":3992,"context_line":"                 {\u0027mig\u0027: migration.uuid},"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_2ef81f7c","line":3989,"range":{"start_line":3988,"start_character":0,"end_line":3989,"end_character":57},"updated":"2018-10-12 08:27:08.000000000","message":"But wait, if we are now having all the cases via the migration.uuid method, then that sounds we can remove the following L3988-L4088 operations according to this comment, no? I would be relieved if it is clarified explicitly in the code comment that in which cases we reach here.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6af8bf07798fc7fab090841fa0a23e0fe9a5868b","unresolved":false,"context_lines":[{"line_number":3985,"context_line":"                         {\u0027node\u0027: nodename, \u0027mig\u0027: migration.uuid})"},{"line_number":3986,"context_line":"                return"},{"line_number":3987,"context_line":""},{"line_number":3988,"context_line":"        # TODO(danms): Remove below this line when we remove compatibility"},{"line_number":3989,"context_line":"        # for double-accounting migrations (likely rocky)"},{"line_number":3990,"context_line":"        LOG.info(_(\u0027Doing legacy allocation math for migration %(mig)s after \u0027"},{"line_number":3991,"context_line":"                   \u0027instance move\u0027),"},{"line_number":3992,"context_line":"                 {\u0027mig\u0027: migration.uuid},"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_5d966b3f","line":3989,"range":{"start_line":3988,"start_character":0,"end_line":3989,"end_character":57},"in_reply_to":"3f79a3b5_2ef81f7c","updated":"2018-10-12 10:02:27.000000000","message":"There is still one case when migration.uuid is not used. It is evacuate. This is why we also have a bunch of code in claim_resources [1] as well\n\n[1] https://github.com/openstack/nova/blob/c217d4dc957dcf7b4908ccb540a15a24888449a2/nova/scheduler/client/report.py#L1803-L1827","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"98c9f9a4a8c2c6dca4819091126c12e9abb403b4","unresolved":false,"context_lines":[{"line_number":3987,"context_line":""},{"line_number":3988,"context_line":"        # TODO(danms): Remove below this line when we remove compatibility"},{"line_number":3989,"context_line":"        # for double-accounting migrations (likely rocky)"},{"line_number":3990,"context_line":"        LOG.info(_(\u0027Doing legacy allocation math for migration %(mig)s after \u0027"},{"line_number":3991,"context_line":"                   \u0027instance move\u0027),"},{"line_number":3992,"context_line":"                 {\u0027mig\u0027: migration.uuid},"},{"line_number":3993,"context_line":"                 instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_ae266fcb","line":3990,"range":{"start_line":3990,"start_character":25,"end_line":3990,"end_character":48},"updated":"2018-10-12 08:27:08.000000000","message":"So this \u0027legacy allocation math\u0027 is what is removed in this patch, no?","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6af8bf07798fc7fab090841fa0a23e0fe9a5868b","unresolved":false,"context_lines":[{"line_number":3987,"context_line":""},{"line_number":3988,"context_line":"        # TODO(danms): Remove below this line when we remove compatibility"},{"line_number":3989,"context_line":"        # for double-accounting migrations (likely rocky)"},{"line_number":3990,"context_line":"        LOG.info(_(\u0027Doing legacy allocation math for migration %(mig)s after \u0027"},{"line_number":3991,"context_line":"                   \u0027instance move\u0027),"},{"line_number":3992,"context_line":"                 {\u0027mig\u0027: migration.uuid},"},{"line_number":3993,"context_line":"                 instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_5de42bdf","line":3990,"range":{"start_line":3990,"start_character":25,"end_line":3990,"end_character":48},"in_reply_to":"3f79a3b5_ae266fcb","updated":"2018-10-12 10:02:27.000000000","message":"What this patch removed is extra code for the case when a single consumer has two logically separate allocation on the same compute. This case is not valid any more as same-host resize use two consumers. We still have the case when a single consumer has two logically separate allocation on two different compute host, it is evacuate.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"77d00013148938bfb5a0bf1fe15a4d3462e1ed3c","unresolved":false,"context_lines":[{"line_number":4309,"context_line":"                    # node."},{"line_number":4310,"context_line":"                    # FIXME(danms): Remove this in Rocky"},{"line_number":4311,"context_line":"                    rt \u003d self._get_resource_tracker()"},{"line_number":4312,"context_line":"                    rt.delete_allocation_for_failed_resize("},{"line_number":4313,"context_line":"                        context, instance, node, instance_type)"},{"line_number":4314,"context_line":"                # try to re-schedule the resize elsewhere:"},{"line_number":4315,"context_line":"                exc_info \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_631d29be","line":4312,"updated":"2018-10-19 20:03:38.000000000","message":"I spoke with dansmith about this in IRC:\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2018-10-19.log.html#t2018-10-19T19:57:17\n\nAnd I think I\u0027d like to rip this compat code out before we land this change just to make sure we\u0027re cool with what\u0027s going in here wrt resize to same host allocations.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":4309,"context_line":"                    # node."},{"line_number":4310,"context_line":"                    # FIXME(danms): Remove this in Rocky"},{"line_number":4311,"context_line":"                    rt \u003d self._get_resource_tracker()"},{"line_number":4312,"context_line":"                    rt.delete_allocation_for_failed_resize("},{"line_number":4313,"context_line":"                        context, instance, node, instance_type)"},{"line_number":4314,"context_line":"                # try to re-schedule the resize elsewhere:"},{"line_number":4315,"context_line":"                exc_info \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_70235ebc","line":4312,"in_reply_to":"3f79a3b5_631d29be","updated":"2018-10-24 14:23:05.000000000","message":"OK. I\u0027m going to rebase this patch top of the compat code removal patch of yours https://review.openstack.org/#/c/611970/","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"        \"\"\""},{"line_number":1375,"context_line":"        cn \u003d self.compute_nodes[node]"},{"line_number":1376,"context_line":"        if not scheduler_utils.remove_allocation_from_compute("},{"line_number":1377,"context_line":"                context, instance, cn.uuid, self.reportclient, flavor):"},{"line_number":1378,"context_line":"            if instance.instance_type_id \u003d\u003d flavor.id:"},{"line_number":1379,"context_line":"                operation \u003d \u0027migration\u0027"},{"line_number":1380,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_44f4cf55","side":"PARENT","line":1377,"range":{"start_line":1377,"start_character":63,"end_line":1377,"end_character":69},"updated":"2018-10-18 20:36:32.000000000","message":"Hmm, this makes me a little nervous. This is called from ComputeManager.prep_resize if something fails and we fail to revert the migration-based allocation (or there was no migration-based allocation, but that shouldn\u0027t be the case at this point since that code was added in queens and we shouldn\u0027t be supporting cold migrations between stein and \u003c\u003dqueens computes).\n\nI think we could also hit this flow if there are no allocations at all, which would be the case with the CachingScheduler...\n\nIf we did hit this though for a failed resize to the same host, we could probably mess up the instance allocations, right? As in they\u0027d just be entirely wiped out, even for the instance.old_flavor on this host...but if we can only get here because (a) you\u0027ve got a \u003cqueens compute in your cell or (b) you\u0027re using the CachingScheduler (which won\u0027t have allocations anyway, and we should remove in stein), it seems we can assume we shouldn\u0027t get here.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b0a003922decb272109742352740de850ab2625b","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"        \"\"\""},{"line_number":1375,"context_line":"        cn \u003d self.compute_nodes[node]"},{"line_number":1376,"context_line":"        if not scheduler_utils.remove_allocation_from_compute("},{"line_number":1377,"context_line":"                context, instance, cn.uuid, self.reportclient, flavor):"},{"line_number":1378,"context_line":"            if instance.instance_type_id \u003d\u003d flavor.id:"},{"line_number":1379,"context_line":"                operation \u003d \u0027migration\u0027"},{"line_number":1380,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_d3bef9fe","side":"PARENT","line":1377,"range":{"start_line":1377,"start_character":63,"end_line":1377,"end_character":69},"in_reply_to":"3f79a3b5_2b4edb6d","updated":"2018-10-24 14:30:05.000000000","message":"\u003e Do you want me to add a nova-status check that asserts that there is no \u003cqueens compute in the system?\n\nThe more I thought about it the more I think that is probably excessive, so I think it would be pretty low priority at this point to check for that, especially given we dropped compute RPC API compat for \u003cqueens computes here:\n\nhttps://review.openstack.org/#/c/543580/","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"        \"\"\""},{"line_number":1375,"context_line":"        cn \u003d self.compute_nodes[node]"},{"line_number":1376,"context_line":"        if not scheduler_utils.remove_allocation_from_compute("},{"line_number":1377,"context_line":"                context, instance, cn.uuid, self.reportclient, flavor):"},{"line_number":1378,"context_line":"            if instance.instance_type_id \u003d\u003d flavor.id:"},{"line_number":1379,"context_line":"                operation \u003d \u0027migration\u0027"},{"line_number":1380,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_2b4edb6d","side":"PARENT","line":1377,"range":{"start_line":1377,"start_character":63,"end_line":1377,"end_character":69},"in_reply_to":"3f79a3b5_44f4cf55","updated":"2018-10-24 14:23:05.000000000","message":"In case of CachingScheduler, no allocation to mess up.\nIn case of \u003cqueens compute in the cell we have a real problem.  Do you want me to add a nova-status check that asserts that there is no \u003cqueens compute in the system? I could add that as a separate patch before this patch.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ce0f2c35a03e0f1aa95a20f3ead5adf47932fa78","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"            if alloc_rp_uuid !\u003d rp_uuid"},{"line_number":1934,"context_line":"        }"},{"line_number":1935,"context_line":""},{"line_number":1936,"context_line":"        if len(compute_providers) \u003d\u003d 1:"},{"line_number":1937,"context_line":"            # NOTE(danms): We are in a resize to same host scenario. Since we"},{"line_number":1938,"context_line":"            # are the only provider then we need to merge back in the doubled"},{"line_number":1939,"context_line":"            # allocation with our part subtracted"},{"line_number":1940,"context_line":"            peer_alloc \u003d {"},{"line_number":1941,"context_line":"                    \u0027resources\u0027: current_allocs[rp_uuid][\u0027resources\u0027],"},{"line_number":1942,"context_line":"            }"},{"line_number":1943,"context_line":"            LOG.debug(\u0027Original resources from same-host \u0027"},{"line_number":1944,"context_line":"                      \u0027allocation: %s\u0027, peer_alloc[\u0027resources\u0027])"},{"line_number":1945,"context_line":"            scheduler_utils.merge_resources(peer_alloc[\u0027resources\u0027],"},{"line_number":1946,"context_line":"                                            resources, -1)"},{"line_number":1947,"context_line":"            LOG.debug(\u0027Subtracting old resources from same-host \u0027"},{"line_number":1948,"context_line":"                      \u0027allocation: %s\u0027, peer_alloc[\u0027resources\u0027])"},{"line_number":1949,"context_line":"            new_allocs[rp_uuid] \u003d peer_alloc"},{"line_number":1950,"context_line":""},{"line_number":1951,"context_line":"        payload \u003d {\u0027allocations\u0027: new_allocs}"},{"line_number":1952,"context_line":"        payload[\u0027project_id\u0027] \u003d project_id"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_5e9f6550","side":"PARENT","line":1949,"range":{"start_line":1936,"start_character":0,"end_line":1949,"end_character":44},"updated":"2018-10-11 08:07:36.000000000","message":"This clause seems important for resize to the same host scenario, but it is dropped in the latest patch. Why? If the new method `remove_provider_tree_from_instance_allocation()` is not designed for that same host scenario, that should be documented both in this function and the commit message explicitly.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd118677f4f4472ea7941735b9bac250901dea10","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"            if alloc_rp_uuid !\u003d rp_uuid"},{"line_number":1934,"context_line":"        }"},{"line_number":1935,"context_line":""},{"line_number":1936,"context_line":"        if len(compute_providers) \u003d\u003d 1:"},{"line_number":1937,"context_line":"            # NOTE(danms): We are in a resize to same host scenario. Since we"},{"line_number":1938,"context_line":"            # are the only provider then we need to merge back in the doubled"},{"line_number":1939,"context_line":"            # allocation with our part subtracted"},{"line_number":1940,"context_line":"            peer_alloc \u003d {"},{"line_number":1941,"context_line":"                    \u0027resources\u0027: current_allocs[rp_uuid][\u0027resources\u0027],"},{"line_number":1942,"context_line":"            }"},{"line_number":1943,"context_line":"            LOG.debug(\u0027Original resources from same-host \u0027"},{"line_number":1944,"context_line":"                      \u0027allocation: %s\u0027, peer_alloc[\u0027resources\u0027])"},{"line_number":1945,"context_line":"            scheduler_utils.merge_resources(peer_alloc[\u0027resources\u0027],"},{"line_number":1946,"context_line":"                                            resources, -1)"},{"line_number":1947,"context_line":"            LOG.debug(\u0027Subtracting old resources from same-host \u0027"},{"line_number":1948,"context_line":"                      \u0027allocation: %s\u0027, peer_alloc[\u0027resources\u0027])"},{"line_number":1949,"context_line":"            new_allocs[rp_uuid] \u003d peer_alloc"},{"line_number":1950,"context_line":""},{"line_number":1951,"context_line":"        payload \u003d {\u0027allocations\u0027: new_allocs}"},{"line_number":1952,"context_line":"        payload[\u0027project_id\u0027] \u003d project_id"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_dfae05a0","side":"PARENT","line":1949,"range":{"start_line":1936,"start_character":0,"end_line":1949,"end_character":44},"in_reply_to":"3f79a3b5_5e9f6550","updated":"2018-10-11 15:00:33.000000000","message":"It was an old piece of dead code that wasn\u0027t cleaned up when resize started to move souce host allocations to the migration uuid. We have a set of functional tests for resize on same host that verifies this behavior and that the allocations are handled properly:\n\nnova.tests.functional.test_servers.ServerMovingTests#test_resize_confirm_same_host\nnova.tests.functional.test_servers.ServerMovingTests#test_resize_revert_same_host","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"51049ae709a730121a8921006f3f001536a2bdc8","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"            if alloc_rp_uuid !\u003d rp_uuid"},{"line_number":1934,"context_line":"        }"},{"line_number":1935,"context_line":""},{"line_number":1936,"context_line":"        if len(compute_providers) \u003d\u003d 1:"},{"line_number":1937,"context_line":"            # NOTE(danms): We are in a resize to same host scenario. Since we"},{"line_number":1938,"context_line":"            # are the only provider then we need to merge back in the doubled"},{"line_number":1939,"context_line":"            # allocation with our part subtracted"},{"line_number":1940,"context_line":"            peer_alloc \u003d {"},{"line_number":1941,"context_line":"                    \u0027resources\u0027: current_allocs[rp_uuid][\u0027resources\u0027],"},{"line_number":1942,"context_line":"            }"},{"line_number":1943,"context_line":"            LOG.debug(\u0027Original resources from same-host \u0027"},{"line_number":1944,"context_line":"                      \u0027allocation: %s\u0027, peer_alloc[\u0027resources\u0027])"},{"line_number":1945,"context_line":"            scheduler_utils.merge_resources(peer_alloc[\u0027resources\u0027],"},{"line_number":1946,"context_line":"                                            resources, -1)"},{"line_number":1947,"context_line":"            LOG.debug(\u0027Subtracting old resources from same-host \u0027"},{"line_number":1948,"context_line":"                      \u0027allocation: %s\u0027, peer_alloc[\u0027resources\u0027])"},{"line_number":1949,"context_line":"            new_allocs[rp_uuid] \u003d peer_alloc"},{"line_number":1950,"context_line":""},{"line_number":1951,"context_line":"        payload \u003d {\u0027allocations\u0027: new_allocs}"},{"line_number":1952,"context_line":"        payload[\u0027project_id\u0027] \u003d project_id"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_428c5134","side":"PARENT","line":1949,"range":{"start_line":1936,"start_character":0,"end_line":1949,"end_character":44},"in_reply_to":"3f79a3b5_dfae05a0","updated":"2018-10-12 00:53:53.000000000","message":"Ah, I missed that. The spec [1] says \"instead of trying to double-allocate for an instance, and then having to subtract the source node/flavor from that allocation on success, we can simply operate on allocations atomically\", which makes sense this is a dead code. I will look into this more closely. Sorry for the noise, but it is very good to know. Thank you.\n\n[1] https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/migration-allocations.html","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ce0f2c35a03e0f1aa95a20f3ead5adf47932fa78","unresolved":false,"context_lines":[{"line_number":1895,"context_line":"        has_changes \u003d False"},{"line_number":1896,"context_line":"        for rp_uuid in rp_uuids:"},{"line_number":1897,"context_line":"            changed \u003d bool("},{"line_number":1898,"context_line":"                current_allocs[\u0027allocations\u0027].pop(rp_uuid, None))"},{"line_number":1899,"context_line":"            has_changes \u003d has_changes or changed"},{"line_number":1900,"context_line":""},{"line_number":1901,"context_line":"        # If nothing changed then don\u0027t do anything"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_4eaed4e4","line":1898,"range":{"start_line":1898,"start_character":16,"end_line":1898,"end_character":64},"updated":"2018-10-11 08:07:36.000000000","message":"So this deletes all the allocations being blind to the resize to the same host case, doesn\u0027t it?","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd118677f4f4472ea7941735b9bac250901dea10","unresolved":false,"context_lines":[{"line_number":1895,"context_line":"        has_changes \u003d False"},{"line_number":1896,"context_line":"        for rp_uuid in rp_uuids:"},{"line_number":1897,"context_line":"            changed \u003d bool("},{"line_number":1898,"context_line":"                current_allocs[\u0027allocations\u0027].pop(rp_uuid, None))"},{"line_number":1899,"context_line":"            has_changes \u003d has_changes or changed"},{"line_number":1900,"context_line":""},{"line_number":1901,"context_line":"        # If nothing changed then don\u0027t do anything"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_1fd0fd2a","line":1898,"range":{"start_line":1898,"start_character":16,"end_line":1898,"end_character":64},"in_reply_to":"3f79a3b5_4eaed4e4","updated":"2018-10-11 15:00:33.000000000","message":"No it doesn\u0027t. Resize (even same-host-resize) moves the source host allocation to the migration_uuid. So when nova queries current_allocs at L1880 it only gets either the allocations held by the migration_uuid or held by the instance.uuid depending on how this function was called.","commit_id":"85478cd2aa3093124ee4a4d5f43753b1880e1d00"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1871,"context_line":"                                                      consumer_uuid,"},{"line_number":1872,"context_line":"                                                      root_rp_uuid):"},{"line_number":1873,"context_line":"        \"\"\"Removes every allocation from the consumer that is on the"},{"line_number":1874,"context_line":"        specified provider tree"},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"        :param context: The security context"},{"line_number":1877,"context_line":"        :param consumer_uuid: The UUID of the consumer to manipulate"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_4fd463bb","line":1874,"updated":"2018-10-12 22:13:04.000000000","message":"We may want to add a note/todo to think about sharing providers more closely when that becomes a thing.\n\nI would think allocations against sharing providers will *often* convey with the evacuation - that is, the same sharing provider will be available on the destination, and that allocation will be unchanged during the move - but that might not *always* be the case.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":1871,"context_line":"                                                      consumer_uuid,"},{"line_number":1872,"context_line":"                                                      root_rp_uuid):"},{"line_number":1873,"context_line":"        \"\"\"Removes every allocation from the consumer that is on the"},{"line_number":1874,"context_line":"        specified provider tree"},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"        :param context: The security context"},{"line_number":1877,"context_line":"        :param consumer_uuid: The UUID of the consumer to manipulate"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_49076e82","line":1874,"in_reply_to":"3f79a3b5_4fd463bb","updated":"2018-10-15 08:44:52.000000000","message":"I\u0027ve added a note that this function does not work with sharing providers right now. \n\nIt will be an interesting problem to detect and handle in a generic why when a sharing providers is available on the target node of a move operation.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"        :param context: The security context"},{"line_number":1877,"context_line":"        :param consumer_uuid: The UUID of the consumer to manipulate"},{"line_number":1878,"context_line":"        :param root_rp_uuid: The root of the provider tree"},{"line_number":1879,"context_line":"        \"\"\""},{"line_number":1880,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"},{"line_number":1881,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_8fb59b7f","line":1878,"updated":"2018-10-12 22:13:04.000000000","message":"Since you\u0027ve removed @safe_connect (yay!) this can raise some ClientExceptionZ.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"        :param context: The security context"},{"line_number":1877,"context_line":"        :param consumer_uuid: The UUID of the consumer to manipulate"},{"line_number":1878,"context_line":"        :param root_rp_uuid: The root of the provider tree"},{"line_number":1879,"context_line":"        \"\"\""},{"line_number":1880,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"},{"line_number":1881,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_e9f99a81","line":1878,"in_reply_to":"3f79a3b5_8fb59b7f","updated":"2018-10-15 08:44:52.000000000","message":"Done","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1877,"context_line":"        :param consumer_uuid: The UUID of the consumer to manipulate"},{"line_number":1878,"context_line":"        :param root_rp_uuid: The root of the provider tree"},{"line_number":1879,"context_line":"        \"\"\""},{"line_number":1880,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"},{"line_number":1881,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"},{"line_number":1882,"context_line":"            LOG.error(\"Expected to find current allocations for %s, but \""},{"line_number":1883,"context_line":"                      \"found none.\", consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_2faec72e","line":1880,"range":{"start_line":1880,"start_character":30,"end_line":1880,"end_character":53},"updated":"2018-10-12 22:13:04.000000000","message":"This can raise stuff","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":1877,"context_line":"        :param consumer_uuid: The UUID of the consumer to manipulate"},{"line_number":1878,"context_line":"        :param root_rp_uuid: The root of the provider tree"},{"line_number":1879,"context_line":"        \"\"\""},{"line_number":1880,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"},{"line_number":1881,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"},{"line_number":1882,"context_line":"            LOG.error(\"Expected to find current allocations for %s, but \""},{"line_number":1883,"context_line":"                      \"found none.\", consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_2929d2f0","line":1880,"range":{"start_line":1880,"start_character":30,"end_line":1880,"end_character":53},"in_reply_to":"3f79a3b5_2faec72e","updated":"2018-10-15 08:44:52.000000000","message":"noted in the docstring","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1882,"context_line":"            LOG.error(\"Expected to find current allocations for %s, but \""},{"line_number":1883,"context_line":"                      \"found none.\", consumer_uuid)"},{"line_number":1884,"context_line":"            # TODO(gibi): do not return False as none of the callers"},{"line_number":1885,"context_line":"            # do anything with the return value than log"},{"line_number":1886,"context_line":"            return False"},{"line_number":1887,"context_line":""},{"line_number":1888,"context_line":"        # get every RP uuid that is in the RP tree of root_rp_uuid"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_4ffd4339","line":1885,"range":{"start_line":1885,"start_character":48,"end_line":1885,"end_character":52},"updated":"2018-10-12 22:13:04.000000000","message":"except","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":1882,"context_line":"            LOG.error(\"Expected to find current allocations for %s, but \""},{"line_number":1883,"context_line":"                      \"found none.\", consumer_uuid)"},{"line_number":1884,"context_line":"            # TODO(gibi): do not return False as none of the callers"},{"line_number":1885,"context_line":"            # do anything with the return value than log"},{"line_number":1886,"context_line":"            return False"},{"line_number":1887,"context_line":""},{"line_number":1888,"context_line":"        # get every RP uuid that is in the RP tree of root_rp_uuid"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_0932d65d","line":1885,"range":{"start_line":1885,"start_character":48,"end_line":1885,"end_character":52},"in_reply_to":"3f79a3b5_4ffd4339","updated":"2018-10-15 08:44:52.000000000","message":"Done","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1886,"context_line":"            return False"},{"line_number":1887,"context_line":""},{"line_number":1888,"context_line":"        # get every RP uuid that is in the RP tree of root_rp_uuid"},{"line_number":1889,"context_line":"        rps \u003d self.get(\u0027/resource_providers?in_tree\u003d%s\u0027 % root_rp_uuid,"},{"line_number":1890,"context_line":"                       version\u003dCONSUMER_GENERATION_VERSION).json()"},{"line_number":1891,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps[\u0027resource_providers\u0027]]"},{"line_number":1892,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_2f8567ae","line":1889,"range":{"start_line":1889,"start_character":44,"end_line":1889,"end_character":51},"updated":"2018-10-12 22:13:04.000000000","message":"Use _get_providers_in_tree (which can raise stuff)","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":1886,"context_line":"            return False"},{"line_number":1887,"context_line":""},{"line_number":1888,"context_line":"        # get every RP uuid that is in the RP tree of root_rp_uuid"},{"line_number":1889,"context_line":"        rps \u003d self.get(\u0027/resource_providers?in_tree\u003d%s\u0027 % root_rp_uuid,"},{"line_number":1890,"context_line":"                       version\u003dCONSUMER_GENERATION_VERSION).json()"},{"line_number":1891,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps[\u0027resource_providers\u0027]]"},{"line_number":1892,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_691b4aca","line":1889,"range":{"start_line":1889,"start_character":44,"end_line":1889,"end_character":51},"in_reply_to":"3f79a3b5_2f8567ae","updated":"2018-10-15 08:44:52.000000000","message":"good point. Done.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1908,"context_line":"            # do anything with the return value except logging"},{"line_number":1909,"context_line":"            return True"},{"line_number":1910,"context_line":""},{"line_number":1911,"context_line":"        url \u003d \u0027/allocations/%s\u0027 % consumer_uuid"},{"line_number":1912,"context_line":"        r \u003d self.put(url, current_allocs, version\u003dCONSUMER_GENERATION_VERSION,"},{"line_number":1913,"context_line":"                     global_request_id\u003dcontext.global_id)"},{"line_number":1914,"context_line":""},{"line_number":1915,"context_line":"        if r.status_code !\u003d 204:"},{"line_number":1916,"context_line":"            LOG.warning(\"Failed to save allocation for %s. Got HTTP %s: %s\","},{"line_number":1917,"context_line":"                        consumer_uuid, r.status_code, r.text)"},{"line_number":1918,"context_line":"        # TODO(gibi): do not return a value as none of the callers"},{"line_number":1919,"context_line":"        # do anything with the return value except logging"},{"line_number":1920,"context_line":"        return r.status_code \u003d\u003d 204"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_cf64f323","line":1917,"range":{"start_line":1911,"start_character":0,"end_line":1917,"end_character":61},"updated":"2018-10-12 22:13:04.000000000","message":"TODO: DRY this into a helper along with the guts of claim_resources and put_allocations.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":1908,"context_line":"            # do anything with the return value except logging"},{"line_number":1909,"context_line":"            return True"},{"line_number":1910,"context_line":""},{"line_number":1911,"context_line":"        url \u003d \u0027/allocations/%s\u0027 % consumer_uuid"},{"line_number":1912,"context_line":"        r \u003d self.put(url, current_allocs, version\u003dCONSUMER_GENERATION_VERSION,"},{"line_number":1913,"context_line":"                     global_request_id\u003dcontext.global_id)"},{"line_number":1914,"context_line":""},{"line_number":1915,"context_line":"        if r.status_code !\u003d 204:"},{"line_number":1916,"context_line":"            LOG.warning(\"Failed to save allocation for %s. Got HTTP %s: %s\","},{"line_number":1917,"context_line":"                        consumer_uuid, r.status_code, r.text)"},{"line_number":1918,"context_line":"        # TODO(gibi): do not return a value as none of the callers"},{"line_number":1919,"context_line":"        # do anything with the return value except logging"},{"line_number":1920,"context_line":"        return r.status_code \u003d\u003d 204"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_c9d37ed2","line":1917,"range":{"start_line":1911,"start_character":0,"end_line":1917,"end_character":61},"in_reply_to":"3f79a3b5_cf64f323","updated":"2018-10-15 08:44:52.000000000","message":"Good point. Done.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1867,"context_line":"                     \u0027text\u0027: r.text})"},{"line_number":1868,"context_line":"        return r.status_code \u003d\u003d 204"},{"line_number":1869,"context_line":""},{"line_number":1870,"context_line":"    @safe_connect"},{"line_number":1871,"context_line":"    def remove_provider_from_instance_allocation(self, context, consumer_uuid,"},{"line_number":1872,"context_line":"                                                 rp_uuid, user_id, project_id,"},{"line_number":1873,"context_line":"                                                 resources):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_cad6a955","side":"PARENT","line":1870,"range":{"start_line":1870,"start_character":5,"end_line":1870,"end_character":17},"updated":"2018-10-18 20:36:32.000000000","message":"Why was this removed? Seems unrelated.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1867,"context_line":"                     \u0027text\u0027: r.text})"},{"line_number":1868,"context_line":"        return r.status_code \u003d\u003d 204"},{"line_number":1869,"context_line":""},{"line_number":1870,"context_line":"    @safe_connect"},{"line_number":1871,"context_line":"    def remove_provider_from_instance_allocation(self, context, consumer_uuid,"},{"line_number":1872,"context_line":"                                                 rp_uuid, user_id, project_id,"},{"line_number":1873,"context_line":"                                                 resources):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_ab398bcf","side":"PARENT","line":1870,"range":{"start_line":1870,"start_character":5,"end_line":1870,"end_character":17},"in_reply_to":"3f79a3b5_2a45dd6f","updated":"2018-10-24 14:23:05.000000000","message":"Yeah, Eric asked to remove it and as this change basically rewrites the current function I agreed to not include the @safe_connect any more.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb0a83fa85df640708693245655903b287e15a9f","unresolved":false,"context_lines":[{"line_number":1867,"context_line":"                     \u0027text\u0027: r.text})"},{"line_number":1868,"context_line":"        return r.status_code \u003d\u003d 204"},{"line_number":1869,"context_line":""},{"line_number":1870,"context_line":"    @safe_connect"},{"line_number":1871,"context_line":"    def remove_provider_from_instance_allocation(self, context, consumer_uuid,"},{"line_number":1872,"context_line":"                                                 rp_uuid, user_id, project_id,"},{"line_number":1873,"context_line":"                                                 resources):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_2a45dd6f","side":"PARENT","line":1870,"range":{"start_line":1870,"start_character":5,"end_line":1870,"end_character":17},"in_reply_to":"3f79a3b5_cad6a955","updated":"2018-10-18 20:57:13.000000000","message":"We\u0027re moving away from using @safe_connect. Autodiscovered diff and functional similarities notwithstanding, I think of this change as having removed a method and added a new one, rather than having changed an existing one.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1881,"context_line":"        host during a move operation."},{"line_number":1882,"context_line":""},{"line_number":1883,"context_line":"        If the move was between hosts, the entire allocation for rp_uuid will"},{"line_number":1884,"context_line":"        be dropped. If the move is a resize on the same host, then we will"},{"line_number":1885,"context_line":"        subtract resources from the single allocation to ensure we do not"},{"line_number":1886,"context_line":"        exceed the reserved or max_unit amounts for the resource on the host."},{"line_number":1887,"context_line":""},{"line_number":1888,"context_line":"        :param context: The security context"},{"line_number":1889,"context_line":"        :param consumer_uuid: The instance/consumer UUID"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_0a934150","side":"PARENT","line":1886,"range":{"start_line":1884,"start_character":20,"end_line":1886,"end_character":77},"updated":"2018-10-18 20:36:32.000000000","message":"As noted before, if we didn\u0027t do a migration-based resize to the same host, we\u0027re going to be blowing away the allocations that the instance has on the host, including for the old flavor. If we really can\u0027t get into that scenario today, it seems we should remove the old compat code before this and make sure we can\u0027t get this far and screw ourselves over. Would removing the compat code be enough? Would we need a nova-status upgrade check to see if any computes in a cell are older than service version 23? Or maybe that\u0027s being too paranoid...maybe should ask Dan, or at least reno, or just pretend I never brought this up.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1881,"context_line":"        host during a move operation."},{"line_number":1882,"context_line":""},{"line_number":1883,"context_line":"        If the move was between hosts, the entire allocation for rp_uuid will"},{"line_number":1884,"context_line":"        be dropped. If the move is a resize on the same host, then we will"},{"line_number":1885,"context_line":"        subtract resources from the single allocation to ensure we do not"},{"line_number":1886,"context_line":"        exceed the reserved or max_unit amounts for the resource on the host."},{"line_number":1887,"context_line":""},{"line_number":1888,"context_line":"        :param context: The security context"},{"line_number":1889,"context_line":"        :param consumer_uuid: The instance/consumer UUID"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_8b65afe4","side":"PARENT","line":1886,"range":{"start_line":1884,"start_character":20,"end_line":1886,"end_character":77},"in_reply_to":"3f79a3b5_0a934150","updated":"2018-10-24 14:23:05.000000000","message":"I will rebase this patch top of the your compat code removal. Do you suggest to add a nova-status check as well? I could do that","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b0a003922decb272109742352740de850ab2625b","unresolved":false,"context_lines":[{"line_number":1881,"context_line":"        host during a move operation."},{"line_number":1882,"context_line":""},{"line_number":1883,"context_line":"        If the move was between hosts, the entire allocation for rp_uuid will"},{"line_number":1884,"context_line":"        be dropped. If the move is a resize on the same host, then we will"},{"line_number":1885,"context_line":"        subtract resources from the single allocation to ensure we do not"},{"line_number":1886,"context_line":"        exceed the reserved or max_unit amounts for the resource on the host."},{"line_number":1887,"context_line":""},{"line_number":1888,"context_line":"        :param context: The security context"},{"line_number":1889,"context_line":"        :param consumer_uuid: The instance/consumer UUID"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_734cc53f","side":"PARENT","line":1886,"range":{"start_line":1884,"start_character":20,"end_line":1886,"end_character":77},"in_reply_to":"3f79a3b5_8b65afe4","updated":"2018-10-24 14:30:05.000000000","message":"\u003e Do you suggest to add a nova-status check as well? I could do that\n\nI don\u0027t think we need to, or it would be really low priority.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":2098,"context_line":"                          \u0027involved in our attempt to put allocations for \u0027"},{"line_number":2099,"context_line":"                          \u0027consumer %s\u0027 % consumer_uuid)"},{"line_number":2100,"context_line":"                raise Retry(\u0027put_allocations\u0027, reason)"},{"line_number":2101,"context_line":"            else:"},{"line_number":2102,"context_line":"                LOG.warning("},{"line_number":2103,"context_line":"                    \u0027Unable to submit allocation for instance \u0027"},{"line_number":2104,"context_line":"                    \u0027%(uuid)s (%(code)i %(text)s)\u0027,"},{"line_number":2105,"context_line":"                    {\u0027uuid\u0027: consumer_uuid,"},{"line_number":2106,"context_line":"                     \u0027code\u0027: r.status_code,"},{"line_number":2107,"context_line":"                     \u0027text\u0027: r.text})"},{"line_number":2108,"context_line":"        return r.status_code \u003d\u003d 204"},{"line_number":2109,"context_line":""},{"line_number":2110,"context_line":"    @safe_connect"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_0a51010e","side":"PARENT","line":2107,"range":{"start_line":2101,"start_character":12,"end_line":2107,"end_character":37},"updated":"2018-10-18 20:36:32.000000000","message":"Why is this removed? We do appear to hit this:\n\nhttp://logstash.openstack.org/#dashboard/file/logstash.json?query\u003dmessage%3A%5C%22Unable%20to%20submit%20allocation%20for%20instance%5C%22\u0026from\u003d7d\n\nI suppose that\u0027s because _put_allocations will log a warning of its own in the non-204 case now...","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb0a83fa85df640708693245655903b287e15a9f","unresolved":false,"context_lines":[{"line_number":2098,"context_line":"                          \u0027involved in our attempt to put allocations for \u0027"},{"line_number":2099,"context_line":"                          \u0027consumer %s\u0027 % consumer_uuid)"},{"line_number":2100,"context_line":"                raise Retry(\u0027put_allocations\u0027, reason)"},{"line_number":2101,"context_line":"            else:"},{"line_number":2102,"context_line":"                LOG.warning("},{"line_number":2103,"context_line":"                    \u0027Unable to submit allocation for instance \u0027"},{"line_number":2104,"context_line":"                    \u0027%(uuid)s (%(code)i %(text)s)\u0027,"},{"line_number":2105,"context_line":"                    {\u0027uuid\u0027: consumer_uuid,"},{"line_number":2106,"context_line":"                     \u0027code\u0027: r.status_code,"},{"line_number":2107,"context_line":"                     \u0027text\u0027: r.text})"},{"line_number":2108,"context_line":"        return r.status_code \u003d\u003d 204"},{"line_number":2109,"context_line":""},{"line_number":2110,"context_line":"    @safe_connect"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_6a199585","side":"PARENT","line":2107,"range":{"start_line":2101,"start_character":12,"end_line":2107,"end_character":37},"in_reply_to":"3f79a3b5_0a51010e","updated":"2018-10-18 20:57:13.000000000","message":"yes","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":2098,"context_line":"                          \u0027involved in our attempt to put allocations for \u0027"},{"line_number":2099,"context_line":"                          \u0027consumer %s\u0027 % consumer_uuid)"},{"line_number":2100,"context_line":"                raise Retry(\u0027put_allocations\u0027, reason)"},{"line_number":2101,"context_line":"            else:"},{"line_number":2102,"context_line":"                LOG.warning("},{"line_number":2103,"context_line":"                    \u0027Unable to submit allocation for instance \u0027"},{"line_number":2104,"context_line":"                    \u0027%(uuid)s (%(code)i %(text)s)\u0027,"},{"line_number":2105,"context_line":"                    {\u0027uuid\u0027: consumer_uuid,"},{"line_number":2106,"context_line":"                     \u0027code\u0027: r.status_code,"},{"line_number":2107,"context_line":"                     \u0027text\u0027: r.text})"},{"line_number":2108,"context_line":"        return r.status_code \u003d\u003d 204"},{"line_number":2109,"context_line":""},{"line_number":2110,"context_line":"    @safe_connect"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_4bdc77e1","side":"PARENT","line":2107,"range":{"start_line":2101,"start_character":12,"end_line":2107,"end_character":37},"in_reply_to":"3f79a3b5_6a199585","updated":"2018-10-24 14:23:05.000000000","message":"yes","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"671d084d57333bef010bd389be6f03978df5ac52","unresolved":false,"context_lines":[{"line_number":1879,"context_line":"                 communicate with the placement API"},{"line_number":1880,"context_line":"        :raises: ConsumerAllocationRetrievalFailed if this call cannot read"},{"line_number":1881,"context_line":"                 the current state of the allocations from placement"},{"line_number":1882,"context_line":"        :raise: ResourceProviderRetrievalFailed if it cannot collect the RPs"},{"line_number":1883,"context_line":"                in the three specified by root_rp_uuid."},{"line_number":1884,"context_line":"        \"\"\""},{"line_number":1885,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_a1e3b29f","line":1882,"range":{"start_line":1882,"start_character":9,"end_line":1882,"end_character":14},"updated":"2018-10-15 13:59:06.000000000","message":"nit: raise vs raises","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1879,"context_line":"                 communicate with the placement API"},{"line_number":1880,"context_line":"        :raises: ConsumerAllocationRetrievalFailed if this call cannot read"},{"line_number":1881,"context_line":"                 the current state of the allocations from placement"},{"line_number":1882,"context_line":"        :raise: ResourceProviderRetrievalFailed if it cannot collect the RPs"},{"line_number":1883,"context_line":"                in the three specified by root_rp_uuid."},{"line_number":1884,"context_line":"        \"\"\""},{"line_number":1885,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_ab62ebd7","line":1882,"range":{"start_line":1882,"start_character":9,"end_line":1882,"end_character":14},"in_reply_to":"3f79a3b5_a1e3b29f","updated":"2018-10-24 14:23:05.000000000","message":"Done","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"671d084d57333bef010bd389be6f03978df5ac52","unresolved":false,"context_lines":[{"line_number":1880,"context_line":"        :raises: ConsumerAllocationRetrievalFailed if this call cannot read"},{"line_number":1881,"context_line":"                 the current state of the allocations from placement"},{"line_number":1882,"context_line":"        :raise: ResourceProviderRetrievalFailed if it cannot collect the RPs"},{"line_number":1883,"context_line":"                in the three specified by root_rp_uuid."},{"line_number":1884,"context_line":"        \"\"\""},{"line_number":1885,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"},{"line_number":1886,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_c1e6eeaf","line":1883,"range":{"start_line":1883,"start_character":23,"end_line":1883,"end_character":28},"updated":"2018-10-15 13:59:06.000000000","message":"tree","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1880,"context_line":"        :raises: ConsumerAllocationRetrievalFailed if this call cannot read"},{"line_number":1881,"context_line":"                 the current state of the allocations from placement"},{"line_number":1882,"context_line":"        :raise: ResourceProviderRetrievalFailed if it cannot collect the RPs"},{"line_number":1883,"context_line":"                in the three specified by root_rp_uuid."},{"line_number":1884,"context_line":"        \"\"\""},{"line_number":1885,"context_line":"        current_allocs \u003d self.get_allocs_for_consumer(context, consumer_uuid)"},{"line_number":1886,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_4b5b1722","line":1883,"range":{"start_line":1883,"start_character":23,"end_line":1883,"end_character":28},"in_reply_to":"3f79a3b5_c1e6eeaf","updated":"2018-10-24 14:23:05.000000000","message":"Done","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1886,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"},{"line_number":1887,"context_line":"            LOG.error(\"Expected to find current allocations for %s, but \""},{"line_number":1888,"context_line":"                      \"found none.\", consumer_uuid)"},{"line_number":1889,"context_line":"            # TODO(gibi): do not return False as none of the callers"},{"line_number":1890,"context_line":"            # do anything with the return value except log"},{"line_number":1891,"context_line":"            return False"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_8ac3d158","line":1890,"range":{"start_line":1889,"start_character":12,"end_line":1890,"end_character":58},"updated":"2018-10-18 20:36:32.000000000","message":"I\u0027m not really sure why this matters...but OK.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1886,"context_line":"        if not current_allocs[\u0027allocations\u0027]:"},{"line_number":1887,"context_line":"            LOG.error(\"Expected to find current allocations for %s, but \""},{"line_number":1888,"context_line":"                      \"found none.\", consumer_uuid)"},{"line_number":1889,"context_line":"            # TODO(gibi): do not return False as none of the callers"},{"line_number":1890,"context_line":"            # do anything with the return value except log"},{"line_number":1891,"context_line":"            return False"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_cb2c0702","line":1890,"range":{"start_line":1889,"start_character":12,"end_line":1890,"end_character":58},"in_reply_to":"3f79a3b5_8ac3d158","updated":"2018-10-24 14:23:05.000000000","message":"This function raises a lot of exceptions to communicate failure cases, but sometimes it returns False to signal an error.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"            # do anything with the return value except log"},{"line_number":1891,"context_line":"            return False"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"},{"line_number":1894,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":1895,"context_line":""},{"line_number":1896,"context_line":"        # go through the current allocations and remove the every piece that"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_eac28535","line":1893,"updated":"2018-10-18 20:36:32.000000000","message":"OK so even if we have allocations on child providers but not the actual root (I think https://specs.openstack.org/openstack/nova-specs/specs/rocky/implemented/placement-return-all-resources.html was all about supporting that scenario in the scheduler), this will return those providers and we\u0027ll remove allocations on the children but not the root if there is no allocation on the root, which is fine.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"            # do anything with the return value except log"},{"line_number":1891,"context_line":"            return False"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"},{"line_number":1894,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":1895,"context_line":""},{"line_number":1896,"context_line":"        # go through the current allocations and remove the every piece that"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_eb0a2376","line":1893,"in_reply_to":"3f79a3b5_eac28535","updated":"2018-10-24 14:23:05.000000000","message":"https://review.openstack.org/#/c/608298/ proves that this works when an instance only allocates from child providers.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"},{"line_number":1894,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":1895,"context_line":""},{"line_number":1896,"context_line":"        # go through the current allocations and remove the every piece that"},{"line_number":1897,"context_line":"        # is allocated on and RP in the given tree"},{"line_number":1898,"context_line":"        has_changes \u003d False"},{"line_number":1899,"context_line":"        for rp_uuid in rp_uuids:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_aa648db4","line":1896,"range":{"start_line":1896,"start_character":56,"end_line":1896,"end_character":59},"updated":"2018-10-18 20:36:32.000000000","message":"nix","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"},{"line_number":1894,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":1895,"context_line":""},{"line_number":1896,"context_line":"        # go through the current allocations and remove the every piece that"},{"line_number":1897,"context_line":"        # is allocated on and RP in the given tree"},{"line_number":1898,"context_line":"        has_changes \u003d False"},{"line_number":1899,"context_line":"        for rp_uuid in rp_uuids:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_8b684f22","line":1896,"range":{"start_line":1896,"start_character":56,"end_line":1896,"end_character":59},"in_reply_to":"3f79a3b5_aa648db4","updated":"2018-10-24 14:23:05.000000000","message":"Done","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"},{"line_number":1894,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":1895,"context_line":""},{"line_number":1896,"context_line":"        # go through the current allocations and remove the every piece that"},{"line_number":1897,"context_line":"        # is allocated on and RP in the given tree"},{"line_number":1898,"context_line":"        has_changes \u003d False"},{"line_number":1899,"context_line":"        for rp_uuid in rp_uuids:"},{"line_number":1900,"context_line":"            changed \u003d bool("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_2a0e3de4","line":1897,"range":{"start_line":1896,"start_character":72,"end_line":1897,"end_character":50},"updated":"2018-10-18 20:36:32.000000000","message":"this is confusing...should be \"an\" instead of \"and\"?","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1893,"context_line":"        rps \u003d self._get_providers_in_tree(context, root_rp_uuid)"},{"line_number":1894,"context_line":"        rp_uuids \u003d [rp[\u0027uuid\u0027] for rp in rps]"},{"line_number":1895,"context_line":""},{"line_number":1896,"context_line":"        # go through the current allocations and remove the every piece that"},{"line_number":1897,"context_line":"        # is allocated on and RP in the given tree"},{"line_number":1898,"context_line":"        has_changes \u003d False"},{"line_number":1899,"context_line":"        for rp_uuid in rp_uuids:"},{"line_number":1900,"context_line":"            changed \u003d bool("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_cbc88721","line":1897,"range":{"start_line":1896,"start_character":72,"end_line":1897,"end_character":50},"in_reply_to":"3f79a3b5_2a0e3de4","updated":"2018-10-24 14:23:05.000000000","message":"Reworded the comment I hope that it is clearer now.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"}],"nova/scheduler/utils.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ce0f2c35a03e0f1aa95a20f3ead5adf47932fa78","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"                              needs to be removed"},{"line_number":1028,"context_line":"    :param reportclient: the SchedulerReportClient instances to be used to"},{"line_number":1029,"context_line":"                         communicate with Placement"},{"line_number":1030,"context_line":"    :param flavor: If provided then it is used to calculate the amount of"},{"line_number":1031,"context_line":"                   resource that needs to be removed. If not provided then"},{"line_number":1032,"context_line":"                   instance.flavor will be used"},{"line_number":1033,"context_line":"    :return: True if the removal was successful, False otherwise"},{"line_number":1034,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_9ef89d7e","side":"PARENT","line":1031,"range":{"start_line":1030,"start_character":4,"end_line":1031,"end_character":52},"updated":"2018-10-11 08:07:36.000000000","message":"In original, for resize cases this function seems to be called sometimes with the old flavor and sometimes with the new flavor, but if you dropped this, how do we know how much resource we can delete for resize-on-the-same-host cases?","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd118677f4f4472ea7941735b9bac250901dea10","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"                              needs to be removed"},{"line_number":1028,"context_line":"    :param reportclient: the SchedulerReportClient instances to be used to"},{"line_number":1029,"context_line":"                         communicate with Placement"},{"line_number":1030,"context_line":"    :param flavor: If provided then it is used to calculate the amount of"},{"line_number":1031,"context_line":"                   resource that needs to be removed. If not provided then"},{"line_number":1032,"context_line":"                   instance.flavor will be used"},{"line_number":1033,"context_line":"    :return: True if the removal was successful, False otherwise"},{"line_number":1034,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_9fc88d56","side":"PARENT","line":1031,"range":{"start_line":1030,"start_character":4,"end_line":1031,"end_character":52},"in_reply_to":"3f79a3b5_9ef89d7e","updated":"2018-10-11 15:00:33.000000000","message":"The original remove_allocation_from_compute() called remove_provider_from_instance_allocation() and this patch changes remove_provider_from_instance_allocation() in a way that it does not require passing my_resources any more. Those my_resource was used only in a code path that intended to handle resize-same-host but resize-same-host does not need special handling since it uses migration_uuid to hold the source allocation during the resize.","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1017,"context_line":"            consumer_generation\u003dNone)"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"def remove_allocation_from_compute(context, instance, compute_node_uuid,"},{"line_number":1021,"context_line":"                                   reportclient, flavor\u003dNone):"},{"line_number":1022,"context_line":"    \"\"\"Removes the instance allocation from the compute host."},{"line_number":1023,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_8f6a7be9","side":"PARENT","line":1020,"updated":"2018-10-12 22:13:04.000000000","message":"++","commit_id":"6bf11e1dc14afad78b11d980c2544a3dc41579ff"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"        self.assertFalse(res)"},{"line_number":1402,"context_line":""},{"line_number":1403,"context_line":"    def test_remove_provider_tree_from_inst_alloc_nested(self):"},{"line_number":1404,"context_line":"        get_resp_mock \u003d mock.Mock(status_code\u003d200)"},{"line_number":1405,"context_line":"        get_resp_mock.json.side_effect \u003d ["},{"line_number":1406,"context_line":"            {"},{"line_number":1407,"context_line":"                \u0027allocations\u0027: {"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_af2df7ae","line":1404,"range":{"start_line":1404,"start_character":29,"end_line":1404,"end_character":33},"updated":"2018-10-12 22:13:04.000000000","message":"Use FakeResponseZ. (I\u0027ll forgive you for not switching above, but since this is a new test case...)","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0ea632e60e32454aa8dc1863d761f2e68e6498aa","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"        self.assertFalse(res)"},{"line_number":1402,"context_line":""},{"line_number":1403,"context_line":"    def test_remove_provider_tree_from_inst_alloc_nested(self):"},{"line_number":1404,"context_line":"        get_resp_mock \u003d mock.Mock(status_code\u003d200)"},{"line_number":1405,"context_line":"        get_resp_mock.json.side_effect \u003d ["},{"line_number":1406,"context_line":"            {"},{"line_number":1407,"context_line":"                \u0027allocations\u0027: {"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_8c3fd4b0","line":1404,"range":{"start_line":1404,"start_character":29,"end_line":1404,"end_character":33},"in_reply_to":"3f79a3b5_af2df7ae","updated":"2018-10-15 08:44:52.000000000","message":"Done.","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb91a129a25712a21a65e32007f011ff3578f2f7","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"            \u0027consumer_generation\u0027: 1,"},{"line_number":1468,"context_line":"            \u0027project_id\u0027: project_id,"},{"line_number":1469,"context_line":"            \u0027user_id\u0027: user_id"},{"line_number":1470,"context_line":"        }"},{"line_number":1471,"context_line":"        # We have to pull the json body from the mock call_args to validate"},{"line_number":1472,"context_line":"        # it separately otherwise hash seed issues get in the way."},{"line_number":1473,"context_line":"        actual_payload \u003d self.ks_adap_mock.put.call_args[1][\u0027json\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_2f21e7b5","line":1470,"updated":"2018-10-12 22:13:04.000000000","message":"✔","commit_id":"cfe08c74e6426fe6abee1f43fedbb18823e622ab"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd6a98d98b348db2c1f5d43c7421619089537f2b","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"        project_id \u003d uuids.project_id"},{"line_number":1455,"context_line":"        user_id \u003d uuids.user_id"},{"line_number":1456,"context_line":"        res \u003d self.client.remove_provider_tree_from_instance_allocation("},{"line_number":1457,"context_line":"            self.context, consumer_uuid, uuids.source)"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"        expected_url \u003d \"/allocations/%s\" % consumer_uuid"},{"line_number":1460,"context_line":"        # New allocations should only include the destination..."}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_6a13d5b8","line":1457,"range":{"start_line":1457,"start_character":47,"end_line":1457,"end_character":53},"updated":"2018-10-18 20:36:32.000000000","message":"Shouldn\u0027t this be source_compute? What assertion are we missing in this test?","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb0a83fa85df640708693245655903b287e15a9f","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"        project_id \u003d uuids.project_id"},{"line_number":1455,"context_line":"        user_id \u003d uuids.user_id"},{"line_number":1456,"context_line":"        res \u003d self.client.remove_provider_tree_from_instance_allocation("},{"line_number":1457,"context_line":"            self.context, consumer_uuid, uuids.source)"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"        expected_url \u003d \"/allocations/%s\" % consumer_uuid"},{"line_number":1460,"context_line":"        # New allocations should only include the destination..."}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_6d83ef56","line":1457,"range":{"start_line":1457,"start_character":47,"end_line":1457,"end_character":53},"in_reply_to":"3f79a3b5_6a13d5b8","updated":"2018-10-18 20:57:13.000000000","message":"Good eye.\n\nThis UUID is being fed into the call to _get_providers_in_tree, whose response is mocked to the FakeResponse starting on L1405.\n\nWe could add an assertion that ks_adap_mock.get is called with (\"resource_providers?in_tree\u003d%s\" % uuids.source_compute, ...)","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aed0df002b1f1584ba3fc558ac81d480bb2620a9","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"        project_id \u003d uuids.project_id"},{"line_number":1455,"context_line":"        user_id \u003d uuids.user_id"},{"line_number":1456,"context_line":"        res \u003d self.client.remove_provider_tree_from_instance_allocation("},{"line_number":1457,"context_line":"            self.context, consumer_uuid, uuids.source)"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"        expected_url \u003d \"/allocations/%s\" % consumer_uuid"},{"line_number":1460,"context_line":"        # New allocations should only include the destination..."}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_9a02090c","line":1457,"range":{"start_line":1457,"start_character":47,"end_line":1457,"end_character":53},"in_reply_to":"3f79a3b5_6d83ef56","updated":"2018-10-22 16:57:44.000000000","message":"Yes, I\u0027d like to see an assertion on ks_adap_mock.get.assert_called_once_with(...)","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ec6ced141d486a8eae7eaa05d9ea943628fa819b","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"        project_id \u003d uuids.project_id"},{"line_number":1455,"context_line":"        user_id \u003d uuids.user_id"},{"line_number":1456,"context_line":"        res \u003d self.client.remove_provider_tree_from_instance_allocation("},{"line_number":1457,"context_line":"            self.context, consumer_uuid, uuids.source)"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"        expected_url \u003d \"/allocations/%s\" % consumer_uuid"},{"line_number":1460,"context_line":"        # New allocations should only include the destination..."}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_4091b1f6","line":1457,"range":{"start_line":1457,"start_character":47,"end_line":1457,"end_character":53},"in_reply_to":"3f79a3b5_9a02090c","updated":"2018-10-24 14:23:05.000000000","message":"Good catch. Added the missing assert and fixed the compute RP uuid that was wrong.","commit_id":"3d7aadb0c0876b0e96846ce0d589e9448a6e2a42"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6a773e25a98554ac7f19c6e466fb936db530cf3b","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"            \u0027user_id\u0027: user_id"},{"line_number":1474,"context_line":"        }"},{"line_number":1475,"context_line":""},{"line_number":1476,"context_line":"        self.assertEqual("},{"line_number":1477,"context_line":"            ["},{"line_number":1478,"context_line":"                mock.call("},{"line_number":1479,"context_line":"                    \u0027/allocations/%s\u0027 % consumer_uuid,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_b189eec8","line":1476,"updated":"2018-10-24 21:03:53.000000000","message":"Out of curiosity, why not assert_has_calls?","commit_id":"66297f0c4ac99e38d9cf1cb3fbeb6fbaa93217c6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"41b0156f06e4b0b24e1d8c147e78b360be965b7a","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"            \u0027user_id\u0027: user_id"},{"line_number":1474,"context_line":"        }"},{"line_number":1475,"context_line":""},{"line_number":1476,"context_line":"        self.assertEqual("},{"line_number":1477,"context_line":"            ["},{"line_number":1478,"context_line":"                mock.call("},{"line_number":1479,"context_line":"                    \u0027/allocations/%s\u0027 % consumer_uuid,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_f4f42258","line":1476,"in_reply_to":"3f79a3b5_a3951d40","updated":"2018-10-25 14:39:03.000000000","message":"FWIW I prefer assert_has_calls(), I\u0027ve never thought about doing it this way.","commit_id":"66297f0c4ac99e38d9cf1cb3fbeb6fbaa93217c6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7ed6d6326af9d0777fd9ccc9d31320b682f9ad68","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"            \u0027user_id\u0027: user_id"},{"line_number":1474,"context_line":"        }"},{"line_number":1475,"context_line":""},{"line_number":1476,"context_line":"        self.assertEqual("},{"line_number":1477,"context_line":"            ["},{"line_number":1478,"context_line":"                mock.call("},{"line_number":1479,"context_line":"                    \u0027/allocations/%s\u0027 % consumer_uuid,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_a3951d40","line":1476,"in_reply_to":"3f79a3b5_b189eec8","updated":"2018-10-25 08:13:20.000000000","message":"I guess it is matter of taste. As far as I know both correct and gives pretty similar output in case of failure.","commit_id":"66297f0c4ac99e38d9cf1cb3fbeb6fbaa93217c6"}]}
