)]}'
{"specs/rocky/approved/allow-reserved-equal-total-inventory.rst":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"485f85db80c42e5caf4d1564e5e8328ebf068b48","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Deleting resource provider inventory should mean that it is actually gone."},{"line_number":23,"context_line":"For purposes of indicating that resources are temporarily unavailable"},{"line_number":24,"context_line":"placement provides the ``reserved`` field in the inventory object. "},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Use Cases"},{"line_number":27,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_3a6c99cc","line":24,"updated":"2018-05-15 15:09:50.000000000","message":"doh","commit_id":"e0819cfe4970cff10ba495611bba7c2189030433"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"485f85db80c42e5caf4d1564e5e8328ebf068b48","unresolved":false,"context_lines":[{"line_number":128,"context_line":"Dependencies"},{"line_number":129,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"Some Cyborg spec here?"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Testing"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_ba9d09bd","line":131,"updated":"2018-05-15 15:09:50.000000000","message":"could you suggest if there is a spec talking in detail about interactions with placement?","commit_id":"e0819cfe4970cff10ba495611bba7c2189030433"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c15802dd8a980c697bfe678498dab70c8131538a","unresolved":false,"context_lines":[{"line_number":128,"context_line":"Dependencies"},{"line_number":129,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"Some Cyborg spec here?"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Testing"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_9ad28dd0","line":131,"in_reply_to":"5f7c97a3_ba9d09bd","updated":"2018-05-15 15:34:37.000000000","message":"You don\u0027t need to list dependencies *to* this spec; just dependencies *from* it.  So the answer here is None.","commit_id":"e0819cfe4970cff10ba495611bba7c2189030433"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c15802dd8a980c697bfe678498dab70c8131538a","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Allow having placement inventories with reserved value equal to total"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/allow-reserved-equal-total-inventory  # noqa"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently, we delete ironic node resource provider inventory from placement"},{"line_number":14,"context_line":"to indicate that the node is not available for deployment during the cleaning"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_baf2e96e","line":11,"range":{"start_line":11,"start_character":82,"end_line":11,"end_character":88},"updated":"2018-05-15 15:34:37.000000000","message":"This isn\u0027t necessary","commit_id":"64df416299321db72ab07da7c06cb45da74d3ac3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32470223c42b773518ad88cbbcd547472e2495f3","unresolved":false,"context_lines":[{"line_number":16,"context_line":"reserve all the inventory, which describes more accurately what is going on."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Deleting resource provider inventory should mean that it is actually gone."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_cb011507","line":19,"updated":"2018-05-15 17:07:58.000000000","message":"This doesn\u0027t really describe the problem - so what if we delete the inventory? What does this break?\n\nThe related bug 1768500 doesn\u0027t have much information either, it just refers to the PTG:\n\nhttps://etherpad.openstack.org/p/nova-ptg-rocky\n\nAnd what I find in there is this:\n\n    virt driver interactions - we keep duct taping hacks on top\n\n    should step back, look at the big picture, figure out how this should really work\n\n    AGREE: For the issue of nova-compute crashing on startup, try-except around call site at startup and raise NotReadyYet exception that we can ignore\n\n    jroll to update https://review.openstack.org/#/c/545479/\n\n    AGREE: For the issue of maintenance-state Ironic nodes, the Ironic virt driver shall set reserved\u003d1 for the custom resource class inventory record instead of returning no inventory records.\n\n    Race where between the time we delete an allocation and when the ironic driver knows that and sets reserved\u003d1, the node could get reallocated in the meantime, bad.\n\n    Idea: ironic virt driver sets reserved+1, first thing in spawn, to cover the node up front, so that when the allocation is deleted, the reserved count is already covering the node.\n\n    Other idea: could we bump reserved+1 prior to releasing the node during driver.destroy()? This means we don\u0027t have the oddness of an instance using reserved resources\n\n--\n\nSo that gives more idea on the problem, and should be described in the spec, not just \"we should do this other thing because we can\".","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9a0da43db8ccabbd948651f27d93815bf7bd8793","unresolved":false,"context_lines":[{"line_number":16,"context_line":"reserve all the inventory, which describes more accurately what is going on."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Deleting resource provider inventory should mean that it is actually gone."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_fa4dbc3a","line":19,"in_reply_to":"5f7c97a3_462adcda","updated":"2018-05-15 18:47:28.000000000","message":"\"This doesn\u0027t really describe the problem - so what if we delete the inventory? What does this break?\"\n\nIf I have a vending machine full of Coke cans, and the vending machine has a shelf that is out of order, does that mean the vending machine has no inventory of Coke? No, of course not. It just means that that that shelf of inventory is essentially locked from being consumed temporarily.\n\nThe same situation can be said of the Ironic virt driver which manages many Ironic baremetal resource nodes and one of those nodes is currently in a maintenance mode. Deleting the inventory would be saying that the baremetal resource node doesn\u0027t exist any more. But that isn\u0027t the case. It\u0027s just that the baremetal resource node is not able to be given to another consumer. You might say that it is \"being consumed\" by the Ironic virt driver -- in other words, it\u0027s \"reserved\".\n\nIf we were to continue having the Ironic virt driver delete the inventory record for a particular Ironic resource node, we would continue to get an inaccurate picture of the total number of Ironic baremetal resources in the deployment (the total amount of nodes would fluctuate improperly instead of the total amount of *used/reserved* resources). By setting the reserved \u003d total, we are able to do report usage and inventory/capacity information accurately.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f80e5befc77bb2730dbabbae14474682ca741422","unresolved":false,"context_lines":[{"line_number":16,"context_line":"reserve all the inventory, which describes more accurately what is going on."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Deleting resource provider inventory should mean that it is actually gone."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_462adcda","line":19,"in_reply_to":"5f7c97a3_cb011507","updated":"2018-05-15 18:21:07.000000000","message":"I think all the issues outlined here are already solved apart from the race between allocation deletion and setting reserved\u003d1 which is I think an issue that was thought to exist in the supposed implementation, and the current patch deals with this setting reserved\u003d1 before deleting the allocation.\n\nSo I think yes, the change proposed here is more of ideological, rather than fixing some issue.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32470223c42b773518ad88cbbcd547472e2495f3","unresolved":false,"context_lines":[{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Leave things as they are, deleting inventory instead of reserving it."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_2b444946","line":49,"updated":"2018-05-15 17:07:58.000000000","message":"So just \"None\".","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f80e5befc77bb2730dbabbae14474682ca741422","unresolved":false,"context_lines":[{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Leave things as they are, deleting inventory instead of reserving it."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_66259808","line":49,"in_reply_to":"5f7c97a3_2b444946","updated":"2018-05-15 18:21:07.000000000","message":"will do","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32470223c42b773518ad88cbbcd547472e2495f3","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_cb9d95bc","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"updated":"2018-05-15 17:07:58.000000000","message":"There isn\u0027t a POST for this is there? Oh I guess there is, but it\u0027s not documented for some reason:\n\nhttps://github.com/openstack/nova/blob/8d5a68944ae738e3f19f8f7f8f03506d6c8fd678/nova/api/openstack/placement/handler.py#L84","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f80e5befc77bb2730dbabbae14474682ca741422","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_e67e88e2","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"in_reply_to":"5f7c97a3_0b1aad15","updated":"2018-05-15 18:21:07.000000000","message":"I can do the removal in the same mv if others are ok with it.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"24291cbafedd1b2ed21033f377d94a86fa2e93d2","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_68deb93e","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"in_reply_to":"5f7c97a3_5a20709b","updated":"2018-05-16 08:40:13.000000000","message":"ok I will remove POST mentions. but in code I think I still should allow this in POST too.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dcdb42cd8558241eff08691b0b3afffde27eff3d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_28cafc9f","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"in_reply_to":"5f7c97a3_68deb93e","updated":"2018-05-16 12:44:45.000000000","message":"\u003e ok I will remove POST mentions. but in code I think I still should allow this in POST too.\n\nThis is the crux of the issue with trying to \"hide\" an API - it\u0027s there, even if undocumented, so if we\u0027re going to be making changes to PUT /resource_providers/{uuid}/inventories (and PUT /resource_providers/{uuid}/inventories/{resource_class}), then we should probably also reflect that same change in POST /resource_providers/{uuid}/inventories because it does the same thing. So either we make the change in all three APIs, or we deprecate the POST one if we don\u0027t like it semantically. We can\u0027t remove it, but we can cap its max microversion so requests after that version get a 404 back and we mark it as deprecated in code (and document it as deprecated rather than omit it from the API reference).","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d064d021435e87ccdd17cb3585c30be103db6eb8","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_0b1aad15","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"in_reply_to":"5f7c97a3_cb9d95bc","updated":"2018-05-15 17:12:10.000000000","message":"Explanation is in:\n\nhttps://review.openstack.org/#/c/512215/\n\nJay Pipes\nDec 19 7:33 AM\n\nPatch Set 10: Code-Review-2\n\nThe POST /resource_providers/{uuid}/inventories API call should not be documented IMHO. It does not have a correct response value (missing any indication of the resource_class that was created and it is not compatible with the dict-style return from PUT /resource_providers/{uuid}/inventories.\n\nWe do not actually call POST /resource_providers/{uuid}/inventories anyway in the codebase outside of tests. Instead, we only use the PUT /resource_providers/{uuid}/inventories call, which I think is more appropriate and cleaner. I\u0027d prefer to just remove the single-item POST /resource_providers/{uuid}/inventories endpoint entirely.\n\n--\n\nMaybe we should consider using this microversion to deprecate the POST /resource_providers/UUID/inventories route.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bd1d106bb0e2b84f08b1b895f279f97536d4011c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_7a71aca7","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"in_reply_to":"5f7c97a3_e67e88e2","updated":"2018-05-15 18:34:41.000000000","message":"Belay that since cdent seems to disagree with deprecating it.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9a0da43db8ccabbd948651f27d93815bf7bd8793","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_5a20709b","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"in_reply_to":"5f7c97a3_e67e88e2","updated":"2018-05-15 18:47:28.000000000","message":"I had missed that you referenced the POST  /resource_providers/{uuid}/inventories URI here. Yes, please only reference PUT. Don\u0027t do anything with POST. Just leave it.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"484dc74353f3eb04cf5a3b18c59bf976a4129987","unresolved":false,"context_lines":[{"line_number":56,"context_line":"REST API impact"},{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_1a151840","line":59,"range":{"start_line":59,"start_character":2,"end_line":59,"end_character":6},"in_reply_to":"5f7c97a3_e67e88e2","updated":"2018-05-15 18:35:22.000000000","message":"No, we can\u0027t remove the API, and if we could, that would happen somewhere other than this bp/spec/microversion.\n\nLet\u0027s also avoid \"correcting\" the lack of documentation here.\n\nThese are clearly separate cans of worms that shouldn\u0027t hold up this small and simple piece of work.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32470223c42b773518ad88cbbcd547472e2495f3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"},{"line_number":63,"context_line":"value equal to total."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_6bac81ec","line":60,"updated":"2018-05-15 17:07:58.000000000","message":"You are missing PUT for a specific resource class:\n\nhttps://developer.openstack.org/api-ref/placement/#update-resource-provider-inventory","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f80e5befc77bb2730dbabbae14474682ca741422","unresolved":false,"context_lines":[{"line_number":57,"context_line":"---------------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"``POST /resource_providers/UUID/inventories`` and"},{"line_number":60,"context_line":"``PUT /resource_providers/UUID/inventories`` API endpoints will return"},{"line_number":61,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":62,"context_line":"new microversion and body containing inventory records that have reserved"},{"line_number":63,"context_line":"value equal to total."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_a68410d4","line":60,"in_reply_to":"5f7c97a3_6bac81ec","updated":"2018-05-15 18:21:07.000000000","message":"yup will add","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32470223c42b773518ad88cbbcd547472e2495f3","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Example request:"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"path -- ``POST /resource_providers/UUID/inventories``"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"headers -- ``Content-type: application/json``,"},{"line_number":70,"context_line":"           ``Openstack-API-Version: placement 1.NEW_MV``"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_2b5d2914","line":67,"range":{"start_line":67,"start_character":10,"end_line":67,"end_character":14},"updated":"2018-05-15 17:07:58.000000000","message":"Should probably document PUT since POST isn\u0027t even in the API reference.\n\nhttps://developer.openstack.org/api-ref/placement/#update-resource-provider-inventories","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f80e5befc77bb2730dbabbae14474682ca741422","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Example request:"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"path -- ``POST /resource_providers/UUID/inventories``"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"headers -- ``Content-type: application/json``,"},{"line_number":70,"context_line":"           ``Openstack-API-Version: placement 1.NEW_MV``"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_466f3c2a","line":67,"range":{"start_line":67,"start_character":10,"end_line":67,"end_character":14},"in_reply_to":"5f7c97a3_2b5d2914","updated":"2018-05-15 18:21:07.000000000","message":"okie","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32470223c42b773518ad88cbbcd547472e2495f3","unresolved":false,"context_lines":[{"line_number":69,"context_line":"headers -- ``Content-type: application/json``,"},{"line_number":70,"context_line":"           ``Openstack-API-Version: placement 1.NEW_MV``"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"body -- ``{\u0027resource_class\u0027: \u0027CUSTOM_GOLD\u0027, \u0027total\u0027: 1, \u0027reserved\u0027: 1}``"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Example response:"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_0b62add8","line":72,"updated":"2018-05-15 17:07:58.000000000","message":"This would be something like the following if you use PUT:\n\n{\n    \"inventories\": {\n        \"CUSTOM_GOLD\": {\n            \"reserved\": 1,\n            \"total\": 1\n        }\n    },\n    \"resource_provider_generation\": 1\n}","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32470223c42b773518ad88cbbcd547472e2495f3","unresolved":false,"context_lines":[{"line_number":124,"context_line":"Work Items"},{"line_number":125,"context_line":"----------"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"Single change to placement API adding the logic and new microversion."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_6b48012c","line":127,"updated":"2018-05-15 17:07:58.000000000","message":"Isn\u0027t there also a change on the nova side for using this because presumably the ironic driver isn\u0027t trying to do this today because it can\u0027t.","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"24291cbafedd1b2ed21033f377d94a86fa2e93d2","unresolved":false,"context_lines":[{"line_number":124,"context_line":"Work Items"},{"line_number":125,"context_line":"----------"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"Single change to placement API adding the logic and new microversion."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_48dbbd4d","line":127,"in_reply_to":"5f7c97a3_5a55d0f8","updated":"2018-05-16 08:40:13.000000000","message":"as this is currently describes mostly ironic case I only added ironic point here. can add others if you wish :)","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f80e5befc77bb2730dbabbae14474682ca741422","unresolved":false,"context_lines":[{"line_number":124,"context_line":"Work Items"},{"line_number":125,"context_line":"----------"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"Single change to placement API adding the logic and new microversion."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_e667684c","line":127,"in_reply_to":"5f7c97a3_6b48012c","updated":"2018-05-15 18:21:07.000000000","message":"yeah can mention this as well","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"484dc74353f3eb04cf5a3b18c59bf976a4129987","unresolved":false,"context_lines":[{"line_number":124,"context_line":"Work Items"},{"line_number":125,"context_line":"----------"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"Single change to placement API adding the logic and new microversion."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_5a55d0f8","line":127,"in_reply_to":"5f7c97a3_e667684c","updated":"2018-05-15 18:35:22.000000000","message":"Xen is also going to use this as part of their vgpu work [1].  Do we really want to include consumer-side work items in this spec?\n\n[1] https://review.openstack.org/#/c/520313/41/nova/virt/xenapi/driver.py@545","commit_id":"9137ec1fb0f9f1693fb709a5f51bda96b97caf32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37935d9e8147c68f58f78029365fc10701876e3c","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently, we delete ironic node resource provider inventory from placement"},{"line_number":14,"context_line":"to indicate that the node is not available for deployment during the cleaning"},{"line_number":15,"context_line":"process or when in maintenance. This causes placement to report the incorrect"},{"line_number":16,"context_line":"inventory and capacity inforamtion, as the node is actually still present, and"},{"line_number":17,"context_line":"its inventory remains the same. Reserving all the inventory describes more"},{"line_number":18,"context_line":"accurately what is going on."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_c866e8bb","line":16,"range":{"start_line":15,"start_character":32,"end_line":16,"end_character":22},"updated":"2018-05-16 12:51:21.000000000","message":"Just wondering, do we get errors in the logs when the provider is reporting 0 inventory or some other side effect?","commit_id":"5f6d58bca8aeda622c83ef27d505f1b81c01448b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37935d9e8147c68f58f78029365fc10701876e3c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Currently, we delete ironic node resource provider inventory from placement"},{"line_number":14,"context_line":"to indicate that the node is not available for deployment during the cleaning"},{"line_number":15,"context_line":"process or when in maintenance. This causes placement to report the incorrect"},{"line_number":16,"context_line":"inventory and capacity inforamtion, as the node is actually still present, and"},{"line_number":17,"context_line":"its inventory remains the same. Reserving all the inventory describes more"},{"line_number":18,"context_line":"accurately what is going on."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_a86b6c82","line":16,"range":{"start_line":16,"start_character":23,"end_line":16,"end_character":34},"updated":"2018-05-16 12:51:21.000000000","message":"information","commit_id":"5f6d58bca8aeda622c83ef27d505f1b81c01448b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f44dfb62a087462f0e400922d51de9fae93e063e","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently, we delete ironic node resource provider inventory from placement"},{"line_number":14,"context_line":"to indicate that the node is not available for deployment during the cleaning"},{"line_number":15,"context_line":"process or when in maintenance. This causes placement to report the incorrect"},{"line_number":16,"context_line":"inventory and capacity inforamtion, as the node is actually still present, and"},{"line_number":17,"context_line":"its inventory remains the same. Reserving all the inventory describes more"},{"line_number":18,"context_line":"accurately what is going on."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_681c7477","line":16,"range":{"start_line":15,"start_character":32,"end_line":16,"end_character":22},"in_reply_to":"5f7c97a3_28e51cdc","updated":"2018-05-16 13:20:55.000000000","message":"the bug for that already exists, I think I will reopen it https://bugs.launchpad.net/nova/+bug/1751472","commit_id":"5f6d58bca8aeda622c83ef27d505f1b81c01448b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d6e73415683369bc0aa802a7e87a87d7d88f140b","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently, we delete ironic node resource provider inventory from placement"},{"line_number":14,"context_line":"to indicate that the node is not available for deployment during the cleaning"},{"line_number":15,"context_line":"process or when in maintenance. This causes placement to report the incorrect"},{"line_number":16,"context_line":"inventory and capacity inforamtion, as the node is actually still present, and"},{"line_number":17,"context_line":"its inventory remains the same. Reserving all the inventory describes more"},{"line_number":18,"context_line":"accurately what is going on."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_28e51cdc","line":16,"range":{"start_line":15,"start_character":32,"end_line":16,"end_character":22},"in_reply_to":"5f7c97a3_c866e8bb","updated":"2018-05-16 13:17:24.000000000","message":"I see this http://logs.openstack.org/39/554439/20/check/ironic-tempest-dsvm-ipa-wholedisk-bios-agent_ipmitool-tinyipa/e3c2ae3/logs/screen-n-cpu.txt.gz#_May_15_14_50_37_077180 in job runs, but it does not seem to log aything regarding custom resource class, and placement does not have any errors regarding this as well\n\nAlso I see this in the test run http://logs.openstack.org/39/554439/20/check/ironic-tempest-dsvm-ipa-wholedisk-bios-agent_ipmitool-tinyipa/e3c2ae3/logs/screen-n-cpu.txt.gz#_May_15_14_51_20_013490, but I think this is caused by the fact that during instance deletion we do not update the node cache in ironic virt driver, and when we try to decide whether to delete allocation or not on instance tear down, we use that outdated cache, see that instance_uuid is still assigned to ironic node and don\u0027t delete the allocation. node cache update happens on the next periodic run. ironic virt driver patch for this blueprint deals with this problem as well, otherwise we\u0027d have that problem with having node in cleaning with \u0027free\u0027 resources reported by placement. not sure if i need to outline this separately here, as it is kind of orthogonal to the change described. I can report a separate bug on that tho","commit_id":"5f6d58bca8aeda622c83ef27d505f1b81c01448b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37935d9e8147c68f58f78029365fc10701876e3c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"REST API impact"},{"line_number":60,"context_line":"---------------"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"``PUT /resource_providers/\u003cUUID\u003e/inventories`` and"},{"line_number":63,"context_line":"``PUT /resource_providers/\u003cUUID\u003e/inventories/\u003cRC\u003e`` API endpoints will return"},{"line_number":64,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":65,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_2858bcf7","line":62,"updated":"2018-05-16 12:51:21.000000000","message":"As mentioned in the last patch set, POST needs to be here also or we should deprecate that one in the same microversion if we\u0027re no longer going to be updating it because we don\u0027t like it for whatever reason. See https://review.openstack.org/#/c/567687/ on how we deprecate APIs.","commit_id":"5f6d58bca8aeda622c83ef27d505f1b81c01448b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d6e73415683369bc0aa802a7e87a87d7d88f140b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"REST API impact"},{"line_number":60,"context_line":"---------------"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"``PUT /resource_providers/\u003cUUID\u003e/inventories`` and"},{"line_number":63,"context_line":"``PUT /resource_providers/\u003cUUID\u003e/inventories/\u003cRC\u003e`` API endpoints will return"},{"line_number":64,"context_line":"response code ``200`` instead of ``400`` when called with"},{"line_number":65,"context_line":"new microversion and body containing inventory records that have reserved"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_68c9d423","line":62,"in_reply_to":"5f7c97a3_2858bcf7","updated":"2018-05-16 13:17:24.000000000","message":"ok will add the post back here","commit_id":"5f6d58bca8aeda622c83ef27d505f1b81c01448b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a8415e9fb3e031cd3cffa00a11d014d90e787298","unresolved":false,"context_lines":[{"line_number":25,"context_line":"For purposes of indicating that resources are temporarily unavailable"},{"line_number":26,"context_line":"placement provides the ``reserved`` field in the inventory object. This will"},{"line_number":27,"context_line":"enable placement to report the correct inventory and capacity information."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Use Cases"},{"line_number":30,"context_line":"---------"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5f7c97a3_8b946a38","line":28,"updated":"2018-05-16 13:44:25.000000000","message":"This problem description doesn\u0027t describe a problem. Are you implying that placement will reject an inventory of total\u003dreserved currently?\n\nIs that intentional on their part? Because it seems strange that it would reject that to me, so I wonder if it\u0027s just a bug.","commit_id":"302729939397414819cd987aa453f7ec808f6b1f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7919b875b3b775fdccb374696ee61c2614f22294","unresolved":false,"context_lines":[{"line_number":25,"context_line":"For purposes of indicating that resources are temporarily unavailable"},{"line_number":26,"context_line":"placement provides the ``reserved`` field in the inventory object. This will"},{"line_number":27,"context_line":"enable placement to report the correct inventory and capacity information."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Use Cases"},{"line_number":30,"context_line":"---------"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5f7c97a3_cb002205","line":28,"in_reply_to":"5f7c97a3_8b946a38","updated":"2018-05-16 14:03:59.000000000","message":"yeah, it does reject, https://review.openstack.org/564838, and Chris said that he thinks it was a bug back then, but this seems to be a behaviour change, so here\u0027s a spec :)","commit_id":"302729939397414819cd987aa453f7ec808f6b1f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"882762769a35ef724815b940d85c002c47cc7be5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Placement API does not allow to set reserved value to be equal to total in the"},{"line_number":29,"context_line":"inventory record. This makes ironic virt driver to delete inventory records"},{"line_number":30,"context_line":"from placement e.g. during node cleaning instead of reserving them."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Deleting resource provider inventory should mean that it is actually gone."}],"source_content_type":"text/x-rst","patch_set":7,"id":"5f7c97a3_3ecd56b6","line":29,"range":{"start_line":29,"start_character":48,"end_line":29,"end_character":50},"updated":"2018-05-16 14:16:08.000000000","message":"s/to/have to/","commit_id":"e1a0775425b29dc8031eefc0098ff2df535d54a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"882762769a35ef724815b940d85c002c47cc7be5","unresolved":false,"context_lines":[{"line_number":46,"context_line":"Proposed change"},{"line_number":47,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Add a new microversion to placement API that will allow to set reserved value"},{"line_number":50,"context_line":"of the inventory record to be equal to total value. It will become the"},{"line_number":51,"context_line":"placement behaviour for all subsequent microversion."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"5f7c97a3_9ebd8a03","line":49,"range":{"start_line":49,"start_character":56,"end_line":49,"end_character":58},"updated":"2018-05-16 14:16:08.000000000","message":"s/to/a client to/","commit_id":"e1a0775425b29dc8031eefc0098ff2df535d54a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"882762769a35ef724815b940d85c002c47cc7be5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Add a new microversion to placement API that will allow to set reserved value"},{"line_number":50,"context_line":"of the inventory record to be equal to total value. It will become the"},{"line_number":51,"context_line":"placement behaviour for all subsequent microversion."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"This new microversion will be used by nova scheduler report client when"}],"source_content_type":"text/x-rst","patch_set":7,"id":"5f7c97a3_beb88610","line":50,"range":{"start_line":50,"start_character":36,"end_line":50,"end_character":38},"updated":"2018-05-16 14:16:08.000000000","message":"s/to/to the/","commit_id":"e1a0775425b29dc8031eefc0098ff2df535d54a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"882762769a35ef724815b940d85c002c47cc7be5","unresolved":false,"context_lines":[{"line_number":50,"context_line":"of the inventory record to be equal to total value. It will become the"},{"line_number":51,"context_line":"placement behaviour for all subsequent microversion."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"This new microversion will be used by nova scheduler report client when"},{"line_number":54,"context_line":"doing the inventory update calls. This will enable virt drivers in nova"},{"line_number":55,"context_line":"to decide whether they need to report all the inventory resources as reserved"},{"line_number":56,"context_line":"in the ``get_inventory()`` call."}],"source_content_type":"text/x-rst","patch_set":7,"id":"5f7c97a3_7e3c2e92","line":53,"range":{"start_line":53,"start_character":35,"end_line":53,"end_character":37},"updated":"2018-05-16 14:16:08.000000000","message":"s/by/by the/","commit_id":"e1a0775425b29dc8031eefc0098ff2df535d54a0"}]}
