)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"773ce8a0b0b658586fd54f025f813a7c7e32fddd","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-04 17:37:13 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ignore forcing of live migration for nested instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In the baseline during forced live migration nova blindy copied the"},{"line_number":10,"context_line":"source allocation from the source compute RP to the destination compute"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_bb038f0c","line":7,"updated":"2018-10-22 16:17:01.000000000","message":"I\u0027m not really sure what a \"nested instance\" is. Perhaps you mean \"an instance that has resources allocated against child providers\"?\n\nIf that\u0027s the case, perhaps we can come up with a different term than \"nested instance\", since there\u0027s nothing really nested about the instance/consumer itself.\n\nHow about \"child provider consumer\"?","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5a71fea7a70919b1d15d2b8aafcef42c79c8cb32","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-04 17:37:13 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ignore forcing of live migration for nested instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In the baseline during forced live migration nova blindy copied the"},{"line_number":10,"context_line":"source allocation from the source compute RP to the destination compute"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_766ef32d","line":7,"in_reply_to":"3f79a3b5_bb038f0c","updated":"2018-10-24 15:25:06.000000000","message":"there is limited space for the first line in a commit message. I\u0027ve tried to be creative :)\n\nBTW you left your comments in PS9 while the last PS is PS14. This line in PS14 is \"Reject forced move with nested source allocation\"","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"773ce8a0b0b658586fd54f025f813a7c7e32fddd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ignore forcing of live migration for nested instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In the baseline during forced live migration nova blindy copied the"},{"line_number":10,"context_line":"source allocation from the source compute RP to the destination compute"},{"line_number":11,"context_line":"RP. When the instance has nested allocaton on the source host this blind"},{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_58512130","line":9,"range":{"start_line":9,"start_character":7,"end_line":9,"end_character":15},"updated":"2018-10-22 16:17:01.000000000","message":"what is the baseline? Do you mean to say \"Before this patch, during live migration...\"?","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5a71fea7a70919b1d15d2b8aafcef42c79c8cb32","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ignore forcing of live migration for nested instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In the baseline during forced live migration nova blindy copied the"},{"line_number":10,"context_line":"source allocation from the source compute RP to the destination compute"},{"line_number":11,"context_line":"RP. When the instance has nested allocaton on the source host this blind"},{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_36915bf8","line":9,"range":{"start_line":9,"start_character":7,"end_line":9,"end_character":15},"in_reply_to":"3f79a3b5_58512130","updated":"2018-10-24 15:25:06.000000000","message":"Not valid in PS14","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"In the baseline during forced live migration nova blindy copied the"},{"line_number":10,"context_line":"source allocation from the source compute RP to the destination compute"},{"line_number":11,"context_line":"RP. When the instance has nested allocaton on the source host this blind"},{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"},{"line_number":13,"context_line":"but not nested RPs on tha compute to copy the instance allocation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch proposes to ignore the force flag if the instance being live"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_fa04c11b","line":12,"range":{"start_line":12,"start_character":64,"end_line":12,"end_character":71},"updated":"2018-10-04 19:24:27.000000000","message":"compute","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"773ce8a0b0b658586fd54f025f813a7c7e32fddd","unresolved":false,"context_lines":[{"line_number":10,"context_line":"source allocation from the source compute RP to the destination compute"},{"line_number":11,"context_line":"RP. When the instance has nested allocaton on the source host this blind"},{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"},{"line_number":13,"context_line":"but not nested RPs on tha compute to copy the instance allocation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch proposes to ignore the force flag if the instance being live"},{"line_number":16,"context_line":"migrated has nested allocation on the source host. By ignoring the force"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_781f3d71","line":13,"range":{"start_line":13,"start_character":8,"end_line":13,"end_character":14},"updated":"2018-10-22 16:17:01.000000000","message":"child","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5a71fea7a70919b1d15d2b8aafcef42c79c8cb32","unresolved":false,"context_lines":[{"line_number":10,"context_line":"source allocation from the source compute RP to the destination compute"},{"line_number":11,"context_line":"RP. When the instance has nested allocaton on the source host this blind"},{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"},{"line_number":13,"context_line":"but not nested RPs on tha compute to copy the instance allocation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch proposes to ignore the force flag if the instance being live"},{"line_number":16,"context_line":"migrated has nested allocation on the source host. By ignoring the force"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_96a06f38","line":13,"range":{"start_line":13,"start_character":8,"end_line":13,"end_character":14},"in_reply_to":"3f79a3b5_781f3d71","updated":"2018-10-24 15:25:06.000000000","message":"Not valid in PS14","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7b9dde3d97d3fb5049ae33220c9bef5755d452ef","unresolved":false,"context_lines":[{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"},{"line_number":13,"context_line":"but not nested RPs on tha compute to copy the instance allocation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch proposes to ignore the force flag if the instance being live"},{"line_number":16,"context_line":"migrated has nested allocation on the source host. By ignoring the force"},{"line_number":17,"context_line":"flag conductor will call the scheduler to verify the destination host"},{"line_number":18,"context_line":"provided and the scheduler will query allocation candidates from"},{"line_number":19,"context_line":"placement restricted to the destination host for such validation. This"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_8fb8e678","line":16,"range":{"start_line":15,"start_character":45,"end_line":16,"end_character":49},"updated":"2018-10-05 01:51:59.000000000","message":"Should we consider the cases where the source host has no nested allocation but the destination host can have nested allocation; Resources are all on the compute node RP at source (len(source_allocs[\u0027allocations\u0027]) \u003d 1), while at destination some of the allocations can be landed on child resource providers?","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1476026a613bb8465ee2f168197a2203391a1612","unresolved":false,"context_lines":[{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"},{"line_number":13,"context_line":"but not nested RPs on tha compute to copy the instance allocation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch proposes to ignore the force flag if the instance being live"},{"line_number":16,"context_line":"migrated has nested allocation on the source host. By ignoring the force"},{"line_number":17,"context_line":"flag conductor will call the scheduler to verify the destination host"},{"line_number":18,"context_line":"provided and the scheduler will query allocation candidates from"},{"line_number":19,"context_line":"placement restricted to the destination host for such validation. This"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_a71fdb6f","line":16,"range":{"start_line":15,"start_character":45,"end_line":16,"end_character":49},"in_reply_to":"3f79a3b5_21b75724","updated":"2018-10-08 13:00:05.000000000","message":"I noted in the code and wrote a functional test case about it. It is impossible to figure out reliably if the dest host allocation will be nested without actually running the scheduler. But I\u0027m open to suggestions. \n\nRunning the scheduler for every request would be equivalent to removing the force flag (which I\u0027d like) but that will be only in a new microversion and for the old microversions we would still need to support the legacy force behavior so it would not be a big gain. Anyhow I\u0027d like to take that separately.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fcc738ec3eaa96a2f6fde06060df60b2f3936683","unresolved":false,"context_lines":[{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"},{"line_number":13,"context_line":"but not nested RPs on tha compute to copy the instance allocation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch proposes to ignore the force flag if the instance being live"},{"line_number":16,"context_line":"migrated has nested allocation on the source host. By ignoring the force"},{"line_number":17,"context_line":"flag conductor will call the scheduler to verify the destination host"},{"line_number":18,"context_line":"provided and the scheduler will query allocation candidates from"},{"line_number":19,"context_line":"placement restricted to the destination host for such validation. This"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_21b75724","line":16,"range":{"start_line":15,"start_character":45,"end_line":16,"end_character":49},"in_reply_to":"3f79a3b5_8fb8e678","updated":"2018-10-05 15:55:21.000000000","message":"This is an excellent point. I don\u0027t see how we could possibly solve this, other than running the scheduler every time.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"c8f89d0bf821ac5d692617dd108c1e3055b3c11b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"copy cannot be done any more as nova only knows the destination compure RP"},{"line_number":13,"context_line":"but not nested RPs on tha compute to copy the instance allocation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch proposes to ignore the force flag if the instance being live"},{"line_number":16,"context_line":"migrated has nested allocation on the source host. By ignoring the force"},{"line_number":17,"context_line":"flag conductor will call the scheduler to verify the destination host"},{"line_number":18,"context_line":"provided and the scheduler will query allocation candidates from"},{"line_number":19,"context_line":"placement restricted to the destination host for such validation. This"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_f2601d37","line":16,"range":{"start_line":15,"start_character":45,"end_line":16,"end_character":49},"in_reply_to":"3f79a3b5_a71fdb6f","updated":"2018-10-09 06:59:57.000000000","message":"Thanks for the explanation. In a long-term view, deprecating/removing the force flag seems to be a right way to go, IMO. Since OpenStack is a resource management tool, a resource allocation that OpenStack doesn\u0027t allow shouldn\u0027t be done via OpenStack API. \n\n\u003e Anyhow I\u0027d like to take that separately.\n\nSure. I\u0027m just putting a note here. I\u0027m agreed on \"this is an extended pre-check and therefore not require an API microversion.\"","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"scheduler perspective. However force live migrate already did pre-check"},{"line_number":25,"context_line":"of the destination host and if that failed returned NoValidHost."},{"line_number":26,"context_line":"Therefore the current change can be considered an extended pre-check and"},{"line_number":27,"context_line":"therefore not require an API microversion."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I7cbd5d9fb875ebf72995362e0b6693492ce32051"},{"line_number":30,"context_line":"Blueprint: use-nested-allocation-candidates"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_3d08f325","line":27,"updated":"2018-10-04 19:24:27.000000000","message":"✔","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"c78b5046f519eedbce0ae1fa409ba2d2d6a7977b","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the forced move operation if the server has complex allocations on the"},{"line_number":16,"context_line":"source host."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"There is a separate bluperint"},{"line_number":19,"context_line":"remove-force-flag-from-live-migrate-and-evacuate that will remove the"},{"line_number":20,"context_line":"force flag in a new API microversion."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Blueprint: use-nested-allocation-candidates"},{"line_number":23,"context_line":"Change-Id: I7cbd5d9fb875ebf72995362e0b6693492ce32051"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3f79a3b5_b0c44c0f","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":37},"updated":"2018-10-16 01:56:47.000000000","message":"Are we sure about this? instead of fix the workflow, we just simply remove a API parameter that admins may actually use?","commit_id":"37800170a0081ff9197352192924f666aa382584"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"98ccda9687bd9533f01024b656561830299e2fb0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"the forced move operation if the server has complex allocations on the"},{"line_number":16,"context_line":"source host."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"There is a separate bluperint"},{"line_number":19,"context_line":"remove-force-flag-from-live-migrate-and-evacuate that will remove the"},{"line_number":20,"context_line":"force flag in a new API microversion."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Blueprint: use-nested-allocation-candidates"},{"line_number":23,"context_line":"Change-Id: I7cbd5d9fb875ebf72995362e0b6693492ce32051"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3f79a3b5_a553a814","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":37},"in_reply_to":"3f79a3b5_b0c44c0f","updated":"2018-10-16 08:53:56.000000000","message":"Based on the spec review we are sure about this. ;) Still if you have a good way to fix the workflow then please propose it. The main problem is that we cannot really generate a good nested allocation on the destination host without calling placement a_c, but calling placement a_c invalidates the meaning of the force flag. The spec has more details https://review.openstack.org/#/c/609330/","commit_id":"37800170a0081ff9197352192924f666aa382584"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reject forced move with nested source allocation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Both os-live-migrate and evacuate server API actions support a force"},{"line_number":10,"context_line":"flag. If force is set to True in the request then nova does not call the"},{"line_number":11,"context_line":"scheduler but instead triest to blindly copy the source host allocation"},{"line_number":12,"context_line":"to the desitnation host. If the source host allocation contains"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3f79a3b5_51809af6","line":9,"range":{"start_line":9,"start_character":5,"end_line":9,"end_character":20},"updated":"2018-10-24 21:03:06.000000000","message":"os-migrateLive","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Both os-live-migrate and evacuate server API actions support a force"},{"line_number":10,"context_line":"flag. If force is set to True in the request then nova does not call the"},{"line_number":11,"context_line":"scheduler but instead triest to blindly copy the source host allocation"},{"line_number":12,"context_line":"to the desitnation host. If the source host allocation contains"},{"line_number":13,"context_line":"resources from more than the root RP then such blind copy cannot be done"},{"line_number":14,"context_line":"properly. Therefore this patch detects such situation and rejects"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3f79a3b5_1176a240","line":11,"range":{"start_line":11,"start_character":22,"end_line":11,"end_character":28},"updated":"2018-10-24 21:03:06.000000000","message":"tries","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":13,"context_line":"resources from more than the root RP then such blind copy cannot be done"},{"line_number":14,"context_line":"properly. Therefore this patch detects such situation and rejects"},{"line_number":15,"context_line":"the forced move operation if the server has complex allocations on the"},{"line_number":16,"context_line":"source host."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"There is a separate bluperint"},{"line_number":19,"context_line":"remove-force-flag-from-live-migrate-and-evacuate that will remove the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3f79a3b5_5195fa2f","line":16,"updated":"2018-10-24 21:03:06.000000000","message":"For completeness, you could/should also mention that before the force parameter was added, simply specifying a target host would bypass the scheduler, so there are a few ways we get into the \"force\" behavior.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"63764d7df410333234d29d3805d8faef4bd71bdc","unresolved":false,"context_lines":[{"line_number":13,"context_line":"resources from more than the root RP then such blind copy cannot be done"},{"line_number":14,"context_line":"properly. Therefore this patch detects such situation and rejects"},{"line_number":15,"context_line":"the forced move operation if the server has complex allocations on the"},{"line_number":16,"context_line":"source host."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"There is a separate bluperint"},{"line_number":19,"context_line":"remove-force-flag-from-live-migrate-and-evacuate that will remove the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3f79a3b5_891efb5b","line":16,"in_reply_to":"3f79a3b5_5195fa2f","updated":"2018-10-25 13:48:42.000000000","message":"Done","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":14,"context_line":"properly. Therefore this patch detects such situation and rejects"},{"line_number":15,"context_line":"the forced move operation if the server has complex allocations on the"},{"line_number":16,"context_line":"source host."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"There is a separate bluperint"},{"line_number":19,"context_line":"remove-force-flag-from-live-migrate-and-evacuate that will remove the"},{"line_number":20,"context_line":"force flag in a new API microversion."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3f79a3b5_31963ef0","line":17,"updated":"2018-10-24 21:03:06.000000000","message":"I was thinking we should also update the API ref description of the force parameter, but it looks like the warning in there is sufficiently generic that it should cover this change:\n\nhttps://github.com/openstack/nova/blob/835faf3f40af6b0e07c585690982a997d6a2ac47/api-ref/source/parameters.yaml#L3112\n\nhttps://github.com/openstack/nova/blob/835faf3f40af6b0e07c585690982a997d6a2ac47/api-ref/source/parameters.yaml#L3125","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"63764d7df410333234d29d3805d8faef4bd71bdc","unresolved":false,"context_lines":[{"line_number":14,"context_line":"properly. Therefore this patch detects such situation and rejects"},{"line_number":15,"context_line":"the forced move operation if the server has complex allocations on the"},{"line_number":16,"context_line":"source host."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"There is a separate bluperint"},{"line_number":19,"context_line":"remove-force-flag-from-live-migrate-and-evacuate that will remove the"},{"line_number":20,"context_line":"force flag in a new API microversion."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3f79a3b5_e92c4f95","line":17,"in_reply_to":"3f79a3b5_31963ef0","updated":"2018-10-25 13:48:42.000000000","message":"I agree that the text is generic enough","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"}],"nova/compute/api.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":4355,"context_line":"            # to them, we need to support the old way"},{"line_number":4356,"context_line":"            request_spec \u003d None"},{"line_number":4357,"context_line":""},{"line_number":4358,"context_line":"        if host_name:"},{"line_number":4359,"context_line":"            # FIXME(sbauza): Since only Ironic driver uses more than one"},{"line_number":4360,"context_line":"            # compute per service but doesn\u0027t support live migrations,"},{"line_number":4361,"context_line":"            # let\u0027s provide the first one."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_2309b4db","line":4358,"updated":"2018-10-04 19:24:27.000000000","message":"Took me a while to understand this.\n\nIt\u0027s okay that we\u0027re setting up request_spec.requested_destination even for legacy cases (without nrp), because we only look at it in LiveMigrationTask if host_name is False.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0800526f7ed294e7283e02685b43e4ff44cc82da","unresolved":false,"context_lines":[{"line_number":4355,"context_line":"            # to them, we need to support the old way"},{"line_number":4356,"context_line":"            request_spec \u003d None"},{"line_number":4357,"context_line":""},{"line_number":4358,"context_line":"        if host_name:"},{"line_number":4359,"context_line":"            # FIXME(sbauza): Since only Ironic driver uses more than one"},{"line_number":4360,"context_line":"            # compute per service but doesn\u0027t support live migrations,"},{"line_number":4361,"context_line":"            # let\u0027s provide the first one."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_d9fe3e69","line":4358,"in_reply_to":"3f79a3b5_2309b4db","updated":"2018-10-10 16:03:20.000000000","message":"dropped in the new solution","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"64681d8951fea3a2d73af864c50e544d9d3029db","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"                )"},{"line_number":4373,"context_line":"                # This is essentially a hint to the scheduler to only consider"},{"line_number":4374,"context_line":"                # the specified host but still run it through the filters."},{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_65453b44","line":4375,"updated":"2018-10-08 14:00:13.000000000","message":"if you stop checking the force flag when setting the requested_destination field, that means that if I\u0027m an admin and asking for a forced live-migration, I\u0027ll then call the scheduler for verifying the destination, which is a behavioural change, hence an API microversion IMHO.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7ca0446d81b26810d8a825173da17a7a4ddcae5b","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"                )"},{"line_number":4373,"context_line":"                # This is essentially a hint to the scheduler to only consider"},{"line_number":4374,"context_line":"                # the specified host but still run it through the filters."},{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_969d2b5a","line":4375,"in_reply_to":"3f79a3b5_1b7f066a","updated":"2018-10-08 16:24:39.000000000","message":"I\u0027m in agreement up until the \"non-standard resource classes\" bit. We\u0027re soon going to see DISK_GB in sharing providers, and NUMA is going to have VCPUs in child providers. So I don\u0027t think that\u0027s a good heuristic to use.\n\nIs it in the realm of possibility to consider a column (or two) in the hosts table indicating whether nested and/or shared is in use?","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8b1ca033d3d4c199e9ddf40e5e1b970d1a23946d","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"                )"},{"line_number":4373,"context_line":"                # This is essentially a hint to the scheduler to only consider"},{"line_number":4374,"context_line":"                # the specified host but still run it through the filters."},{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_65e1bb2b","line":4375,"in_reply_to":"3f79a3b5_65453b44","updated":"2018-10-08 14:07:45.000000000","message":"The forced evacuate already does pre-checks today[1] as I tried to note it in the commit message [2]. Sure it could be still argued that after this patch it will do different type of pre-checks so it is a behavior change. \n\n\n\n[1] https://review.openstack.org/#/c/605785/9/nova/conductor/tasks/live_migrate.py@126\n[2] https://review.openstack.org/#/c/605785/9//COMMIT_MSG@22","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"773ce8a0b0b658586fd54f025f813a7c7e32fddd","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"                )"},{"line_number":4373,"context_line":"                # This is essentially a hint to the scheduler to only consider"},{"line_number":4374,"context_line":"                # the specified host but still run it through the filters."},{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_0546c77c","line":4375,"in_reply_to":"3f79a3b5_65e1bb2b","updated":"2018-10-22 16:17:01.000000000","message":"++ to gibi\u0027s argument here.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8d4cc10d86edf4b2ea9e399ce0db449a3a99256d","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"                )"},{"line_number":4373,"context_line":"                # This is essentially a hint to the scheduler to only consider"},{"line_number":4374,"context_line":"                # the specified host but still run it through the filters."},{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_1b7f066a","line":4375,"in_reply_to":"3f79a3b5_65e1bb2b","updated":"2018-10-08 15:30:40.000000000","message":"As I mentioned in today\u0027s scheduler meeting, gibi and I talked a bit about this change in IRC a week or so ago. I noted to him at the time that with change I40b5af5e85b1266402a7e4bdeb3705e1b0bd6f3b in Pike we already started breaking the API contract on the live migration (and evacuate) force parameter because we need to still perform the claim in the API (scheduler/superconductor) layer before casting to the forced compute. I haven\u0027t gone through this change in detail yet, but I\u0027m (1) OK with deprecating the force parameter for live migration and evacuate if we want to do that separately from this and (2) the more we need to rely on claims and placement in the scheduler doing things properly, the less we can enforce the force parameter and we\u0027re going to have to fudge things because force and what types of resources it bypassed in the compute resource tracker weren\u0027t considering the types of exotic resource modeling claims we\u0027re doing today with placement, so we can\u0027t really honor that parameter much anymore.\n\nMaybe a compromise would be if you\u0027re forcing a host during live migration and the instance has allocations on non-standard resource classes (VCPU/MEMORY_MB/DISK_GB) then we need to fail because you can\u0027t force those types of resources. Granted I know that means we don\u0027t know if the host those allocations are against (or will be against) are nested right now or not, but I don\u0027t think we really need to care about that - it just makes things more complicated to care if it\u0027s nested or not, when we could just fail fast saying it\u0027s not supported.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0800526f7ed294e7283e02685b43e4ff44cc82da","unresolved":false,"context_lines":[{"line_number":4372,"context_line":"                )"},{"line_number":4373,"context_line":"                # This is essentially a hint to the scheduler to only consider"},{"line_number":4374,"context_line":"                # the specified host but still run it through the filters."},{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_f9269a22","line":4375,"in_reply_to":"3f79a3b5_969d2b5a","updated":"2018-10-10 16:03:20.000000000","message":"API behavior change moved to a separate spec.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"},{"line_number":4379,"context_line":"            # Unset the host to make sure we call the scheduler"},{"line_number":4380,"context_line":"            # from the conductor LiveMigrationTask. Yes this is tightly-coupled"},{"line_number":4381,"context_line":"            # to behavior in conductor and not great."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a3714448","line":4378,"range":{"start_line":4378,"start_character":25,"end_line":4378,"end_character":39},"updated":"2018-10-04 19:24:27.000000000","message":"nit: this part of the condition isn\u0027t necessary.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5a71fea7a70919b1d15d2b8aafcef42c79c8cb32","unresolved":false,"context_lines":[{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"},{"line_number":4379,"context_line":"            # Unset the host to make sure we call the scheduler"},{"line_number":4380,"context_line":"            # from the conductor LiveMigrationTask. Yes this is tightly-coupled"},{"line_number":4381,"context_line":"            # to behavior in conductor and not great."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_9675cfcb","line":4378,"range":{"start_line":4378,"start_character":25,"end_line":4378,"end_character":39},"in_reply_to":"3f79a3b5_055a47f1","updated":"2018-10-24 15:25:06.000000000","message":"Not valid in PS14","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0800526f7ed294e7283e02685b43e4ff44cc82da","unresolved":false,"context_lines":[{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"},{"line_number":4379,"context_line":"            # Unset the host to make sure we call the scheduler"},{"line_number":4380,"context_line":"            # from the conductor LiveMigrationTask. Yes this is tightly-coupled"},{"line_number":4381,"context_line":"            # to behavior in conductor and not great."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_192a76e5","line":4378,"range":{"start_line":4378,"start_character":25,"end_line":4378,"end_character":39},"in_reply_to":"3f79a3b5_a3714448","updated":"2018-10-10 16:03:20.000000000","message":"dropped in the new solution","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"773ce8a0b0b658586fd54f025f813a7c7e32fddd","unresolved":false,"context_lines":[{"line_number":4375,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":4376,"context_line":""},{"line_number":4377,"context_line":"        # NOTE(sbauza): Force is a boolean by the new related API version"},{"line_number":4378,"context_line":"        if force is False and host_name:"},{"line_number":4379,"context_line":"            # Unset the host to make sure we call the scheduler"},{"line_number":4380,"context_line":"            # from the conductor LiveMigrationTask. Yes this is tightly-coupled"},{"line_number":4381,"context_line":"            # to behavior in conductor and not great."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_055a47f1","line":4378,"range":{"start_line":4378,"start_character":25,"end_line":4378,"end_character":39},"in_reply_to":"3f79a3b5_a3714448","updated":"2018-10-22 16:17:01.000000000","message":"why isn\u0027t this part of the condition necessary? we could have dropped through from line 4375 to here...","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"}],"nova/conductor/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                            if migration:"},{"line_number":930,"context_line":"                                migration.status \u003d \u0027error\u0027"},{"line_number":931,"context_line":"                                migration.save()"},{"line_number":932,"context_line":"                            self._set_vm_state_and_notify("},{"line_number":933,"context_line":"                                context,"},{"line_number":934,"context_line":"                                instance.uuid,"},{"line_number":935,"context_line":"                                \u0027rebuild_server\u0027,"},{"line_number":936,"context_line":"                                {\u0027vm_state\u0027: vm_states.ERROR,"},{"line_number":937,"context_line":"                                 \u0027task_state\u0027: None}, ex, request_spec)"},{"line_number":938,"context_line":"                            LOG.warning(\u0027Rebuild failed: %s\u0027,"},{"line_number":939,"context_line":"                                        six.text_type(ex), instance\u003dinstance)"},{"line_number":940,"context_line":"                    except exception.NoValidHost:"},{"line_number":941,"context_line":"                        with excutils.save_and_reraise_exception():"},{"line_number":942,"context_line":"                            if migration:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_f1c6864a","line":939,"range":{"start_line":932,"start_character":28,"end_line":939,"end_character":77},"updated":"2018-10-24 21:03:06.000000000","message":"OK since we didn\u0027t actually do anything to the instance in the case of NoValidHost, it makes sense to not change the status to ERROR. I\u0027m not really sure why we do it when we fail to update allocations, but that\u0027s a different issue.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e635cd6fbd9ab6f90dcfc4d309a53462b0a9501","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                            if migration:"},{"line_number":930,"context_line":"                                migration.status \u003d \u0027error\u0027"},{"line_number":931,"context_line":"                                migration.save()"},{"line_number":932,"context_line":"                            self._set_vm_state_and_notify("},{"line_number":933,"context_line":"                                context,"},{"line_number":934,"context_line":"                                instance.uuid,"},{"line_number":935,"context_line":"                                \u0027rebuild_server\u0027,"},{"line_number":936,"context_line":"                                {\u0027vm_state\u0027: vm_states.ERROR,"},{"line_number":937,"context_line":"                                 \u0027task_state\u0027: None}, ex, request_spec)"},{"line_number":938,"context_line":"                            LOG.warning(\u0027Rebuild failed: %s\u0027,"},{"line_number":939,"context_line":"                                        six.text_type(ex), instance\u003dinstance)"},{"line_number":940,"context_line":"                    except exception.NoValidHost:"},{"line_number":941,"context_line":"                        with excutils.save_and_reraise_exception():"},{"line_number":942,"context_line":"                            if migration:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_2f37a7e6","line":939,"range":{"start_line":932,"start_character":28,"end_line":939,"end_character":77},"in_reply_to":"3f79a3b5_ce063986","updated":"2018-10-25 14:44:45.000000000","message":"OK, I\u0027m not sure why though. If there was a good reason after the discussion, it would have been nice to document it in the code. :)","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"63764d7df410333234d29d3805d8faef4bd71bdc","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                            if migration:"},{"line_number":930,"context_line":"                                migration.status \u003d \u0027error\u0027"},{"line_number":931,"context_line":"                                migration.save()"},{"line_number":932,"context_line":"                            self._set_vm_state_and_notify("},{"line_number":933,"context_line":"                                context,"},{"line_number":934,"context_line":"                                instance.uuid,"},{"line_number":935,"context_line":"                                \u0027rebuild_server\u0027,"},{"line_number":936,"context_line":"                                {\u0027vm_state\u0027: vm_states.ERROR,"},{"line_number":937,"context_line":"                                 \u0027task_state\u0027: None}, ex, request_spec)"},{"line_number":938,"context_line":"                            LOG.warning(\u0027Rebuild failed: %s\u0027,"},{"line_number":939,"context_line":"                                        six.text_type(ex), instance\u003dinstance)"},{"line_number":940,"context_line":"                    except exception.NoValidHost:"},{"line_number":941,"context_line":"                        with excutils.save_and_reraise_exception():"},{"line_number":942,"context_line":"                            if migration:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_ce063986","line":939,"range":{"start_line":932,"start_character":28,"end_line":939,"end_character":77},"in_reply_to":"3f79a3b5_f1c6864a","updated":"2018-10-25 13:48:42.000000000","message":"The AllocationUpdateFailed exception comes from the report.claim_resources() call when placement rejects the update due to consumer generation conflict. We agreed in the consumer_gen patch series that in that case we go to ERROR.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"}],"nova/conductor/tasks/live_migrate.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            source_allocs \u003d reportclient.get_allocs_for_consumer("},{"line_number":95,"context_line":"                self.context, self.instance.uuid)"},{"line_number":96,"context_line":"            if len(source_allocs[\u0027allocations\u0027]) \u003e 1:"},{"line_number":97,"context_line":"                LOG.info(\u0027The instance %s has nested allocation on the source \u0027"},{"line_number":98,"context_line":"                         \u0027host and the live migration was forced. Nova \u0027"},{"line_number":99,"context_line":"                         \u0027ignores the force flag to go through the scheduler \u0027"},{"line_number":100,"context_line":"                         \u0027to be able to move the nested allocation to the \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_8830e708","line":97,"range":{"start_line":97,"start_character":46,"end_line":97,"end_character":52},"updated":"2018-10-04 19:24:27.000000000","message":"or sharing\n\nwhich btw warrants the same treatment","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                LOG.info(\u0027The instance %s has nested allocation on the source \u0027"},{"line_number":98,"context_line":"                         \u0027host and the live migration was forced. Nova \u0027"},{"line_number":99,"context_line":"                         \u0027ignores the force flag to go through the scheduler \u0027"},{"line_number":100,"context_line":"                         \u0027to be able to move the nested allocation to the \u0027"},{"line_number":101,"context_line":"                         \u0027destination host\u0027,"},{"line_number":102,"context_line":"                         self.instance.uuid)"},{"line_number":103,"context_line":"                call_scheduler \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_283513f7","line":100,"range":{"start_line":100,"start_character":49,"end_line":100,"end_character":55},"updated":"2018-10-04 19:24:27.000000000","message":"\"","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        if call_scheduler:"},{"line_number":116,"context_line":"            # Either no host was specified in the API request and the user"},{"line_number":117,"context_line":"            # wants the scheduler to pick a destination host, or a host was"},{"line_number":118,"context_line":"            # specified but is not forcing it, so they want the scheduler"},{"line_number":119,"context_line":"            # filters to run on the specified host, like a scheduler hint."},{"line_number":120,"context_line":"            self.destination, dest_node \u003d self._find_destination()"},{"line_number":121,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_838e8824","line":118,"updated":"2018-10-04 19:24:27.000000000","message":"...or we must use the scheduler because nested/sharing is in play","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7b9dde3d97d3fb5049ae33220c9bef5755d452ef","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            # need to copy the source compute node allocations in Placement"},{"line_number":129,"context_line":"            # to the destination compute node. Normally select_destinations()"},{"line_number":130,"context_line":"            # in the scheduler would do this for us, but when forcing the"},{"line_number":131,"context_line":"            # target host we don\u0027t call the scheduler."},{"line_number":132,"context_line":"            # TODO(mriedem): In Queens, call select_destinations() with a"},{"line_number":133,"context_line":"            # skip_filters\u003dTrue flag so the scheduler does the work of claiming"},{"line_number":134,"context_line":"            # resources on the destination in Placement but still bypass the"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_efbcfab6","line":131,"updated":"2018-10-05 01:51:59.000000000","message":"But if we have allocations on nested providers on the source, the claim_resources_on_destination() doesn\u0027t work well because it is blind to child providers... I see.\n\nOkay, now I think I understand what I\u0027ve been missing enabling 1.29 microversion API in Nova. Thank you so much. I learned a lot from this!","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    schedclient \u003d scheduler_client.SchedulerClient()"},{"line_number":46,"context_line":"    reportclient \u003d schedclient.reportclient"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    orig_alloc \u003d reportclient.get_allocs_for_consumer("},{"line_number":49,"context_line":"        context, instance.uuid)[\u0027allocations\u0027]"},{"line_number":50,"context_line":"    root_alloc \u003d orig_alloc.get(source_cn.uuid, {}).get(\u0027resources\u0027, {})"},{"line_number":51,"context_line":"    if not root_alloc:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_213d7bbb","line":48,"range":{"start_line":48,"start_character":30,"end_line":48,"end_character":53},"updated":"2018-10-12 22:43:49.000000000","message":"This raises stuff, should be doc\u0027d.","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    schedclient \u003d scheduler_client.SchedulerClient()"},{"line_number":46,"context_line":"    reportclient \u003d schedclient.reportclient"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    orig_alloc \u003d reportclient.get_allocs_for_consumer("},{"line_number":49,"context_line":"        context, instance.uuid)[\u0027allocations\u0027]"},{"line_number":50,"context_line":"    root_alloc \u003d orig_alloc.get(source_cn.uuid, {}).get(\u0027resources\u0027, {})"},{"line_number":51,"context_line":"    if not root_alloc:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_8c44b4a0","line":48,"range":{"start_line":48,"start_character":30,"end_line":48,"end_character":53},"in_reply_to":"3f79a3b5_213d7bbb","updated":"2018-10-15 09:14:59.000000000","message":"Done","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    orig_alloc \u003d reportclient.get_allocs_for_consumer("},{"line_number":49,"context_line":"        context, instance.uuid)[\u0027allocations\u0027]"},{"line_number":50,"context_line":"    root_alloc \u003d orig_alloc.get(source_cn.uuid, {}).get(\u0027resources\u0027, {})"},{"line_number":51,"context_line":"    if not root_alloc:"},{"line_number":52,"context_line":"        LOG.debug(\u0027Unable to find existing allocations for instance on \u0027"},{"line_number":53,"context_line":"                  \u0027source compute node: %s. This is normal if you are not \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_e15b0320","line":50,"range":{"start_line":50,"start_character":32,"end_line":50,"end_character":46},"updated":"2018-10-12 22:43:49.000000000","message":"So TODO: fix this for scenarios where the allocations are only in child/sharing providers?","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    orig_alloc \u003d reportclient.get_allocs_for_consumer("},{"line_number":49,"context_line":"        context, instance.uuid)[\u0027allocations\u0027]"},{"line_number":50,"context_line":"    root_alloc \u003d orig_alloc.get(source_cn.uuid, {}).get(\u0027resources\u0027, {})"},{"line_number":51,"context_line":"    if not root_alloc:"},{"line_number":52,"context_line":"        LOG.debug(\u0027Unable to find existing allocations for instance on \u0027"},{"line_number":53,"context_line":"                  \u0027source compute node: %s. This is normal if you are not \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_cc65cc4a","line":50,"range":{"start_line":50,"start_character":32,"end_line":50,"end_character":46},"in_reply_to":"3f79a3b5_e15b0320","updated":"2018-10-15 09:14:59.000000000","message":"This is the case that was raised by Sylvain and it is addressed later in the series. See https://review.openstack.org/#/c/608298/","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":28,"context_line":"def replace_allocation_with_migration(context, instance, migration):"},{"line_number":29,"context_line":"    \"\"\"Replace instance\u0027s allocation with one for a migration."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    :raises: keystoneauth1.exceptions.base.ClientException on failure to"},{"line_number":32,"context_line":"             communicate with the placement API"},{"line_number":33,"context_line":"    :raises: ConsumerAllocationRetrievalFailed if reading the current"},{"line_number":34,"context_line":"             allocation from placement fails"},{"line_number":35,"context_line":"    :returns: (source_compute_node, migration_allocation)"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_f1cbe647","line":34,"range":{"start_line":31,"start_character":4,"end_line":34,"end_character":44},"updated":"2018-10-24 21:03:06.000000000","message":"This seems unrelated, but if you wanted to be complete you\u0027d also have ComputeHostNotFound, AllocationMoveFailed and NoValidHost in here...","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"63764d7df410333234d29d3805d8faef4bd71bdc","unresolved":false,"context_lines":[{"line_number":28,"context_line":"def replace_allocation_with_migration(context, instance, migration):"},{"line_number":29,"context_line":"    \"\"\"Replace instance\u0027s allocation with one for a migration."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    :raises: keystoneauth1.exceptions.base.ClientException on failure to"},{"line_number":32,"context_line":"             communicate with the placement API"},{"line_number":33,"context_line":"    :raises: ConsumerAllocationRetrievalFailed if reading the current"},{"line_number":34,"context_line":"             allocation from placement fails"},{"line_number":35,"context_line":"    :returns: (source_compute_node, migration_allocation)"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_ae5dfd7c","line":34,"range":{"start_line":31,"start_character":4,"end_line":34,"end_character":44},"in_reply_to":"3f79a3b5_f1cbe647","updated":"2018-10-25 13:48:42.000000000","message":"Done","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"13d130d0d8c7b1107875ae2c0e754b5fafe113bd","unresolved":false,"context_lines":[{"line_number":32,"context_line":"             communicate with the placement API"},{"line_number":33,"context_line":"    :raises: ConsumerAllocationRetrievalFailed if reading the current"},{"line_number":34,"context_line":"             allocation from placement fails"},{"line_number":35,"context_line":"    :raises: ComputeHostNotFound if the host of the instance is not found in"},{"line_number":36,"context_line":"             the databse"},{"line_number":37,"context_line":"    :raises: AllocationMoveFailed if moving the allocation from the"},{"line_number":38,"context_line":"             instance.uuid to the migration.uuid fails due to parallel"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_c1ffe7fd","line":35,"updated":"2018-10-25 15:14:07.000000000","message":"...here.","commit_id":"fd351903a1759109f66d0c66d42cd3a1b7f23861"}],"nova/scheduler/utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":492,"context_line":"                        lives"},{"line_number":493,"context_line":"    :param dest_node: destination ComputeNode where the instance is being"},{"line_number":494,"context_line":"                      moved"},{"line_number":495,"context_line":"    :param source_allocations: The consumer\u0027s current allocation on the"},{"line_number":496,"context_line":"                               source compute"},{"line_number":497,"context_line":"    :param consumer_generation: The expected generation of the consumer."},{"line_number":498,"context_line":"                                None if a new consumer is expected"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_c19cc7c0","line":495,"range":{"start_line":495,"start_character":54,"end_line":495,"end_character":64},"updated":"2018-10-12 22:43:49.000000000","message":"allocations","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":492,"context_line":"                        lives"},{"line_number":493,"context_line":"    :param dest_node: destination ComputeNode where the instance is being"},{"line_number":494,"context_line":"                      moved"},{"line_number":495,"context_line":"    :param source_allocations: The consumer\u0027s current allocation on the"},{"line_number":496,"context_line":"                               source compute"},{"line_number":497,"context_line":"    :param consumer_generation: The expected generation of the consumer."},{"line_number":498,"context_line":"                                None if a new consumer is expected"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_0cce642b","line":495,"range":{"start_line":495,"start_character":54,"end_line":495,"end_character":64},"in_reply_to":"3f79a3b5_c19cc7c0","updated":"2018-10-15 09:14:59.000000000","message":"Done","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        # which is really a rare case."},{"line_number":539,"context_line":"        if len(source_allocations) \u003e 1:"},{"line_number":540,"context_line":"            reason \u003d (_(\u0027Unable to move instance %(instance_uuid)s to \u0027"},{"line_number":541,"context_line":"                        \u0027host %(host)s. The instance has complex allocation \u0027"},{"line_number":542,"context_line":"                        \u0027on the source host so move cannot be forced.\u0027) %"},{"line_number":543,"context_line":"                      {\u0027instance_uuid\u0027: instance.uuid,"},{"line_number":544,"context_line":"                       \u0027host\u0027: dest_node.host})"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_01ae3fe3","line":541,"range":{"start_line":541,"start_character":65,"end_line":541,"end_character":75},"updated":"2018-10-12 22:43:49.000000000","message":"allocations","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        # which is really a rare case."},{"line_number":539,"context_line":"        if len(source_allocations) \u003e 1:"},{"line_number":540,"context_line":"            reason \u003d (_(\u0027Unable to move instance %(instance_uuid)s to \u0027"},{"line_number":541,"context_line":"                        \u0027host %(host)s. The instance has complex allocation \u0027"},{"line_number":542,"context_line":"                        \u0027on the source host so move cannot be forced.\u0027) %"},{"line_number":543,"context_line":"                      {\u0027instance_uuid\u0027: instance.uuid,"},{"line_number":544,"context_line":"                       \u0027host\u0027: dest_node.host})"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_acd890ef","line":541,"range":{"start_line":541,"start_character":65,"end_line":541,"end_character":75},"in_reply_to":"3f79a3b5_01ae3fe3","updated":"2018-10-15 09:14:59.000000000","message":"Done","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":547,"context_line":"            \u0027allocations\u0027: {"},{"line_number":548,"context_line":"                dest_node.uuid: {"},{"line_number":549,"context_line":"                    \u0027resources\u0027:"},{"line_number":550,"context_line":"                        list(source_allocations.values())[0][\u0027resources\u0027]}"},{"line_number":551,"context_line":"            },"},{"line_number":552,"context_line":"        }"},{"line_number":553,"context_line":"        # import locally to avoid cyclic import"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_21c25b87","line":550,"range":{"start_line":550,"start_character":24,"end_line":550,"end_character":60},"updated":"2018-10-12 22:43:49.000000000","message":"This is weird. Are you doing this (as opposed to [source_node.uuid]) in case the allocations are on a child provider?\n\nUm, do we want to fail in that case? I.e. if len(source_allocations) \u003e 1 or source_node.uuid not in source_allocations?","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":547,"context_line":"            \u0027allocations\u0027: {"},{"line_number":548,"context_line":"                dest_node.uuid: {"},{"line_number":549,"context_line":"                    \u0027resources\u0027:"},{"line_number":550,"context_line":"                        list(source_allocations.values())[0][\u0027resources\u0027]}"},{"line_number":551,"context_line":"            },"},{"line_number":552,"context_line":"        }"},{"line_number":553,"context_line":"        # import locally to avoid cyclic import"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ccfcec40","line":550,"range":{"start_line":550,"start_character":24,"end_line":550,"end_character":60},"in_reply_to":"3f79a3b5_21c25b87","updated":"2018-10-15 09:14:59.000000000","message":"good point. It is weird and it hides an issue. I think I was under-caffeinated when wrote this. :)\n\nSo I\u0027m going with you suggestion that is lot cleaner. Later in this series there is as fix for child on allocations but there we still intend to do the blind copy if the allocation is only on the root provider.","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"c78b5046f519eedbce0ae1fa409ba2d2d6a7977b","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                        \u0027on the source host so move cannot be forced.\u0027) %"},{"line_number":543,"context_line":"                      {\u0027instance_uuid\u0027: instance.uuid,"},{"line_number":544,"context_line":"                       \u0027host\u0027: dest_node.host})"},{"line_number":545,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":546,"context_line":"        alloc_request \u003d {"},{"line_number":547,"context_line":"            \u0027allocations\u0027: {"},{"line_number":548,"context_line":"                dest_node.uuid: {"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_70555451","line":545,"range":{"start_line":545,"start_character":18,"end_line":545,"end_character":54},"updated":"2018-10-16 01:56:47.000000000","message":"should we raise another exception? it does not seem NoValidHost for me","commit_id":"37800170a0081ff9197352192924f666aa382584"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"98ccda9687bd9533f01024b656561830299e2fb0","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                        \u0027on the source host so move cannot be forced.\u0027) %"},{"line_number":543,"context_line":"                      {\u0027instance_uuid\u0027: instance.uuid,"},{"line_number":544,"context_line":"                       \u0027host\u0027: dest_node.host})"},{"line_number":545,"context_line":"            raise exception.NoValidHost(reason\u003dreason)"},{"line_number":546,"context_line":"        alloc_request \u003d {"},{"line_number":547,"context_line":"            \u0027allocations\u0027: {"},{"line_number":548,"context_line":"                dest_node.uuid: {"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_c59824cd","line":545,"range":{"start_line":545,"start_character":18,"end_line":545,"end_character":54},"in_reply_to":"3f79a3b5_70555451","updated":"2018-10-16 08:53:56.000000000","message":"It was a but discussed in the spec [1], Quoting my view from there:\n\"\nWe have to look at two different cases again:\n\n1) source host allocation is flat. Nova will try the blind copy but dest host would require nested allocation as some of the resources need to be allocated from a child RP on the dest. As the blind copy tries to allocate that resource from the root of the dest placement will reject it that there is not enough inventory on the root. This cannot be differentiated from the case when a flat dest node does not have enough resource for the request. So here nova can only raise NoValidHost.\n\n2) source host allocation is nested. Nova detect that and does not even try the blind copy. So nova could raise whatever exception BUT raising different exception to the end user here would be confusing due to the fact that in #1) nova can only raise NoValidHost.\n\nSo in both #1 and #2 there are cases when we should raise ComplexAllocationNotSupportedWithForce as a reason of tha failure BUT Nova can only do that in #2. So I don\u0027t like the idea of mixing the exceptions.\n\nBTW, the message in the exception will be a bit more specific in case of #2) See the implementation patch in https://review.openstack.org/#/c/605785/12/nova/scheduler/utils.py\n\n\"\n[1] https://review.openstack.org/#/c/609330/","commit_id":"37800170a0081ff9197352192924f666aa382584"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        # Generate an allocation request for the destination node."},{"line_number":531,"context_line":"        # NOTE(gibi): if the source allocation allocates from more than one RP"},{"line_number":532,"context_line":"        # then we need to fail as the dest allocation might also need to be"},{"line_number":533,"context_line":"        # nested and we cannot calculate that allocation request properly"},{"line_number":534,"context_line":"        # without a placement allocation candidate call."},{"line_number":535,"context_line":"        # Alternatively we could sum up the source allocation and try to"},{"line_number":536,"context_line":"        # allocate that from the root RP of the dest host. It would only work"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_312cfefe","line":533,"range":{"start_line":533,"start_character":10,"end_line":533,"end_character":16},"updated":"2018-10-24 21:03:06.000000000","message":"Technically if we supported shared storage providers we could have two providers, VCPU and MEMORY_MB on the compute node provider and DISK_GB on the shared storage provider. I know we don\u0027t support shared storage providers, but it\u0027s something that came to mind while reading this.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"63764d7df410333234d29d3805d8faef4bd71bdc","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        # Generate an allocation request for the destination node."},{"line_number":531,"context_line":"        # NOTE(gibi): if the source allocation allocates from more than one RP"},{"line_number":532,"context_line":"        # then we need to fail as the dest allocation might also need to be"},{"line_number":533,"context_line":"        # nested and we cannot calculate that allocation request properly"},{"line_number":534,"context_line":"        # without a placement allocation candidate call."},{"line_number":535,"context_line":"        # Alternatively we could sum up the source allocation and try to"},{"line_number":536,"context_line":"        # allocate that from the root RP of the dest host. It would only work"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_6ec8451f","line":533,"range":{"start_line":533,"start_character":10,"end_line":533,"end_character":16},"in_reply_to":"3f79a3b5_312cfefe","updated":"2018-10-25 13:48:42.000000000","message":"I\u0027ve made the text more inclusive about shared :)","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"}],"nova/tests/functional/integrated_helpers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        self.useFixture(nova_fixtures.NeutronFixture(self))"},{"line_number":371,"context_line":"        self.useFixture(nova_fixtures.AllServicesCurrent())"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"        fake_notifier.stub_notifier(self)"},{"line_number":374,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        placement \u003d self.useFixture(nova_fixtures.PlacementFixture())"},{"line_number":377,"context_line":"        self.placement_api \u003d placement.api"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_63256c16","line":374,"range":{"start_line":373,"start_character":0,"end_line":374,"end_character":44},"updated":"2018-10-04 19:24:27.000000000","message":"^^","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":4893,"context_line":"        self.assertEqual("},{"line_number":4894,"context_line":"            self._resources_from_flavor(flavor), total_dest_allocation)"},{"line_number":4895,"context_line":""},{"line_number":4896,"context_line":"    def test_live_migrate_force(self):"},{"line_number":4897,"context_line":"        super(ServerMovingTestsWithNestedResourceRequests,"},{"line_number":4898,"context_line":"              self).test_live_migrate_force()"},{"line_number":4899,"context_line":"        self.assertIn(\u0027Nova ignores the force flag to go through the \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_4e0e57e5","line":4896,"updated":"2018-10-04 19:24:27.000000000","message":"Should we have a test for unforced live migration?","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0800526f7ed294e7283e02685b43e4ff44cc82da","unresolved":false,"context_lines":[{"line_number":4893,"context_line":"        self.assertEqual("},{"line_number":4894,"context_line":"            self._resources_from_flavor(flavor), total_dest_allocation)"},{"line_number":4895,"context_line":""},{"line_number":4896,"context_line":"    def test_live_migrate_force(self):"},{"line_number":4897,"context_line":"        super(ServerMovingTestsWithNestedResourceRequests,"},{"line_number":4898,"context_line":"              self).test_live_migrate_force()"},{"line_number":4899,"context_line":"        self.assertIn(\u0027Nova ignores the force flag to go through the \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_99352646","line":4896,"in_reply_to":"3f79a3b5_4e0e57e5","updated":"2018-10-10 16:03:20.000000000","message":"There is nova.tests.functional.test_servers.ServerMovingTests#test_live_migrate in the base class so we are covered.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":4937,"context_line":"class ServerMovingTestsFromFlatToNested("},{"line_number":4938,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":4939,"context_line":"    \"\"\"Tests moving servers from a compute with a flat RP tree to a compute"},{"line_number":4940,"context_line":"    with a nestd RP tree while checking the resource allocations and ."},{"line_number":4941,"context_line":"    \"\"\""},{"line_number":4942,"context_line":""},{"line_number":4943,"context_line":"    REQUIRES_LOCKING \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a3bf04aa","line":4940,"range":{"start_line":4940,"start_character":64,"end_line":4940,"end_character":70},"updated":"2018-10-04 19:24:27.000000000","message":"...\n\nI assume you were going to describe how and why this will fail :)","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":4946,"context_line":"    def setUp(self):"},{"line_number":4947,"context_line":"        super(ServerMovingTestsFromFlatToNested, self).setUp()"},{"line_number":4948,"context_line":"        flavors \u003d self.api.get_flavors()"},{"line_number":4949,"context_line":"        self.flavor1 \u003d flavors[0]"},{"line_number":4950,"context_line":"        self.api.post_extra_spec("},{"line_number":4951,"context_line":"            self.flavor1[\u0027id\u0027], {\u0027extra_specs\u0027: {\u0027resources:CUSTOM_MAGIC\u0027: 1}})"},{"line_number":4952,"context_line":"        self.flavor1[\u0027extra_specs\u0027] \u003d {\u0027resources:CUSTOM_MAGIC\u0027: 1}"},{"line_number":4953,"context_line":"        fake_notifier.stub_notifier(self)"},{"line_number":4954,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":4955,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a31b84c9","line":4952,"range":{"start_line":4949,"start_character":0,"end_line":4952,"end_character":67},"updated":"2018-10-04 19:24:27.000000000","message":"Guess I\u0027d feel better about\n\n self.flavor1 \u003d self.api.post_extra_spec(flavors[0][\u0027id\u0027], ...)","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0800526f7ed294e7283e02685b43e4ff44cc82da","unresolved":false,"context_lines":[{"line_number":4946,"context_line":"    def setUp(self):"},{"line_number":4947,"context_line":"        super(ServerMovingTestsFromFlatToNested, self).setUp()"},{"line_number":4948,"context_line":"        flavors \u003d self.api.get_flavors()"},{"line_number":4949,"context_line":"        self.flavor1 \u003d flavors[0]"},{"line_number":4950,"context_line":"        self.api.post_extra_spec("},{"line_number":4951,"context_line":"            self.flavor1[\u0027id\u0027], {\u0027extra_specs\u0027: {\u0027resources:CUSTOM_MAGIC\u0027: 1}})"},{"line_number":4952,"context_line":"        self.flavor1[\u0027extra_specs\u0027] \u003d {\u0027resources:CUSTOM_MAGIC\u0027: 1}"},{"line_number":4953,"context_line":"        fake_notifier.stub_notifier(self)"},{"line_number":4954,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":4955,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_191356b9","line":4952,"range":{"start_line":4949,"start_character":0,"end_line":4952,"end_character":67},"in_reply_to":"3f79a3b5_a31b84c9","updated":"2018-10-10 16:03:20.000000000","message":"extra_spec api does not return a full flavor object :/","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":4950,"context_line":"        self.api.post_extra_spec("},{"line_number":4951,"context_line":"            self.flavor1[\u0027id\u0027], {\u0027extra_specs\u0027: {\u0027resources:CUSTOM_MAGIC\u0027: 1}})"},{"line_number":4952,"context_line":"        self.flavor1[\u0027extra_specs\u0027] \u003d {\u0027resources:CUSTOM_MAGIC\u0027: 1}"},{"line_number":4953,"context_line":"        fake_notifier.stub_notifier(self)"},{"line_number":4954,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":4955,"context_line":""},{"line_number":4956,"context_line":"    def test_force_live_migrate_from_flat_to_nested(self):"},{"line_number":4957,"context_line":"        # first compute will start with the flat RP tree but we add"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_e3f3bc9f","line":4954,"range":{"start_line":4953,"start_character":8,"end_line":4954,"end_character":44},"updated":"2018-10-04 19:24:27.000000000","message":"This is no longer necessary (it\u0027s in the base class)","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0800526f7ed294e7283e02685b43e4ff44cc82da","unresolved":false,"context_lines":[{"line_number":4950,"context_line":"        self.api.post_extra_spec("},{"line_number":4951,"context_line":"            self.flavor1[\u0027id\u0027], {\u0027extra_specs\u0027: {\u0027resources:CUSTOM_MAGIC\u0027: 1}})"},{"line_number":4952,"context_line":"        self.flavor1[\u0027extra_specs\u0027] \u003d {\u0027resources:CUSTOM_MAGIC\u0027: 1}"},{"line_number":4953,"context_line":"        fake_notifier.stub_notifier(self)"},{"line_number":4954,"context_line":"        self.addCleanup(fake_notifier.reset)"},{"line_number":4955,"context_line":""},{"line_number":4956,"context_line":"    def test_force_live_migrate_from_flat_to_nested(self):"},{"line_number":4957,"context_line":"        # first compute will start with the flat RP tree but we add"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_391df2bd","line":4954,"range":{"start_line":4953,"start_character":8,"end_line":4954,"end_character":44},"in_reply_to":"3f79a3b5_e3f3bc9f","updated":"2018-10-10 16:03:20.000000000","message":"Done","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":4976,"context_line":"                }"},{"line_number":4977,"context_line":"                provider_tree.update_inventory(nodename, inv)"},{"line_number":4978,"context_line":""},{"line_number":4979,"context_line":"        self.stub_out(\u0027nova.virt.fake.FakeDriver.update_provider_tree\u0027,"},{"line_number":4980,"context_line":"                      stub_update_provider_tree)"},{"line_number":4981,"context_line":"        self.compute1 \u003d self._start_compute(host\u003d\u0027host1\u0027)"},{"line_number":4982,"context_line":"        source_rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":4983,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_635c8c80","line":4980,"range":{"start_line":4979,"start_character":8,"end_line":4980,"end_character":47},"updated":"2018-10-04 19:24:27.000000000","message":"are you *trying* to get me in trouble with mriedem?","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0800526f7ed294e7283e02685b43e4ff44cc82da","unresolved":false,"context_lines":[{"line_number":4976,"context_line":"                }"},{"line_number":4977,"context_line":"                provider_tree.update_inventory(nodename, inv)"},{"line_number":4978,"context_line":""},{"line_number":4979,"context_line":"        self.stub_out(\u0027nova.virt.fake.FakeDriver.update_provider_tree\u0027,"},{"line_number":4980,"context_line":"                      stub_update_provider_tree)"},{"line_number":4981,"context_line":"        self.compute1 \u003d self._start_compute(host\u003d\u0027host1\u0027)"},{"line_number":4982,"context_line":"        source_rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":4983,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_5918eecb","line":4980,"range":{"start_line":4979,"start_character":8,"end_line":4980,"end_character":47},"in_reply_to":"3f79a3b5_635c8c80","updated":"2018-10-10 16:03:20.000000000","message":"this is a one time change for what I didn\u0027t wanted to introduce yet another driver class. But I can be convinced :)","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":5000,"context_line":"        # We expect that the migration will fail as force migrate tries to"},{"line_number":5001,"context_line":"        # blindly copy the source allocation to the destination but on the"},{"line_number":5002,"context_line":"        # destination there is no inventory of CUSTOM_MAGIC on the compute node"},{"line_number":5003,"context_line":"        # provider as that resource is reported on a child provider."},{"line_number":5004,"context_line":"        self._wait_for_server_parameter(self.api, server,"},{"line_number":5005,"context_line":"            {\u0027OS-EXT-SRV-ATTR:host\u0027: \u0027host1\u0027,"},{"line_number":5006,"context_line":"             \u0027status\u0027: \u0027ACTIVE\u0027})"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_e3fdfc3c","line":5003,"updated":"2018-10-04 19:24:27.000000000","message":"...because MediumFakeDriverWithNestedCustomResources sets that up. I had to go look to double-check that. Otherwise this could fail simply because there\u0027s no CUSTOM_MAGIC *anywhere* on the destination. If somebody mucks with MFDWNCR in the future, this will still fail, but for a different reason, and we won\u0027t know it. As a defensive measure, we should validate the structure at the destination.","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2143b12390acebd284b26fa9b99218ed29d0803a","unresolved":false,"context_lines":[{"line_number":5009,"context_line":"        self.assertEqual(\u0027host1\u0027, migration[\u0027source_compute\u0027])"},{"line_number":5010,"context_line":"        self.assertEqual(\u0027host2\u0027, migration[\u0027dest_compute\u0027])"},{"line_number":5011,"context_line":""},{"line_number":5012,"context_line":"        # Nova fails the migration because it ties to allocation CUSTOM_MAGIC"},{"line_number":5013,"context_line":"        # from the dest node root RP and placement rejects the that allocation."},{"line_number":5014,"context_line":"        self.assertIn(\"Unable to allocate inventory: Inventory for \""},{"line_number":5015,"context_line":"                      \"\u0027CUSTOM_MAGIC\u0027\", self.stdlog.logger.output)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_aee04b29","line":5012,"range":{"start_line":5012,"start_character":46,"end_line":5012,"end_character":64},"updated":"2018-10-04 19:24:27.000000000","message":"tries to allocate","commit_id":"f1a6e5f8255453e48921a2eda5d012ec05038099"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":4966,"context_line":""},{"line_number":4967,"context_line":"    def test_live_migrate_force(self):"},{"line_number":4968,"context_line":"        # Nova intentionally does not support force live-migrating server"},{"line_number":4969,"context_line":"        # with nested allocations if the destination node would also require"},{"line_number":4970,"context_line":"        # nested allocation for the server."},{"line_number":4971,"context_line":""},{"line_number":4972,"context_line":"        source_hostname \u003d self.compute1.host"},{"line_number":4973,"context_line":"        dest_hostname \u003d self.compute2.host"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_c16127aa","line":4970,"range":{"start_line":4969,"start_character":33,"end_line":4970,"end_character":42},"updated":"2018-10-12 22:43:49.000000000","message":"strike","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":4966,"context_line":""},{"line_number":4967,"context_line":"    def test_live_migrate_force(self):"},{"line_number":4968,"context_line":"        # Nova intentionally does not support force live-migrating server"},{"line_number":4969,"context_line":"        # with nested allocations if the destination node would also require"},{"line_number":4970,"context_line":"        # nested allocation for the server."},{"line_number":4971,"context_line":""},{"line_number":4972,"context_line":"        source_hostname \u003d self.compute1.host"},{"line_number":4973,"context_line":"        dest_hostname \u003d self.compute2.host"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_8c7594cb","line":4970,"range":{"start_line":4969,"start_character":33,"end_line":4970,"end_character":42},"in_reply_to":"3f79a3b5_c16127aa","updated":"2018-10-15 09:14:59.000000000","message":"Done","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":5008,"context_line":""},{"line_number":5009,"context_line":"    def test_evacuate_forced_host(self):"},{"line_number":5010,"context_line":"        # Nova intentionally does not support force evacuating server"},{"line_number":5011,"context_line":"        # with nested allocations if the destination node would also require"},{"line_number":5012,"context_line":"        # nested allocation for the server."},{"line_number":5013,"context_line":""},{"line_number":5014,"context_line":"        source_hostname \u003d self.compute1.host"},{"line_number":5015,"context_line":"        dest_hostname \u003d self.compute2.host"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_6107f3c9","line":5012,"range":{"start_line":5011,"start_character":33,"end_line":5012,"end_character":42},"updated":"2018-10-12 22:43:49.000000000","message":"strike","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":5008,"context_line":""},{"line_number":5009,"context_line":"    def test_evacuate_forced_host(self):"},{"line_number":5010,"context_line":"        # Nova intentionally does not support force evacuating server"},{"line_number":5011,"context_line":"        # with nested allocations if the destination node would also require"},{"line_number":5012,"context_line":"        # nested allocation for the server."},{"line_number":5013,"context_line":""},{"line_number":5014,"context_line":"        source_hostname \u003d self.compute1.host"},{"line_number":5015,"context_line":"        dest_hostname \u003d self.compute2.host"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_2c4a4082","line":5012,"range":{"start_line":5011,"start_character":33,"end_line":5012,"end_character":42},"in_reply_to":"3f79a3b5_6107f3c9","updated":"2018-10-15 09:14:59.000000000","message":"Done","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":5082,"context_line":"class ServerMovingTestsFromFlatToNested("},{"line_number":5083,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":5084,"context_line":"    \"\"\"Tests moving servers from a compute with a flat RP tree to a compute"},{"line_number":5085,"context_line":"    with a nested RP tree while checking the resource allocations and ."},{"line_number":5086,"context_line":"    \"\"\""},{"line_number":5087,"context_line":""},{"line_number":5088,"context_line":"    REQUIRES_LOCKING \u003d True"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_e1fa23b9","line":5085,"range":{"start_line":5085,"start_character":53,"end_line":5085,"end_character":71},"updated":"2018-10-12 22:43:49.000000000","message":"...","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":5082,"context_line":"class ServerMovingTestsFromFlatToNested("},{"line_number":5083,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":5084,"context_line":"    \"\"\"Tests moving servers from a compute with a flat RP tree to a compute"},{"line_number":5085,"context_line":"    with a nested RP tree while checking the resource allocations and ."},{"line_number":5086,"context_line":"    \"\"\""},{"line_number":5087,"context_line":""},{"line_number":5088,"context_line":"    REQUIRES_LOCKING \u003d True"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ec3448fc","line":5085,"range":{"start_line":5085,"start_character":53,"end_line":5085,"end_character":71},"in_reply_to":"3f79a3b5_e1fa23b9","updated":"2018-10-15 09:14:59.000000000","message":"Done","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":5157,"context_line":"        self.assertIn(\"Unable to allocate inventory: Inventory for \""},{"line_number":5158,"context_line":"                      \"\u0027CUSTOM_MAGIC\u0027\", self.stdlog.logger.output)"},{"line_number":5159,"context_line":"        self.assertIn(\u0027No valid host was found. Unable to move instance %s to \u0027"},{"line_number":5160,"context_line":"                      \u0027host host2. There is not enough capacity on the host \u0027"},{"line_number":5161,"context_line":"                      \u0027for the instance.\u0027 % server[\u0027id\u0027],"},{"line_number":5162,"context_line":"                      self.stdlog.logger.output)"},{"line_number":5163,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_01f87fbe","line":5160,"range":{"start_line":5160,"start_character":35,"end_line":5160,"end_character":63},"updated":"2018-10-12 22:43:49.000000000","message":"✔\n\nCan we do a similar check of the error content in the ServerMovingTestsWithNestedResourceRequests force tests above? I.e. making sure the \"we punted because the source had complex allocations\" message is in there?","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":5157,"context_line":"        self.assertIn(\"Unable to allocate inventory: Inventory for \""},{"line_number":5158,"context_line":"                      \"\u0027CUSTOM_MAGIC\u0027\", self.stdlog.logger.output)"},{"line_number":5159,"context_line":"        self.assertIn(\u0027No valid host was found. Unable to move instance %s to \u0027"},{"line_number":5160,"context_line":"                      \u0027host host2. There is not enough capacity on the host \u0027"},{"line_number":5161,"context_line":"                      \u0027for the instance.\u0027 % server[\u0027id\u0027],"},{"line_number":5162,"context_line":"                      self.stdlog.logger.output)"},{"line_number":5163,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_472675bc","line":5160,"range":{"start_line":5160,"start_character":35,"end_line":5160,"end_character":63},"in_reply_to":"3f79a3b5_01f87fbe","updated":"2018-10-15 09:14:59.000000000","message":"Sure, good point. Done.","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":5335,"context_line":"        self.assertEqual(\u0027host1\u0027, migration[\u0027source_compute\u0027])"},{"line_number":5336,"context_line":"        self.assertEqual(\u0027host2\u0027, migration[\u0027dest_compute\u0027])"},{"line_number":5337,"context_line":""},{"line_number":5338,"context_line":"        self.assertIn(\u0027Unable to move instance %s to host host2. The instance \u0027"},{"line_number":5339,"context_line":"                      \u0027has complex allocation on the source host so move \u0027"},{"line_number":5340,"context_line":"                      \u0027cannot be forced.\u0027 %"},{"line_number":5341,"context_line":"                      server[\u0027id\u0027],"},{"line_number":5342,"context_line":"                      self.stdlog.logger.output)"},{"line_number":5343,"context_line":""},{"line_number":5344,"context_line":"        dest_rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host2\u0027)"},{"line_number":5345,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_211edb0c","line":5342,"range":{"start_line":5338,"start_character":8,"end_line":5342,"end_character":48},"updated":"2018-10-12 22:43:49.000000000","message":"Yeah, like this.","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f15b127218009074a6c4378ad18c8120cb3e595","unresolved":false,"context_lines":[{"line_number":5427,"context_line":"        self.assertEqual(\u0027host2\u0027, migration[\u0027dest_compute\u0027])"},{"line_number":5428,"context_line":""},{"line_number":5429,"context_line":"        self.assertIn(\u0027Unable to move instance %s to host host2. The instance \u0027"},{"line_number":5430,"context_line":"                      \u0027has complex allocation on the source host so move \u0027"},{"line_number":5431,"context_line":"                      \u0027cannot be forced.\u0027 %"},{"line_number":5432,"context_line":"                      server[\u0027id\u0027],"},{"line_number":5433,"context_line":"                      self.stdlog.logger.output)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_7401cb38","line":5430,"range":{"start_line":5430,"start_character":35,"end_line":5430,"end_character":45},"updated":"2018-10-15 22:25:19.000000000","message":"allocations","commit_id":"5691f7462aec87c81f94f5d639af98feeaf76fda"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":2497,"context_line":""},{"line_number":2498,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":2499,"context_line":""},{"line_number":2500,"context_line":"    def test_evacuate_host_specified_but_not_forced(self):"},{"line_number":2501,"context_line":"        \"\"\"Evacuating a server with a host but using the scheduler to create"},{"line_number":2502,"context_line":"        the allocations against the destination node. This test recreates the"},{"line_number":2503,"context_line":"        scenarios and asserts the allocations on the source and destination"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_51589a87","line":2500,"range":{"start_line":2500,"start_character":8,"end_line":2500,"end_character":51},"updated":"2018-10-24 21:03:06.000000000","message":"I would think we already had a functional test for this somewhere...like SchedulerOnlyChecksTargetTest.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c9b1acc75a27b08742e4c2afbd14bd729cc5acb5","unresolved":false,"context_lines":[{"line_number":2497,"context_line":""},{"line_number":2498,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":2499,"context_line":""},{"line_number":2500,"context_line":"    def test_evacuate_host_specified_but_not_forced(self):"},{"line_number":2501,"context_line":"        \"\"\"Evacuating a server with a host but using the scheduler to create"},{"line_number":2502,"context_line":"        the allocations against the destination node. This test recreates the"},{"line_number":2503,"context_line":"        scenarios and asserts the allocations on the source and destination"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_45ae542f","line":2500,"range":{"start_line":2500,"start_character":8,"end_line":2500,"end_character":51},"in_reply_to":"3f79a3b5_0f58ab22","updated":"2018-10-29 09:02:20.000000000","message":"Added a note in the followup","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e635cd6fbd9ab6f90dcfc4d309a53462b0a9501","unresolved":false,"context_lines":[{"line_number":2497,"context_line":""},{"line_number":2498,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":2499,"context_line":""},{"line_number":2500,"context_line":"    def test_evacuate_host_specified_but_not_forced(self):"},{"line_number":2501,"context_line":"        \"\"\"Evacuating a server with a host but using the scheduler to create"},{"line_number":2502,"context_line":"        the allocations against the destination node. This test recreates the"},{"line_number":2503,"context_line":"        scenarios and asserts the allocations on the source and destination"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_0f58ab22","line":2500,"range":{"start_line":2500,"start_character":8,"end_line":2500,"end_character":51},"in_reply_to":"3f79a3b5_2e848db1","updated":"2018-10-25 14:44:45.000000000","message":"OK, it might be good to leave a NOTE mentioning that with the test so that someone doesn\u0027t later think it\u0027s redundant and remove it.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"63764d7df410333234d29d3805d8faef4bd71bdc","unresolved":false,"context_lines":[{"line_number":2497,"context_line":""},{"line_number":2498,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":2499,"context_line":""},{"line_number":2500,"context_line":"    def test_evacuate_host_specified_but_not_forced(self):"},{"line_number":2501,"context_line":"        \"\"\"Evacuating a server with a host but using the scheduler to create"},{"line_number":2502,"context_line":"        the allocations against the destination node. This test recreates the"},{"line_number":2503,"context_line":"        scenarios and asserts the allocations on the source and destination"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_2e848db1","line":2500,"range":{"start_line":2500,"start_character":8,"end_line":2500,"end_character":51},"in_reply_to":"3f79a3b5_51589a87","updated":"2018-10-25 13:48:42.000000000","message":"We need it in this test class so that we can reuse it in all the derived test classes which test nested allocations and children only allocations.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8577e40900f159eb1a4a27431ffea07daf483627","unresolved":false,"context_lines":[{"line_number":5272,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":5273,"context_line":""},{"line_number":5274,"context_line":""},{"line_number":5275,"context_line":"class ServerMovingTestsFromNestedToFlat("},{"line_number":5276,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":5277,"context_line":"    \"\"\"Tests trying to move servers with nested allocation to a compute"},{"line_number":5278,"context_line":"    with a single root RP and assert that nova rejects such move cleanly."}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_11fc623d","line":5275,"range":{"start_line":5275,"start_character":6,"end_line":5275,"end_character":39},"updated":"2018-10-24 21:03:06.000000000","message":"The tests here seem redundant with the tests above...","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c9b1acc75a27b08742e4c2afbd14bd729cc5acb5","unresolved":false,"context_lines":[{"line_number":5272,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":5273,"context_line":""},{"line_number":5274,"context_line":""},{"line_number":5275,"context_line":"class ServerMovingTestsFromNestedToFlat("},{"line_number":5276,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":5277,"context_line":"    \"\"\"Tests trying to move servers with nested allocation to a compute"},{"line_number":5278,"context_line":"    with a single root RP and assert that nova rejects such move cleanly."}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_0527fcc9","line":5275,"range":{"start_line":5275,"start_character":6,"end_line":5275,"end_character":39},"in_reply_to":"3f79a3b5_0f866b60","updated":"2018-10-29 09:02:20.000000000","message":"Yes and no :)\nThe difference is that L4967 runs the evacuation from Nested to Nested while L5368 runs the evacuation from Nested to Flat.\nBut you are right that in both case the evacuation (and the live migration) is aborted due to the same reason, that the instance has complex allocation on the source host. \n\nThis is really redundant as the code does not care about the target host RP tree in these cases. So I\u0027m replacing these tests with a note in a follow up.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"63764d7df410333234d29d3805d8faef4bd71bdc","unresolved":false,"context_lines":[{"line_number":5272,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":5273,"context_line":""},{"line_number":5274,"context_line":""},{"line_number":5275,"context_line":"class ServerMovingTestsFromNestedToFlat("},{"line_number":5276,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":5277,"context_line":"    \"\"\"Tests trying to move servers with nested allocation to a compute"},{"line_number":5278,"context_line":"    with a single root RP and assert that nova rejects such move cleanly."}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_6e64c520","line":5275,"range":{"start_line":5275,"start_character":6,"end_line":5275,"end_character":39},"in_reply_to":"3f79a3b5_11fc623d","updated":"2018-10-25 13:48:42.000000000","message":"The above test class ServerMovingTestsFromFlatToNested moves VMs from a source host where it has flat allocations to a target host where they would need nested allocations. This test class ServerMovingTestsFromNestedToFlat do it in the other direction so the VM has nested allocation on the source host but would need flat allocation on the target host.\n\nI don\u0027t think these tests are redundant.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e635cd6fbd9ab6f90dcfc4d309a53462b0a9501","unresolved":false,"context_lines":[{"line_number":5272,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":5273,"context_line":""},{"line_number":5274,"context_line":""},{"line_number":5275,"context_line":"class ServerMovingTestsFromNestedToFlat("},{"line_number":5276,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":5277,"context_line":"    \"\"\"Tests trying to move servers with nested allocation to a compute"},{"line_number":5278,"context_line":"    with a single root RP and assert that nova rejects such move cleanly."}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_0f866b60","line":5275,"range":{"start_line":5275,"start_character":6,"end_line":5275,"end_character":39},"in_reply_to":"3f79a3b5_6e64c520","updated":"2018-10-25 14:44:45.000000000","message":"No I mean the ones on L4967 and L5013. Both of those are testing forcing live migrate/evacuate with nested allocations on the source, which is what this is doing.","commit_id":"92af3c5f8517b6670854453251ffeb6e7a064bbe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"db6b68bc9a5c75597e9fa5b9e15d309ce5a742d8","unresolved":false,"context_lines":[{"line_number":5272,"context_line":"        self._delete_and_check_allocations(server)"},{"line_number":5273,"context_line":""},{"line_number":5274,"context_line":""},{"line_number":5275,"context_line":"class ServerMovingTestsFromNestedToFlat("},{"line_number":5276,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":5277,"context_line":"    \"\"\"Tests trying to move servers with nested allocation to a compute"},{"line_number":5278,"context_line":"    with a single root RP and assert that nova rejects such move cleanly."}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_55de2d0f","line":5275,"range":{"start_line":5275,"start_character":6,"end_line":5275,"end_character":39},"updated":"2018-10-25 18:48:58.000000000","message":"I think https://review.openstack.org/#/c/605785/15/nova/tests/functional/test_servers.py@5275 still stands, but would like a response before moving forward (with my vote anyway).","commit_id":"fd351903a1759109f66d0c66d42cd3a1b7f23861"}],"nova/tests/unit/scheduler/test_utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0518d0f98d6d4168d842b8618b76698e14607f0e","unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"        test()"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    def test_claim_resources_on_destination_fails_with_complex_allocation("},{"line_number":878,"context_line":"            self):"},{"line_number":879,"context_line":"        \"\"\"Test that nova raises when the server has complex allocation on the"},{"line_number":880,"context_line":"        source host."}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_e1e8e3e0","line":877,"range":{"start_line":877,"start_character":8,"end_line":877,"end_character":73},"updated":"2018-10-12 22:43:49.000000000","message":"Do we need this? Seems like the func tests cover it adequately. What is this adding?","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"281dabe6ab3d6d49e8cfdbdb7ecfe8d87f1c57c3","unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"        test()"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    def test_claim_resources_on_destination_fails_with_complex_allocation("},{"line_number":878,"context_line":"            self):"},{"line_number":879,"context_line":"        \"\"\"Test that nova raises when the server has complex allocation on the"},{"line_number":880,"context_line":"        source host."}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_87b24d49","line":877,"range":{"start_line":877,"start_character":8,"end_line":877,"end_character":73},"in_reply_to":"3f79a3b5_e1e8e3e0","updated":"2018-10-15 09:14:59.000000000","message":"True. Same case is covered by func test. So I\u0027m dropping this unit test.","commit_id":"7d13a181a86c2d14757d0f9e64b3baec8f4be035"}]}
