)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2fcb5c479263c36473390793df94ace023e6eb3b","unresolved":false,"context_lines":[{"line_number":15,"context_line":"inventory. Using the ``resources`` parameter it is possible to get a"},{"line_number":16,"context_line":"list of providers that have capacity in those classes, but any"},{"line_number":17,"context_line":"provider which has the class but is at capacity will not be listed."},{"line_number":18,"context_line":"This is potentially problematic for inspecting the the resource"},{"line_number":19,"context_line":"provider environment."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This proposes GET /resource_providers?having\u003dVCPU as possible way"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_6d39643e","line":18,"range":{"start_line":18,"start_character":47,"end_line":18,"end_character":54},"updated":"2018-10-23 13:34:33.000000000","message":"s/the the/the/","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f0e33f542716b330fad3ad20224bf65ec48691b1","unresolved":false,"context_lines":[{"line_number":18,"context_line":"This is potentially problematic for inspecting the the resource"},{"line_number":19,"context_line":"provider environment."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This proposes GET /resource_providers?having\u003dVCPU as possible way"},{"line_number":22,"context_line":"address this."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"blueprint list-rps-having"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_b9aed37d","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":13},"updated":"2018-10-23 20:17:49.000000000","message":"so as i said on irc i kind of already assumed there\nwould be an easy way to do this via a single api cal.\n\nso sure sound like a resonable thing to add but not sure\nhow viatal this is our how painful it would be to do this via multiple api calls so beyond this feels like it is consitent with the scope of the placment api i dont really have much of a comment oneway or another.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"}],"specs/stein/approved/list-rps-having.rst":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2fcb5c479263c36473390793df94ace023e6eb3b","unresolved":false,"context_lines":[{"line_number":14,"context_line":"          forget it. If people think it represents a need we can flesh it"},{"line_number":15,"context_line":"          out."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"There\u0027s currently no way, over the placement API, to filter a list of resource"},{"line_number":18,"context_line":"providers by them having a set of resource classes of inventory. Using the"},{"line_number":19,"context_line":"``resources`` parameter it is possible to get a list of providers that have"},{"line_number":20,"context_line":"capacity in those classes, but any provider which has the class but is at"},{"line_number":21,"context_line":"capacity will not be listed. This is potentially problematic for inspecting the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_0dc55009","line":18,"range":{"start_line":17,"start_character":0,"end_line":18,"end_character":64},"updated":"2018-10-23 13:34:33.000000000","message":"sure there is. it\u0027s not efficient, but it\u0027s imminently possible (here in pseudo-code):\n\n rc_names\u003d[\"DISK_GB\"]\n out\u003d[]\n rp_results\u003dGET /resource_providers\n for rp in $rp_results:\n     inv_results\u003dGET /resource_providers/$rp.uuid/inventories\n     for inv in $inv_results:\n         if $inv.resource_class IN ($rc_names):\n             out.append($rp)\n\nor by \"over the placement API\" did you mean to say \"in a single placement API call\"?","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9f680caa4734f53937526ec4e0174437aa07904f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"Use Cases"},{"line_number":45,"context_line":"---------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"As an operator, I want to get a list of resource providers that have a set of"},{"line_number":48,"context_line":"classes of inventory, even if that inventory is fully in use so that I can be"},{"line_number":49,"context_line":"aware of my resource environment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Proposed change"},{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_aa2ecd89","line":49,"range":{"start_line":47,"start_character":0,"end_line":49,"end_character":33},"updated":"2018-09-25 13:50:57.000000000","message":"Gah, we came up with a real use case for this the other day, but I don\u0027t remember what it was.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b12cc97e0fed47998004eda64c543b35e830a9cc","unresolved":false,"context_lines":[{"line_number":44,"context_line":"Use Cases"},{"line_number":45,"context_line":"---------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"As an operator, I want to get a list of resource providers that have a set of"},{"line_number":48,"context_line":"classes of inventory, even if that inventory is fully in use so that I can be"},{"line_number":49,"context_line":"aware of my resource environment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Proposed change"},{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_bd7518ce","line":49,"range":{"start_line":47,"start_character":0,"end_line":49,"end_character":33},"in_reply_to":"3f79a3b5_42050379","updated":"2018-10-02 20:00:41.000000000","message":"A few thoughts on that:\n\n* We have to do something about that code as we wish to remove access to the placement db from nova code, this cycle. We don\u0027t have to do what\u0027s described in this spec, but something needs to be done. As noted below with \"Posting to get preliminary feedback on the scope of this spec,\" I\u0027m happy to see this one die if we have an alternate plan, but we need _some_ kind of plan.\n* One option might be to remove the check, if we can claim that we\u0027re in some future that removes the need for it.\n* Using uuid\u003din:[list] is fine for small installs but not great for CERN-scale, at which point we need to do a looping check of some kind (which would not be the end of the world). If we are okay with doing a looping check, then we could also just get 5000 GET /resource_provider/{a single known uuid} requests. placeload shows that\u0027s pretty doable quickly.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8d1552ee1b8d26afdb4679cda905a1e73b857d81","unresolved":false,"context_lines":[{"line_number":44,"context_line":"Use Cases"},{"line_number":45,"context_line":"---------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"As an operator, I want to get a list of resource providers that have a set of"},{"line_number":48,"context_line":"classes of inventory, even if that inventory is fully in use so that I can be"},{"line_number":49,"context_line":"aware of my resource environment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Proposed change"},{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_42050379","line":49,"range":{"start_line":47,"start_character":0,"end_line":49,"end_character":33},"in_reply_to":"3f79a3b5_a68a56b9","updated":"2018-10-02 18:58:57.000000000","message":"Hmph.\n\nThe mechanism used by that method is not going to be a good way to count compute hosts once (if) we (ever) have NUMA represented in placement.\n\nIt would arguably be better to count non-sharing root providers, though I\u0027m sure that breaks somehow in the future too.\n\nFor the thing that method is being used to check, it might be better to support GET /resource_providers?name\u003din:[list] or ?uuid\u003din:[list], and nova passes in its list of known computes.\n\nIs that the only real use case for this? If so, I say we ditch it.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3528ffdb77fe9f2075e92339212a29c838c01c0c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"Use Cases"},{"line_number":45,"context_line":"---------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"As an operator, I want to get a list of resource providers that have a set of"},{"line_number":48,"context_line":"classes of inventory, even if that inventory is fully in use so that I can be"},{"line_number":49,"context_line":"aware of my resource environment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Proposed change"},{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_a68a56b9","line":49,"range":{"start_line":47,"start_character":0,"end_line":49,"end_character":33},"in_reply_to":"3f79a3b5_aa2ecd89","updated":"2018-09-27 09:51:26.000000000","message":"It was this: https://github.com/openstack/nova/blob/master/nova/cmd/status.py#L236-L258\n\nTrying to fix that was what led me to writing this spec. I didn\u0027t want to put the use case \"as fix matt\u0027s todo\" so I put in something a bit more generic and user-oriented which also encompasses the status need.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3484ef753852f7dc32a6680127994ecf1acc887b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"Use Cases"},{"line_number":45,"context_line":"---------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"As an operator, I want to get a list of resource providers that have a set of"},{"line_number":48,"context_line":"classes of inventory, even if that inventory is fully in use so that I can be"},{"line_number":49,"context_line":"aware of my resource environment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Proposed change"},{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_de880b23","line":49,"range":{"start_line":47,"start_character":0,"end_line":49,"end_character":33},"in_reply_to":"3f79a3b5_bd7518ce","updated":"2018-10-02 21:22:44.000000000","message":"\u003e * Using uuid\u003din:[list] is fine for small installs but not great for\n \u003e CERN-scale,\n\nBecause of querystring length limits?\n\n \u003e at which point we need to do a looping check of some\n \u003e kind (which would not be the end of the world). If we are okay with\n \u003e doing a looping check, then we could also just get 5000 GET\n \u003e /resource_provider/{a single known uuid} requests. placeload shows\n \u003e that\u0027s pretty doable quickly.\n\nHow about GET /resource_providers and traverse the results. When we find a root provider that doesn\u0027t correspond to one of our known hosts, we have to do an extra lookup to make sure it\u0027s not a sharing provider before we count it. No API changes needed.\n\n for rp in get_all_resource_providers():\n     # If it\u0027s a root provider...\n     if (rp[\u0027root_provider_uuid\u0027] \u003d\u003d rp[\u0027uuid\u0027] and\n             # And not a known host RP...\n             rp[\u0027uuid\u0027] not in host_uuid_set and\n             # And it\u0027s not a sharing provider...\n             \u0027MISC_SHARES_VIA_AGGREGATE\u0027 not in get_traits_for_provider(rp)):\n         num_unused_hosts +\u003d 1\n\nThis winds up being (num_unused_hosts + 1) placement calls instead of 5000.\n\n \u003e * One option might be to remove the check, if we can claim that\n \u003e we\u0027re in some future that removes the need for it.\n\nYeah, I\u0027m not sure what value it brings tbh, but I\u0027m not the expert here. Perhaps the cost/benefit is now above the threshold.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"208584132ea701f542646793360c0d3e0fa2b28d","unresolved":false,"context_lines":[{"line_number":44,"context_line":"Use Cases"},{"line_number":45,"context_line":"---------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"As an operator, I want to get a list of resource providers that have a set of"},{"line_number":48,"context_line":"classes of inventory, even if that inventory is fully in use so that I can be"},{"line_number":49,"context_line":"aware of my resource environment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Proposed change"},{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_484a5624","line":49,"range":{"start_line":47,"start_character":0,"end_line":49,"end_character":33},"in_reply_to":"3f79a3b5_de880b23","updated":"2018-10-23 13:54:00.000000000","message":"Per Jay, \"capacity planning dashboard\" is a real use case.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2fcb5c479263c36473390793df94ace023e6eb3b","unresolved":false,"context_lines":[{"line_number":81,"context_line":"* An ``any`` modifier on ``having`` (e.g., ``having\u003dany:VCPU,DISK_GB`` means"},{"line_number":82,"context_line":"  give me the resource providers that have at least one of these)."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"* We could allow ``0`` as a value in ``resources`` queries."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"Data model impact"},{"line_number":87,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_ad40dc60","line":84,"updated":"2018-10-23 13:34:33.000000000","message":"We don\u0027t need to allow 0 as a value in the resources query param. Instead, we could do:\n\n GET /resource_providers?resources\u003dVCPU\n\nIn other words, just leave off the \":$AMOUNT\" part of the query parameter value component.\n\nThis has the added benefit of not needing to add yet another query parameter and I think makes a lot of sense. The caller is basically saying \"get me providers with VCPU resources\", not \"get me providers with $AMOUNT of VCPU resources\".","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"208584132ea701f542646793360c0d3e0fa2b28d","unresolved":false,"context_lines":[{"line_number":81,"context_line":"* An ``any`` modifier on ``having`` (e.g., ``having\u003dany:VCPU,DISK_GB`` means"},{"line_number":82,"context_line":"  give me the resource providers that have at least one of these)."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"* We could allow ``0`` as a value in ``resources`` queries."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"Data model impact"},{"line_number":87,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3f79a3b5_e85a42f3","line":84,"in_reply_to":"3f79a3b5_ad40dc60","updated":"2018-10-23 13:54:00.000000000","message":"I could get behind ?resources\u003d$RC_NAME, but don\u0027t have a strong preference either way.","commit_id":"0910c3c7f244bffb4745f228757884bfd6bb3045"}]}
