)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"56f6d42c067aa60dcc5062f63fab9e65c195c57a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP] Spec: Support Consumer Types"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec aims at providing support for services to model ``consumer types`` in"},{"line_number":10,"context_line":"placement. While placement defines a consumer to be an entity consuming"},{"line_number":11,"context_line":"resources from a provider it does not provide a way to identify similar \"types\""},{"line_number":12,"context_line":"of consumers or group/query consumers from a particular service. This spec"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dfbec78f_a561233c","line":9,"updated":"2019-05-04 17:52:34.000000000","message":"wrap the lines","commit_id":"5226420f77e1fad0d55993c93973eb2e1667c79e"}],"doc/source/specs/train/approved/2005473-support-consumer-types.rst":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"72f4b56d23f31aa083af4e8494fce5e8dd0f7c6b","unresolved":false,"context_lines":[{"line_number":22,"context_line":"Problem description"},{"line_number":23,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"In today\u0027s placement world each allocation posted by a service is against a"},{"line_number":26,"context_line":"consumer (ex: against an instance or a migration). However a service may want"},{"line_number":27,"context_line":"to distinguish amongst the allocations made against its various types of"},{"line_number":28,"context_line":"consumers (ex: nova may want to fetch allocations against instances alone)."},{"line_number":29,"context_line":"This is currently not possible in placement and hence the goal is to make"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ffb9cba7_3ea0ccf4","line":26,"range":{"start_line":25,"start_character":66,"end_line":26,"end_character":8},"updated":"2019-04-23 20:16:56.000000000","message":"against a provider for a consumer","commit_id":"5226420f77e1fad0d55993c93973eb2e1667c79e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":71,"context_line":"table to map the consumer to its type."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"The ``POST /allocations`` and ``PUT /allocations/{consumer_uuid}`` REST API\u0027s"},{"line_number":74,"context_line":"will gain a new key called ``consumer_type`` which is of type string in their"},{"line_number":75,"context_line":"request body\u0027s through which the caller can specify what type of consumer it"},{"line_number":76,"context_line":"is creating or updating the allocations for. If the specified ``consumer_type``"},{"line_number":77,"context_line":"key is not present in the ``consumer_types`` table, a new entry will be"},{"line_number":78,"context_line":"created. Also note that once a consumer type is created, it lives on forever?"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_c3e47a3e","line":75,"range":{"start_line":74,"start_character":10,"end_line":75,"end_character":51},"updated":"2019-05-31 16:06:49.000000000","message":"is it required or optional at the new microversion?\n\n[Later] See L179","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":71,"context_line":"table to map the consumer to its type."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"The ``POST /allocations`` and ``PUT /allocations/{consumer_uuid}`` REST API\u0027s"},{"line_number":74,"context_line":"will gain a new key called ``consumer_type`` which is of type string in their"},{"line_number":75,"context_line":"request body\u0027s through which the caller can specify what type of consumer it"},{"line_number":76,"context_line":"is creating or updating the allocations for. If the specified ``consumer_type``"},{"line_number":77,"context_line":"key is not present in the ``consumer_types`` table, a new entry will be"},{"line_number":78,"context_line":"created. Also note that once a consumer type is created, it lives on forever?"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_9a5bbe85","line":75,"range":{"start_line":74,"start_character":10,"end_line":75,"end_character":51},"in_reply_to":"bfb3d3c7_c3e47a3e","updated":"2019-06-26 13:32:35.000000000","message":"required.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"03a248ee6fdbf7efae43f119bb0f4a805896d710","unresolved":false,"context_lines":[{"line_number":75,"context_line":"request body\u0027s through which the caller can specify what type of consumer it"},{"line_number":76,"context_line":"is creating or updating the allocations for. If the specified ``consumer_type``"},{"line_number":77,"context_line":"key is not present in the ``consumer_types`` table, a new entry will be"},{"line_number":78,"context_line":"created. Also note that once a consumer type is created, it lives on forever?"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The external services will be able to leverage this ``consumer_type`` key"},{"line_number":81,"context_line":"through the ``GET /usages`` REST API which will have a change in the format"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_cd4db43e","line":78,"range":{"start_line":78,"start_character":9,"end_line":78,"end_character":77},"updated":"2019-05-15 14:32:39.000000000","message":"needs confirmation in case people have hard feelings.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":75,"context_line":"request body\u0027s through which the caller can specify what type of consumer it"},{"line_number":76,"context_line":"is creating or updating the allocations for. If the specified ``consumer_type``"},{"line_number":77,"context_line":"key is not present in the ``consumer_types`` table, a new entry will be"},{"line_number":78,"context_line":"created. Also note that once a consumer type is created, it lives on forever?"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The external services will be able to leverage this ``consumer_type`` key"},{"line_number":81,"context_line":"through the ``GET /usages`` REST API which will have a change in the format"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_ccc97159","line":78,"range":{"start_line":78,"start_character":9,"end_line":78,"end_character":77},"in_reply_to":"9fb8cfa7_bd405309","updated":"2019-06-26 13:32:35.000000000","message":"ack, a tool can be done if there is an issue in the future then.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"713fbbabc022f8a6586852f7bf3706089a87e2cb","unresolved":false,"context_lines":[{"line_number":75,"context_line":"request body\u0027s through which the caller can specify what type of consumer it"},{"line_number":76,"context_line":"is creating or updating the allocations for. If the specified ``consumer_type``"},{"line_number":77,"context_line":"key is not present in the ``consumer_types`` table, a new entry will be"},{"line_number":78,"context_line":"created. Also note that once a consumer type is created, it lives on forever?"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The external services will be able to leverage this ``consumer_type`` key"},{"line_number":81,"context_line":"through the ``GET /usages`` REST API which will have a change in the format"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_bd405309","line":78,"range":{"start_line":78,"start_character":9,"end_line":78,"end_character":77},"in_reply_to":"bfb3d3c7_a894c537","updated":"2019-06-04 06:38:49.000000000","message":"+1 for a tool","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":75,"context_line":"request body\u0027s through which the caller can specify what type of consumer it"},{"line_number":76,"context_line":"is creating or updating the allocations for. If the specified ``consumer_type``"},{"line_number":77,"context_line":"key is not present in the ``consumer_types`` table, a new entry will be"},{"line_number":78,"context_line":"created. Also note that once a consumer type is created, it lives on forever?"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The external services will be able to leverage this ``consumer_type`` key"},{"line_number":81,"context_line":"through the ``GET /usages`` REST API which will have a change in the format"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_a894c537","line":78,"range":{"start_line":78,"start_character":9,"end_line":78,"end_character":77},"in_reply_to":"dfbec78f_cd4db43e","updated":"2019-05-31 16:06:49.000000000","message":"I\u0027m okay with this. The number of consumer types should be very small \"forever\"; and the fact that this is an API reduces (though does not eliminate) the possibility of users fat-fingering and ending up sullying their database e.g. with \"insatnce\". If it becomes an actual problem, (unused) entries can be deleted manually (via a tool we provide?).","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"03a248ee6fdbf7efae43f119bb0f4a805896d710","unresolved":false,"context_lines":[{"line_number":80,"context_line":"The external services will be able to leverage this ``consumer_type`` key"},{"line_number":81,"context_line":"through the ``GET /usages`` REST API which will have a change in the format"},{"line_number":82,"context_line":"of its response. The response will group the resource usages by consumer_type"},{"line_number":83,"context_line":"meaning it will gain a new ``consumer_type`` key. Per consumer type we will"},{"line_number":84,"context_line":"also return a ``count`` of consumers of that type. See the `API impact`_"},{"line_number":85,"context_line":"section for more details on how this would be done."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"The above REST API changes will be available from a new microversion."}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_4d3a2499","line":84,"range":{"start_line":83,"start_character":50,"end_line":84,"end_character":50},"updated":"2019-05-15 14:32:39.000000000","message":"I am not sure if this is better than allowing specific demands of consumer_keys in the request. Since we are anyways changing the response, I thought we could just count the \"number of types\" too. But people feel this is a bad idea I can change this to adding a new key in the request also for the consumer_type number.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":80,"context_line":"The external services will be able to leverage this ``consumer_type`` key"},{"line_number":81,"context_line":"through the ``GET /usages`` REST API which will have a change in the format"},{"line_number":82,"context_line":"of its response. The response will group the resource usages by consumer_type"},{"line_number":83,"context_line":"meaning it will gain a new ``consumer_type`` key. Per consumer type we will"},{"line_number":84,"context_line":"also return a ``count`` of consumers of that type. See the `API impact`_"},{"line_number":85,"context_line":"section for more details on how this would be done."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"The above REST API changes will be available from a new microversion."}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_a8360502","line":84,"range":{"start_line":83,"start_character":50,"end_line":84,"end_character":50},"in_reply_to":"dfbec78f_4d3a2499","updated":"2019-05-31 16:06:49.000000000","message":"Haven\u0027t gotten all the way through yet, but I was expecting this to include at least a subset of the four permutations of:\n\n GET [/resource_providers/{uuid}]/{usages|allocations}?consumer_type\u003dXXX\n\n...i.e. I should be able to filter usages or allocations by consumer type.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":89,"context_line":"The existing consumers in placement would be mapped to a default consumer type"},{"line_number":90,"context_line":"called ``UNKNOWN`` which means we do not know what type these consumers are"},{"line_number":91,"context_line":"and the service to which the consumers belong to needs to update this"},{"line_number":92,"context_line":"information if it wants to avail the ``consumer_types`` feature."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Alternatives"},{"line_number":95,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_282215ba","line":92,"updated":"2019-05-31 16:06:49.000000000","message":"Note to self: make sure upgrade impact addresses this. Null root provider IDs were a PITA, and this has the potential to be the same.\n\n[Later] Okay, Chris commented on that.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":89,"context_line":"The existing consumers in placement would be mapped to a default consumer type"},{"line_number":90,"context_line":"called ``UNKNOWN`` which means we do not know what type these consumers are"},{"line_number":91,"context_line":"and the service to which the consumers belong to needs to update this"},{"line_number":92,"context_line":"information if it wants to avail the ``consumer_types`` feature."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Alternatives"},{"line_number":95,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_5929af34","line":92,"in_reply_to":"bfb3d3c7_282215ba","updated":"2019-06-26 13:32:35.000000000","message":"Done","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":89,"context_line":"The existing consumers in placement would be mapped to a default consumer type"},{"line_number":90,"context_line":"called ``UNKNOWN`` which means we do not know what type these consumers are"},{"line_number":91,"context_line":"and the service to which the consumers belong to needs to update this"},{"line_number":92,"context_line":"information if it wants to avail the ``consumer_types`` feature."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Alternatives"},{"line_number":95,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_affaef71","line":92,"in_reply_to":"bfb3d3c7_282215ba","updated":"2019-06-26 13:32:35.000000000","message":"Done","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d290364548c6b08e1b2c139a18df90d57e6f29dd","unresolved":false,"context_lines":[{"line_number":99,"context_line":"feature."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The ``consumer_type`` field could be exposed through the response of"},{"line_number":102,"context_line":"``GET /allocations/{consumer_uuid}`` request but it is not really useful."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Data model impact"},{"line_number":105,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_23ba616d","line":102,"updated":"2019-05-15 17:03:29.000000000","message":"One reason to do it would be to maintain the parity between the GET and PUT representations, which has proved important in the past.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":99,"context_line":"feature."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The ``consumer_type`` field could be exposed through the response of"},{"line_number":102,"context_line":"``GET /allocations/{consumer_uuid}`` request but it is not really useful."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Data model impact"},{"line_number":105,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_f921834e","line":102,"in_reply_to":"bfb3d3c7_4812e963","updated":"2019-06-26 13:32:35.000000000","message":"Done","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"9697bf2c17c8b26bab459bb102857b3aeef288f8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"feature."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The ``consumer_type`` field could be exposed through the response of"},{"line_number":102,"context_line":"``GET /allocations/{consumer_uuid}`` request but it is not really useful."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Data model impact"},{"line_number":105,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_ded23c28","line":102,"in_reply_to":"dfbec78f_23ba616d","updated":"2019-05-15 17:35:41.000000000","message":"ah hmm sure if you feel its good thing to do, I can add this. I don\u0027t have a strong opinion.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":99,"context_line":"feature."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"The ``consumer_type`` field could be exposed through the response of"},{"line_number":102,"context_line":"``GET /allocations/{consumer_uuid}`` request but it is not really useful."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Data model impact"},{"line_number":105,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_4812e963","line":102,"in_reply_to":"dfbec78f_ded23c28","updated":"2019-05-31 16:06:49.000000000","message":"Agree with Chris - for purposes of \"editing\" allocations when I do a GET-tweak-PUT, I don\u0027t want to have to re-add consumer_type every time.\n\nAnd the other consumer information is included in that response, so IMO it makes sense to put it there.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"The placement database will get a new ``consumer_types`` table that will have"},{"line_number":108,"context_line":"a default consumer type called ``UNKNOWN`` and the ``consumers`` table will"},{"line_number":109,"context_line":"get a new ``consumer_type_id`` column that by default will point to the"},{"line_number":110,"context_line":"``UNKNOWN`` consumer type."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"API impact"},{"line_number":113,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_63582e30","line":110,"range":{"start_line":109,"start_character":43,"end_line":110,"end_character":26},"updated":"2019-05-31 16:06:49.000000000","message":"this is something that can be done immediately when the db change is effected, I guess? So we never have to worry about null consumer type IDs?","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"76796eb7faa57518a3b899534569e42cdbb7973e","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"The placement database will get a new ``consumer_types`` table that will have"},{"line_number":108,"context_line":"a default consumer type called ``UNKNOWN`` and the ``consumers`` table will"},{"line_number":109,"context_line":"get a new ``consumer_type_id`` column that by default will point to the"},{"line_number":110,"context_line":"``UNKNOWN`` consumer type."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"API impact"},{"line_number":113,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_7f0a4179","line":110,"range":{"start_line":109,"start_character":43,"end_line":110,"end_character":26},"in_reply_to":"9fb8cfa7_6ef619da","updated":"2019-06-27 09:04:36.000000000","message":"\u003e I don\u0027t know what this is suggesting specifically but I\u0027m not sure\n \u003e whether it\u0027s a good idea to add the UNKNOWN consumer type record as\n \u003e part of a database migration... I\u0027m thinking back to the old\n \u003e \"populate default flavors\" as part of a database migration. Years\n \u003e later, we had to remove it as default flavors became no longer a\n \u003e thing. I don\u0027t expect ever removing the \u0027UNKNOWN\u0027 consumer type,\n \u003e but just pointing out if it ever needs to be changed, creating it\n \u003e during a database migration wouldn\u0027t be as friendly to change.\n\nah yea I understand what you mean, but then in this specific case since we leave the responsibility of updating the type from \"UNKNOWN\" to the actual type like whether its an INSTANCE or MIGRATION, to the external service, it shouldn\u0027t really matter whether its unknown. Only for the existing records, instead of creating a column with the NULL value we do it with the UNKNOWN value, for the later records, it would be a required field coming from PUT or POST requests. I guess this has been sort of historical like for the user_id and project_id columns which ended up with wanted a default value https://github.com/openstack/nova/blob/d8f1bef63ab4357af2105431d3ea367100518aa2/nova/conf/placement.py#L20. Its just to take the load off placement in having to deal with NULL stuff. Also the \"UNKNOWN\" is not expected to be changed in the life time so it should be fine.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9997bdd83c10dd96ba70a4babe8123c156d32269","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"The placement database will get a new ``consumer_types`` table that will have"},{"line_number":108,"context_line":"a default consumer type called ``UNKNOWN`` and the ``consumers`` table will"},{"line_number":109,"context_line":"get a new ``consumer_type_id`` column that by default will point to the"},{"line_number":110,"context_line":"``UNKNOWN`` consumer type."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"API impact"},{"line_number":113,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_a27f3813","line":110,"range":{"start_line":109,"start_character":43,"end_line":110,"end_character":26},"in_reply_to":"9fb8cfa7_7f0a4179","updated":"2019-06-27 15:31:55.000000000","message":"My comment was about the addition of the \"UNKNOWN\" record in the new consumer_types table. I was just trying to note if that record is planned to be added as part of a database migration, it might be more of a pain to change later if it needs to be changed. But I don\u0027t predict it ever being needed to be changed.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"The placement database will get a new ``consumer_types`` table that will have"},{"line_number":108,"context_line":"a default consumer type called ``UNKNOWN`` and the ``consumers`` table will"},{"line_number":109,"context_line":"get a new ``consumer_type_id`` column that by default will point to the"},{"line_number":110,"context_line":"``UNKNOWN`` consumer type."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"API impact"},{"line_number":113,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_d914bfeb","line":110,"range":{"start_line":109,"start_character":43,"end_line":110,"end_character":26},"in_reply_to":"bfb3d3c7_63582e30","updated":"2019-06-26 13:32:35.000000000","message":"\u003e this is something that can be done immediately when the db change\n \u003e is effected, I guess? So we never have to worry about null consumer\n \u003e type IDs?\n\nFor the existing records should we do it during the model change or should we have a migration for this ? My inital idea was to just do it at the time of creation of the new column, but you both suggested having a data migration as well.. but since all default ones will be UNKNOWN we might as well just populate it as the default value, in which case we don\u0027t need the online data migration at all.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"55ae0662592c6f5e758a5ab3cb570a5a5b0d4507","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"The placement database will get a new ``consumer_types`` table that will have"},{"line_number":108,"context_line":"a default consumer type called ``UNKNOWN`` and the ``consumers`` table will"},{"line_number":109,"context_line":"get a new ``consumer_type_id`` column that by default will point to the"},{"line_number":110,"context_line":"``UNKNOWN`` consumer type."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"API impact"},{"line_number":113,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_6ef619da","line":110,"range":{"start_line":109,"start_character":43,"end_line":110,"end_character":26},"in_reply_to":"bfb3d3c7_63582e30","updated":"2019-06-27 02:35:21.000000000","message":"I don\u0027t know what this is suggesting specifically but I\u0027m not sure whether it\u0027s a good idea to add the UNKNOWN consumer type record as part of a database migration... I\u0027m thinking back to the old \"populate default flavors\" as part of a database migration. Years later, we had to remove it as default flavors became no longer a thing. I don\u0027t expect ever removing the \u0027UNKNOWN\u0027 consumer type, but just pointing out if it ever needs to be changed, creating it during a database migration wouldn\u0027t be as friendly to change.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"API impact"},{"line_number":113,"context_line":"----------"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"The new ``POST /allocations`` request will look like this::"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_a7694a8c","line":114,"updated":"2019-05-31 16:06:49.000000000","message":"Pattern restrictions on consumer types? Limited to 255c per db schema as mentioned above, but what chars are acceptable?\n\nSuggest limiting to the same as trait \u0026 resource class: [A-Z_]{1,255} for a) consistency, and b) other reasons (see below).","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"API impact"},{"line_number":113,"context_line":"----------"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"The new ``POST /allocations`` request will look like this::"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_19afb72a","line":114,"in_reply_to":"9fb8cfa7_a7694a8c","updated":"2019-06-26 13:32:35.000000000","message":"Done","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":119,"context_line":"      \"consumer_generation\": 1,"},{"line_number":120,"context_line":"      \"project_id\": \"131d4efb-abc0-4872-9b92-8c8b9dc4320f\","},{"line_number":121,"context_line":"      \"user_id\": \"131d4efb-abc0-4872-9b92-8c8b9dc4320f\","},{"line_number":122,"context_line":"      \"consumer_type\": \"instance\","},{"line_number":123,"context_line":"      \"allocations\": {"},{"line_number":124,"context_line":"        \"e10927c4-8bc9-465d-ac60-d2f79f7e4a00\": {"},{"line_number":125,"context_line":"          \"resources\": {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_63710ea8","line":122,"range":{"start_line":122,"start_character":6,"end_line":122,"end_character":34},"updated":"2019-05-31 16:06:49.000000000","message":"Nit: it would be nice for the reader if changes from the existing format had comments on them, like\n\n \"consumer_type\": \"instance\",  # This is new","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":119,"context_line":"      \"consumer_generation\": 1,"},{"line_number":120,"context_line":"      \"project_id\": \"131d4efb-abc0-4872-9b92-8c8b9dc4320f\","},{"line_number":121,"context_line":"      \"user_id\": \"131d4efb-abc0-4872-9b92-8c8b9dc4320f\","},{"line_number":122,"context_line":"      \"consumer_type\": \"instance\","},{"line_number":123,"context_line":"      \"allocations\": {"},{"line_number":124,"context_line":"        \"e10927c4-8bc9-465d-ac60-d2f79f7e4a00\": {"},{"line_number":125,"context_line":"          \"resources\": {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_39a71bbf","line":122,"range":{"start_line":122,"start_character":6,"end_line":122,"end_character":34},"in_reply_to":"bfb3d3c7_63710ea8","updated":"2019-06-26 13:32:35.000000000","message":"Done","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d290364548c6b08e1b2c139a18df90d57e6f29dd","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"consumer_type\": \"instance\""},{"line_number":177,"context_line":"  }"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"Note that ``consumer_type`` is a required key for both these requests."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"The new ``GET /usages`` response will look like this for the given project_id"},{"line_number":182,"context_line":"and user_id (if specified)::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_434f5592","line":179,"updated":"2019-05-15 17:03:29.000000000","message":"I think requiring is probably the right way to go, but did you consider saying the type would be UNKNOWN if it is not set? What are the reasons to not do that?","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"consumer_type\": \"instance\""},{"line_number":177,"context_line":"  }"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"Note that ``consumer_type`` is a required key for both these requests."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"The new ``GET /usages`` response will look like this for the given project_id"},{"line_number":182,"context_line":"and user_id (if specified)::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_0c86a914","line":179,"in_reply_to":"bfb3d3c7_2371d676","updated":"2019-06-26 13:32:35.000000000","message":"exactly, in case they wanted it to be \"DEFAULT\" they can make it a type, leaving it as UNKNOWN would at least force them to create and assign it to a type. But if there is a strong feeling for \"DEFAULT\" instead of \"UNKNOWN\" I can change it.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"9697bf2c17c8b26bab459bb102857b3aeef288f8","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"consumer_type\": \"instance\""},{"line_number":177,"context_line":"  }"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"Note that ``consumer_type`` is a required key for both these requests."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"The new ``GET /usages`` response will look like this for the given project_id"},{"line_number":182,"context_line":"and user_id (if specified)::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_beeae8d4","line":179,"in_reply_to":"dfbec78f_434f5592","updated":"2019-05-15 17:35:41.000000000","message":"\u003e I think requiring is probably the right way to go, but did you\n \u003e consider saying the type would be UNKNOWN if it is not set? \n\nBecause dansmith had told in the mailing list that we shouldn\u0027t be making this option and I thought everyone agreed there (http://lists.openstack.org/pipermail/openstack-discuss/2019-May/005897.html). But of course when I was writing it was the logical thing to do (I mean filling it as \"UNKNOWN\") in case someone didn\u0027t report a type.\n\n \u003e What\n \u003e are the reasons to not do that?\n\nBut then I also didn\u0027t want to start a series of reportings into placement without types - meaning we would just have consumers pointing to \"I don\u0027t know what type I am\" in future.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"consumer_type\": \"instance\""},{"line_number":177,"context_line":"  }"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"Note that ``consumer_type`` is a required key for both these requests."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"The new ``GET /usages`` response will look like this for the given project_id"},{"line_number":182,"context_line":"and user_id (if specified)::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_2371d676","line":179,"in_reply_to":"dfbec78f_beeae8d4","updated":"2019-05-31 16:06:49.000000000","message":"I\u0027m okay making it required. If you want to not specify it, use old microversion. If you don\u0027t care, say UNKNOWN explicitly. We require proj \u0026 user ID, which some callers may not care about.\n\nThinking it might make sense to make the default DEFAULT instead of UNKNOWN, as that makes the above UX a teeny bit saner. But I guess they can always say DEFAULT anyway, which would become a new consumer type.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":184,"context_line":"  {"},{"line_number":185,"context_line":"      \"usages\": {"},{"line_number":186,"context_line":"        \"instance\": {"},{"line_number":187,"context_line":"            \"count\": 5,"},{"line_number":188,"context_line":"            \"DISK_GB\": 5,"},{"line_number":189,"context_line":"            \"MEMORY_MB\": 512,"},{"line_number":190,"context_line":"            \"VCPU\": 2"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_e3d3beff","line":187,"range":{"start_line":187,"start_character":13,"end_line":187,"end_character":18},"updated":"2019-05-31 16:06:49.000000000","message":"bikeshed: Count of what? Consumers, based on L84. So let\u0027s call it \"consumers\" or \"consumer_count\".","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":184,"context_line":"  {"},{"line_number":185,"context_line":"      \"usages\": {"},{"line_number":186,"context_line":"        \"instance\": {"},{"line_number":187,"context_line":"            \"count\": 5,"},{"line_number":188,"context_line":"            \"DISK_GB\": 5,"},{"line_number":189,"context_line":"            \"MEMORY_MB\": 512,"},{"line_number":190,"context_line":"            \"VCPU\": 2"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_4d6c89cf","line":187,"range":{"start_line":187,"start_character":13,"end_line":187,"end_character":18},"in_reply_to":"bfb3d3c7_e3d3beff","updated":"2019-06-26 13:32:35.000000000","message":"Done","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"55ae0662592c6f5e758a5ab3cb570a5a5b0d4507","unresolved":false,"context_lines":[{"line_number":184,"context_line":"  {"},{"line_number":185,"context_line":"      \"usages\": {"},{"line_number":186,"context_line":"        \"instance\": {"},{"line_number":187,"context_line":"            \"count\": 5,"},{"line_number":188,"context_line":"            \"DISK_GB\": 5,"},{"line_number":189,"context_line":"            \"MEMORY_MB\": 512,"},{"line_number":190,"context_line":"            \"VCPU\": 2"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_cea145ab","line":187,"range":{"start_line":187,"start_character":13,"end_line":187,"end_character":18},"in_reply_to":"bfb3d3c7_e3d3beff","updated":"2019-06-27 02:35:21.000000000","message":"Yay, count is good.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d290364548c6b08e1b2c139a18df90d57e6f29dd","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_033abde5","line":205,"updated":"2019-05-15 17:03:29.000000000","message":"any value in GET /usages?consumer_type\u003d\u003csome value\u003e\u0026project_id... ?\n\nAnd presumably if people don\u0027t care about the type, they can/should get with an older microversion?","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_62b95c77","line":205,"in_reply_to":"9fb8cfa7_7dd09bf8","updated":"2019-06-26 13:32:35.000000000","message":"\u003e Thinking of why we didn\u0027t onlynreturn total in \u0027GET /usages\u0027, and\n \u003e get specific cosumer type by the \u0027?consumer_type\u003dxxx\u0027. \n\nbecause from what melwitt said in the mailing list which I also agree to, its not efficient to keep querying placement for each consumer type, that means its two calls, one for migration and another for instances, and instead if we gave everything back to nova, nova can parse and take what it wants.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"55ae0662592c6f5e758a5ab3cb570a5a5b0d4507","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_8eb26d05","line":205,"in_reply_to":"9fb8cfa7_7dd09bf8","updated":"2019-06-27 02:35:21.000000000","message":"Yeah, is \"?consumer_type\u003d\u003csome value\u003e\" here going to be a UUID or names? I guess it has to be names based on the data model. It certainly doesn\u0027t hurt to offer the ability to filter on consumer_type. And thinking of the future, when/if there are potentially a lot of other consumer types I wouldn\u0027t care about, it would be nice to be able to say, \"consumer_type\u003din:XXX,YYY,...\"\n\nOff the top of my head, I can\u0027t think of how totals across consumer types could be useful (being that you can\u0027t control other projects\u0027 consumer types), but I wouldn\u0027t be surprised if someone ended up needing that for some reason.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"76796eb7faa57518a3b899534569e42cdbb7973e","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_3a77f7d6","line":205,"in_reply_to":"9fb8cfa7_8eb26d05","updated":"2019-06-27 09:04:36.000000000","message":"yep, filtering is offered via GET /usages","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_e2dd4cdd","line":205,"in_reply_to":"bfb3d3c7_237b1628","updated":"2019-06-26 13:32:35.000000000","message":"I understand the need for being able to filter based on consumer types and I guess efried\u0027s idea of using all to get the normal response plus consumer_count can be done. Its just a matter of unnecessary complexity versus actually needing to get the total count of all consumers. But since its just a new \"all\" value request it can be implemented now I guess.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"713fbbabc022f8a6586852f7bf3706089a87e2cb","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_7dd09bf8","line":205,"in_reply_to":"bfb3d3c7_237b1628","updated":"2019-06-04 06:38:49.000000000","message":"Since we said that we won\u0027t remove any consumer type at line 78 until the user does some cleanup manually, so in this usage API, we may saw those useless consumer type also.\n\nThinking of why we didn\u0027t onlynreturn total in \u0027GET /usages\u0027, and get specific cosumer type by the \u0027?consumer_type\u003dxxx\u0027. But it indeed another API endpoint for consumer_type to query what kind of consumer type we have.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"9697bf2c17c8b26bab459bb102857b3aeef288f8","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_1e83f405","line":205,"in_reply_to":"dfbec78f_033abde5","updated":"2019-05-15 17:35:41.000000000","message":"\u003e any value in GET /usages?consumer_type\u003d\u003csome value\u003e\u0026project_id... ?\n \u003e \n\nyea I also have my doubts on this see my comment on L84. I\u0027d like to hear melwitt\u0027s opinion on this since she would be parsing this on the nova side.\n\n \u003e And presumably if people don\u0027t care about the type, they can/should\n \u003e get with an older microversion?\n\nI guess so :D. But if they don\u0027t care about it then hopefully they should be fine even if we give them a bunch of stuff under the \"UNKNOWN\" key.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            \"VCPU\": 2"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"bfb3d3c7_237b1628","line":205,"in_reply_to":"dfbec78f_1e83f405","updated":"2019-05-31 16:06:49.000000000","message":"As noted above, I agree we should have a ?consumer_type\u003dXXX filter immediately. (In the future, if use cases can be shown, consumer_type\u003d[!]in:XXX,YYY,... are also possible.)\n\nAlso slightly concerned that there\u0027s no totals in this response. Yeah, if you want totals, you use the previous microversion - but then you don\u0027t get \u0027count\u0027 (and other possible future enhancements to the body of the inner dict).\n\nSo here\u0027s a possibility: If we limit real consumer types to uppercase as suggested above, we can include a \"total\" or \"all\" key with the sums. The filter could specify that key as well (which is where \"all\" makes more semantic sense IMO), so I could say ?consumer_type\u003dall and just get the totals - so it would be just the information from the previous microversion, plus the total consumer count.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"Security impact"},{"line_number":210,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_27131a10","line":207,"updated":"2019-05-31 16:06:49.000000000","message":"We need to fix up the reshaper API as well.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":204,"context_line":"      }"},{"line_number":205,"context_line":"  }"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The REST API changes will be available from a new microversion."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"Security impact"},{"line_number":210,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_2d3cb52d","line":207,"in_reply_to":"9fb8cfa7_27131a10","updated":"2019-06-26 13:32:35.000000000","message":"Done","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1411a924b1ecf6c414419e569b896b8b24818522","unresolved":false,"context_lines":[{"line_number":214,"context_line":"Other end user impact"},{"line_number":215,"context_line":"---------------------"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"The external services using this feature like nova should take the"},{"line_number":218,"context_line":"responsibility of updating the consumer type of existing consumers."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"Performance Impact"},{"line_number":221,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_a7fe2aac","line":218,"range":{"start_line":217,"start_character":0,"end_line":218,"end_character":67},"updated":"2019-05-31 16:06:49.000000000","message":"How? Via a PUT or POST /allocations? I wonder if we should provide a tool...","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"21c6421b1d8b78e78d1ab8f3a63fcc30dade2979","unresolved":false,"context_lines":[{"line_number":214,"context_line":"Other end user impact"},{"line_number":215,"context_line":"---------------------"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"The external services using this feature like nova should take the"},{"line_number":218,"context_line":"responsibility of updating the consumer type of existing consumers."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"Performance Impact"},{"line_number":221,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_ad2d0596","line":218,"range":{"start_line":217,"start_character":0,"end_line":218,"end_character":67},"in_reply_to":"9fb8cfa7_a7fe2aac","updated":"2019-06-26 13:32:35.000000000","message":"\u003e How? Via a PUT or POST /allocations? I wonder if we should provide\n \u003e a tool...\n\nyea PUT /allocations, I think services can form their own tooling for that since after all its just updating the existing ones.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d290364548c6b08e1b2c139a18df90d57e6f29dd","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_e30be926","line":238,"updated":"2019-05-15 17:03:29.000000000","message":"You may want to indicate the database schema migration here.\n\nAnd an online migration to set UNKNOWN for existing either here or in deployer impact.\n\nWe _might_ want to test to see how long it takes to add a consumer_type a million or so allocations. To determine where/when to do the data migration.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"76796eb7faa57518a3b899534569e42cdbb7973e","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_7a424f6a","line":238,"in_reply_to":"9fb8cfa7_2e1b41ca","updated":"2019-06-27 09:04:36.000000000","message":"\u003e Just thinking, this will be an issue for supporting fast-forward\n \u003e upgrades. Would it be possible to have a placement-manage command\n \u003e for setting consumer types on allocations while the system is\n \u003e offline? I think that\u0027s all we would need... nova-manage would call\n \u003e placement-manage for the offline migration. Or alternatively,\n \u003e nova-manage dumps a data format that can be imported by\n \u003e placement-manage, to set the consumer types. The latter is what\n \u003e we\u0027re planning for migrating nova quota limits to keystone unified\n \u003e limits.\n\nack it could be done, dansmith also had an idea of correcting it from \"UNKNOWN\" during startup of the host (http://lists.openstack.org/pipermail/openstack-discuss/2019-May/005897.html). But in general I think how its updated from nova should be discussed on the nova end. A blueprint could be done and if it feels like a placement-manage command is needed, we could do it as well. The scope of consumer_types feature (this spec) will end with it being UNKNOWN which is okay I hope because I am assuming every service will want to do the update in their own way.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"186538f21e510888a47f7ee60a604becbaf89d40","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_2e1b41ca","line":238,"in_reply_to":"9fb8cfa7_2e710145","updated":"2019-06-27 02:47:45.000000000","message":"Just thinking, this will be an issue for supporting fast-forward upgrades. Would it be possible to have a placement-manage command for setting consumer types on allocations while the system is offline? I think that\u0027s all we would need... nova-manage would call placement-manage for the offline migration. Or alternatively, nova-manage dumps a data format that can be imported by placement-manage, to set the consumer types. The latter is what we\u0027re planning for migrating nova quota limits to keystone unified limits.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2370acd0d554fcbf71ab0a7323a08267de7354df","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_4233dcab","line":238,"in_reply_to":"9fb8cfa7_7a424f6a","updated":"2019-06-27 15:28:15.000000000","message":"\u003e But in general I think how its updated from nova should be\n \u003e discussed on the nova end. A blueprint could be done and if it\n \u003e feels like a placement-manage command is needed, we could do it as\n \u003e well. The scope of consumer_types feature (this spec) will end with\n \u003e it being UNKNOWN which is okay I hope because I am assuming every\n \u003e service will want to do the update in their own way.\n\nYeah, that sounds OK to me. Just wanted to raise the issue here in case there are any possible objections with the idea from the placement side. Sounds like there aren\u0027t, so I would be planning to help with the placement-manage command when the time comes.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fd434c868f0fb17dbbcee4168801d78d3c5e93b","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_b351cd38","line":238,"in_reply_to":"9fb8cfa7_7a424f6a","updated":"2019-06-27 14:23:30.000000000","message":"\u003e nova-manage would call placement-manage for the offline migration\n\nThat sounds not so great to me - you\u0027re assuming the services are on the same host to do that (nova-manage shell out to placement-manage?).","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2370acd0d554fcbf71ab0a7323a08267de7354df","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_02296435","line":238,"in_reply_to":"9fb8cfa7_b351cd38","updated":"2019-06-27 15:28:15.000000000","message":"\u003e \u003e nova-manage would call placement-manage for the offline migration\n \u003e \n \u003e That sounds not so great to me - you\u0027re assuming the services are\n \u003e on the same host to do that (nova-manage shell out to\n \u003e placement-manage?).\n\nYeah, good point. I had been thinking \"this feels like a bad idea\" but I wasn\u0027t 100% sure why. That\u0027s why I went on to suggest the nova export/placement import approach (same as we\u0027re thinking for the move to unified limits in nova). For the reason you bring up (and probably others), I think export/import needs to be the way to go.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"55ae0662592c6f5e758a5ab3cb570a5a5b0d4507","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9fb8cfa7_2e710145","line":238,"in_reply_to":"dfbec78f_3e9b5866","updated":"2019-06-27 02:35:21.000000000","message":"OK, so all existing allocations will be set to consumer type UNKNOWN by a database migration. So in nova, we\u0027ll have to do our own online/live data migration to correctly label all of our allocations as \"instance\", \"migration\", etc and be able to detect when all are done before we can begin using consumer types to count instances and do resize resource usage math.","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"9697bf2c17c8b26bab459bb102857b3aeef288f8","unresolved":false,"context_lines":[{"line_number":235,"context_line":"Upgrade impact"},{"line_number":236,"context_line":"--------------"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"None."},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfbec78f_3e9b5866","line":238,"in_reply_to":"dfbec78f_e30be926","updated":"2019-05-15 17:35:41.000000000","message":"oh yea good point, will do","commit_id":"4a27702f875e3e4ba1fb37184f6a5eb265376101"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f4194e88e312874ff38c7b60e7801c711ab6b181","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Note that it is not within the scope of placement to model the coordination of"},{"line_number":45,"context_line":"the consumer type collisions that may arise between multiple services during"},{"line_number":46,"context_line":"their definition."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Proposed change"},{"line_number":49,"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":5,"id":"9fb8cfa7_33c7ef98","line":46,"updated":"2019-07-01 14:31:21.000000000","message":"It may also be worth noting (in a followup?) that placement is unable to notice when the caller _thinks_ they have the right type but does not.\n\ne.g.:\n\n* INSTANCE\n* INTANCE (the cdent version)","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b50b9c45d7dddb239004f305222f5bf41c4331ab","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Note that it is not within the scope of placement to model the coordination of"},{"line_number":45,"context_line":"the consumer type collisions that may arise between multiple services during"},{"line_number":46,"context_line":"their definition."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Proposed change"},{"line_number":49,"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":5,"id":"9fb8cfa7_8e0f92de","line":46,"in_reply_to":"9fb8cfa7_33c7ef98","updated":"2019-07-01 15:24:05.000000000","message":"oh good point, ack.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4ac8624fdee5231c3c36e1b53853028a665a1371","unresolved":false,"context_lines":[{"line_number":55,"context_line":"#. a ``name`` which will be of type varchar (maximum of 255 characters) and"},{"line_number":56,"context_line":"   this will have a unique constraint on it. The pattern restrictions for the"},{"line_number":57,"context_line":"   name will be similar to placement traits and resource class names, i.e"},{"line_number":58,"context_line":"   restricted to only [A-Z, _] with length restrictions being {1, 255}."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"A sample look of such a table would be:"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_559babc7","line":58,"range":{"start_line":58,"start_character":22,"end_line":58,"end_character":30},"updated":"2019-06-26 16:54:33.000000000","message":"[A-Z0-9_] ? (i.e. digits are allowed too?) (but not actually comma or space)\n\n[Later] I see this was my mistake in my comment that suggested this, sorry. So yeah, it should just match the pattern for rc/trait.\n\n In [6]: from placement.schemas import common\n \n In [7]: common._RC_TRAIT_PATTERN\n Out[7]: \u0027^[A-Z0-9_]+$\u0027\n\n In [8]: from placement.schemas import trait\n \n In [9]: trait.TRAIT\n Out[9]: {\u0027maxLength\u0027: 255, \u0027minLength\u0027: 1, \u0027type\u0027: \u0027string\u0027}\n\netc.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b50b9c45d7dddb239004f305222f5bf41c4331ab","unresolved":false,"context_lines":[{"line_number":55,"context_line":"#. a ``name`` which will be of type varchar (maximum of 255 characters) and"},{"line_number":56,"context_line":"   this will have a unique constraint on it. The pattern restrictions for the"},{"line_number":57,"context_line":"   name will be similar to placement traits and resource class names, i.e"},{"line_number":58,"context_line":"   restricted to only [A-Z, _] with length restrictions being {1, 255}."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"A sample look of such a table would be:"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_ae2ff63c","line":58,"range":{"start_line":58,"start_character":22,"end_line":58,"end_character":30},"in_reply_to":"9fb8cfa7_33de0f6d","updated":"2019-07-01 15:24:05.000000000","message":"okay.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"76796eb7faa57518a3b899534569e42cdbb7973e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"#. a ``name`` which will be of type varchar (maximum of 255 characters) and"},{"line_number":56,"context_line":"   this will have a unique constraint on it. The pattern restrictions for the"},{"line_number":57,"context_line":"   name will be similar to placement traits and resource class names, i.e"},{"line_number":58,"context_line":"   restricted to only [A-Z, _] with length restrictions being {1, 255}."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"A sample look of such a table would be:"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_9fe855b3","line":58,"range":{"start_line":58,"start_character":22,"end_line":58,"end_character":30},"in_reply_to":"9fb8cfa7_559babc7","updated":"2019-06-27 09:04:36.000000000","message":"ack, yea I\u0027ll just use the existing pattern rules as that for traits and resource classes.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f4194e88e312874ff38c7b60e7801c711ab6b181","unresolved":false,"context_lines":[{"line_number":55,"context_line":"#. a ``name`` which will be of type varchar (maximum of 255 characters) and"},{"line_number":56,"context_line":"   this will have a unique constraint on it. The pattern restrictions for the"},{"line_number":57,"context_line":"   name will be similar to placement traits and resource class names, i.e"},{"line_number":58,"context_line":"   restricted to only [A-Z, _] with length restrictions being {1, 255}."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"A sample look of such a table would be:"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_33de0f6d","line":58,"range":{"start_line":58,"start_character":22,"end_line":58,"end_character":30},"in_reply_to":"9fb8cfa7_9fe855b3","updated":"2019-07-01 14:31:21.000000000","message":"Please make sure there\u0027s a spec followup to clean this up, but let\u0027s not let this hold thing sup.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f4194e88e312874ff38c7b60e7801c711ab6b181","unresolved":false,"context_lines":[{"line_number":94,"context_line":"consumer_type (if consumer_type key is not specified it will return the usages"},{"line_number":95,"context_line":"for all the consumer_types) meaning it will gain a new ``consumer_type`` key."},{"line_number":96,"context_line":"Per consumer type we will also return a ``consumer_count`` of consumers of that"},{"line_number":97,"context_line":"type."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"See the `API impact`_ section for more details on how this would be done."},{"line_number":100,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_134d0b3a","line":97,"updated":"2019-07-01 14:31:21.000000000","message":"Thus the only ways to get cloud-wide (untyped) usages are:\n\n* to use an older microversion\n* do the match client side\n\nIs that right? Does that matter?\n\nAh, you addressed this down below, so I\u0027ll put more comments there.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f4194e88e312874ff38c7b60e7801c711ab6b181","unresolved":false,"context_lines":[{"line_number":120,"context_line":"The placement database will get a new ``consumer_types`` table that will have"},{"line_number":121,"context_line":"a default consumer type called ``UNKNOWN`` and the ``consumers`` table will"},{"line_number":122,"context_line":"get a new ``consumer_type_id`` column that by default will point to the"},{"line_number":123,"context_line":"``UNKNOWN`` consumer type."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"API impact"},{"line_number":126,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_33cdaf65","line":123,"updated":"2019-07-01 14:31:21.000000000","message":"Is this solely an alembic migration, including setting the consumer_type_id value for existing consumers or a combination of an alembic migration and something \"online\".\n\nIf the former is fast enough, we should consider that. CERN is presumably the right guinea pig for that... :)","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b50b9c45d7dddb239004f305222f5bf41c4331ab","unresolved":false,"context_lines":[{"line_number":120,"context_line":"The placement database will get a new ``consumer_types`` table that will have"},{"line_number":121,"context_line":"a default consumer type called ``UNKNOWN`` and the ``consumers`` table will"},{"line_number":122,"context_line":"get a new ``consumer_type_id`` column that by default will point to the"},{"line_number":123,"context_line":"``UNKNOWN`` consumer type."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"API impact"},{"line_number":126,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_aea296ac","line":123,"in_reply_to":"9fb8cfa7_33cdaf65","updated":"2019-07-01 15:24:05.000000000","message":"\u003e Is this solely an alembic migration, including setting the\n \u003e consumer_type_id value for existing consumers or a combination of\n \u003e an alembic migration and something \"online\".\n \u003e \n \u003e If the former is fast enough, we should consider that. CERN is\n \u003e presumably the right guinea pig for that... :)\n\nI am not sure which is faster, I would assume former has advantages in terms of not having to wait around for people to run the migration to use it for quotas from placement and we won\u0027t have to deal with NULL values. Having a data migration for updating the default value to a constant (\"UNKNOWN\") seems unnecessary.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f4194e88e312874ff38c7b60e7801c711ab6b181","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    \"consumer_type\": \"INSTANCE\" # This is new"},{"line_number":190,"context_line":"  }"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"Note that ``consumer_type`` is a required key for both these requests."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"The new ``GET /usages`` response will look like this for a request of type"},{"line_number":195,"context_line":"``GET /usages?project_id\u003d\u003cproject id\u003e\u0026user_id\u003d\u003cuser id\u003e`` or"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_930fbbde","line":192,"range":{"start_line":192,"start_character":61,"end_line":192,"end_character":69},"updated":"2019-07-01 14:31:21.000000000","message":"nit (not suggesting you fix this, just mentioning it): It would be more accurate to append \"at this microversion\"","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b50b9c45d7dddb239004f305222f5bf41c4331ab","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    \"consumer_type\": \"INSTANCE\" # This is new"},{"line_number":190,"context_line":"  }"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"Note that ``consumer_type`` is a required key for both these requests."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"The new ``GET /usages`` response will look like this for a request of type"},{"line_number":195,"context_line":"``GET /usages?project_id\u003d\u003cproject id\u003e\u0026user_id\u003d\u003cuser id\u003e`` or"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_ae2cd601","line":192,"range":{"start_line":192,"start_character":61,"end_line":192,"end_character":69},"in_reply_to":"9fb8cfa7_930fbbde","updated":"2019-07-01 15:24:05.000000000","message":"\u003e nit (not suggesting you fix this, just mentioning it): It would be\n \u003e more accurate to append \"at this microversion\"\n\nokay","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f4194e88e312874ff38c7b60e7801c711ab6b181","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"  {"},{"line_number":244,"context_line":"    \"usages\": {"},{"line_number":245,"context_line":"        \"ALL\": {"},{"line_number":246,"context_line":"            \"consumer_count\": 3,"},{"line_number":247,"context_line":"            \"DISK_GB\": 5,"},{"line_number":248,"context_line":"            \"MEMORY_MB\": 512,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_f318771e","line":245,"range":{"start_line":245,"start_character":9,"end_line":245,"end_character":12},"updated":"2019-07-01 14:31:21.000000000","message":"I recommend you make this \u0027all\u0027 to make it clear this is not a normal type, especially since \u0027ALL\u0027 is a valid consumer type by the regex.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"72ffca723bf5cdd600b7e1f88c16642b6b79721a","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"  {"},{"line_number":244,"context_line":"    \"usages\": {"},{"line_number":245,"context_line":"        \"ALL\": {"},{"line_number":246,"context_line":"            \"consumer_count\": 3,"},{"line_number":247,"context_line":"            \"DISK_GB\": 5,"},{"line_number":248,"context_line":"            \"MEMORY_MB\": 512,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_6efd7e6c","line":245,"range":{"start_line":245,"start_character":9,"end_line":245,"end_character":12},"in_reply_to":"9fb8cfa7_f318771e","updated":"2019-07-01 15:20:49.000000000","message":"++ good catch, swhy we made the queryparam lowercase (or rather, one of the reasons we made the user-supplied consumers uppercase). This should match.","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b50b9c45d7dddb239004f305222f5bf41c4331ab","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"  {"},{"line_number":244,"context_line":"    \"usages\": {"},{"line_number":245,"context_line":"        \"ALL\": {"},{"line_number":246,"context_line":"            \"consumer_count\": 3,"},{"line_number":247,"context_line":"            \"DISK_GB\": 5,"},{"line_number":248,"context_line":"            \"MEMORY_MB\": 512,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fb8cfa7_2e57865a","line":245,"range":{"start_line":245,"start_character":9,"end_line":245,"end_character":12},"in_reply_to":"9fb8cfa7_f318771e","updated":"2019-07-01 15:24:05.000000000","message":"Done","commit_id":"5fa4a172b7d20a105ce9020c2c6e9487c351b168"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1fd1bc9cf019321413649d9ebcfb7c374f37fda0","unresolved":false,"context_lines":[{"line_number":57,"context_line":"#. a ``name`` which will be of type varchar (maximum of 255 characters) and"},{"line_number":58,"context_line":"   this will have a unique constraint on it. The pattern restrictions for the"},{"line_number":59,"context_line":"   name will be similar to placement traits and resource class names, i.e"},{"line_number":60,"context_line":"   restricted to only \"_^[A-Z0-9]+$\" with length restrictions being {1, 255}."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"A sample look of such a table would be:"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9fb8cfa7_6957b8cb","line":60,"range":{"start_line":60,"start_character":23,"end_line":60,"end_character":35},"updated":"2019-07-01 15:48:29.000000000","message":"^[A-Z0-9_]+$","commit_id":"1f9433431056bc579cd13f81c2b2e122b19e8d47"}]}
