)]}'
{"specs/queens/approved/add-trait-support-in-allocation-candidates.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"* The end user wants to boot up instance on the shared storage with SSD."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Proposed change"},{"line_number":30,"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":2,"id":"ff5d4b2f_7b6420ba","line":27,"updated":"2017-09-19 13:34:03.000000000","message":"I\u0027m fine with adding the API support for this since we need to do it at some point anyway, but we are sort of getting ahead of ourselves since we don\u0027t yet have any way for a user to request an instance with a specific set of traits yet, correct? Meaning, I thought we\u0027d have to pass something through on the flavor, like with extra specs, to specify required traits and then the scheduler would proxy that request to Placement when looking for allocation candidates.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"de3c64117de551c5bd87c0c3afd71b777fd3b336","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"* The end user wants to boot up instance on the shared storage with SSD."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Proposed change"},{"line_number":30,"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":2,"id":"bf57530f_d29d3167","line":27,"in_reply_to":"ff5d4b2f_7b6420ba","updated":"2017-09-20 06:37:34.000000000","message":"I see you want a use-case is more specific for this API change, not the use-case of the whole process include specifying the required traits in the flavor.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":33,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":34,"context_line":"allocations which have all the traits in the list."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"},{"line_number":37,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_60b10be2","line":34,"range":{"start_line":34,"start_character":31,"end_line":34,"end_character":37},"updated":"2017-09-19 13:34:03.000000000","message":"Technically the provider summaries portion of the response would have the traits defined, not the allocation requests, since allocations don\u0027t have traits, resource providers do.\n\nhttps://github.com/openstack/nova/blob/20c4840f12906654f7ab940d5cc5065e891a50c4/nova/api/openstack/placement/handlers/allocation_candidate.py#L92\n\nhttps://github.com/openstack/nova/blob/20c4840f12906654f7ab940d5cc5065e891a50c4/nova/objects/resource_provider.py#L2352","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":33,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":34,"context_line":"allocations which have all the traits in the list."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"},{"line_number":37,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_20a2f39b","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":11},"updated":"2017-09-19 13:34:03.000000000","message":"s/allocations/allocation candidates/","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"de3c64117de551c5bd87c0c3afd71b777fd3b336","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":33,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":34,"context_line":"allocations which have all the traits in the list."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"},{"line_number":37,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf57530f_b273dd4d","line":34,"range":{"start_line":34,"start_character":31,"end_line":34,"end_character":37},"in_reply_to":"ff5d4b2f_60b10be2","updated":"2017-09-20 06:37:34.000000000","message":"Yea, sorry I didn\u0027t describe cleary. The allocations haven\u0027t traits. The resource providers have traits which group as allocation request. I will try to rephase that.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"All the required data model already have now. In this proposal, the traits"},{"line_number":47,"context_line":"attribute of ProviderSummary object will be filled with data, it is empty"},{"line_number":48,"context_line":"before."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"REST API impact"},{"line_number":51,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_20daf3e8","line":48,"range":{"start_line":46,"start_character":0,"end_line":48,"end_character":7},"updated":"2017-09-19 13:34:03.000000000","message":"This could just be None.\n\nWe don\u0027t have a db table for provider summaries, it\u0027s just an abstraction object between the REST API and data model.\n\nAnyway, you can leave this, I understand what you\u0027re saying.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"de3c64117de551c5bd87c0c3afd71b777fd3b336","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Data model impact"},{"line_number":44,"context_line":"-----------------"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"All the required data model already have now. In this proposal, the traits"},{"line_number":47,"context_line":"attribute of ProviderSummary object will be filled with data, it is empty"},{"line_number":48,"context_line":"before."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"REST API impact"},{"line_number":51,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf57530f_52982169","line":48,"range":{"start_line":46,"start_character":0,"end_line":48,"end_character":7},"in_reply_to":"ff5d4b2f_20daf3e8","updated":"2017-09-20 06:37:34.000000000","message":"Done","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":64,"context_line":"  used with `resources` together"},{"line_number":65,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":66,"context_line":"  `HTTPBadRequest 400`."},{"line_number":67,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_c08e77cf","line":65,"range":{"start_line":65,"start_character":6,"end_line":65,"end_character":20},"updated":"2017-09-19 13:34:03.000000000","message":"What is considered an invalid trait? Something not in os-traits and doesn\u0027t start with CUSTOM? I guess the validation would be the same as the \"PUT /traits/{name}\" API.\n\nhttps://github.com/openstack/nova/blob/20c4840f12906654f7ab940d5cc5065e891a50c4/nova/api/openstack/placement/handlers/trait.py#L37","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"de3c64117de551c5bd87c0c3afd71b777fd3b336","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":64,"context_line":"  used with `resources` together"},{"line_number":65,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":66,"context_line":"  `HTTPBadRequest 400`."},{"line_number":67,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf57530f_12a2a99b","line":65,"range":{"start_line":65,"start_character":6,"end_line":65,"end_character":20},"in_reply_to":"ff5d4b2f_c08e77cf","updated":"2017-09-20 06:37:34.000000000","message":"The invalid trait is a trait not in the trait db table.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  used with `resources` together"},{"line_number":65,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":66,"context_line":"  `HTTPBadRequest 400`."},{"line_number":67,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The traits will be included in the provider summary of the responses::"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_205f9342","line":67,"range":{"start_line":67,"start_character":2,"end_line":67,"end_character":79},"updated":"2017-09-19 13:34:03.000000000","message":"This seems weird. How is this different than just not specifying traits in the query parameters at all? I think we should require a minimum of one trait specified if the \u0027traits\u0027 parameter is used to avoid confusion.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6fed3b50d1193cef0bc0f3a89e97538e6d75e1d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  used with `resources` together"},{"line_number":65,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":66,"context_line":"  `HTTPBadRequest 400`."},{"line_number":67,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The traits will be included in the provider summary of the responses::"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f515b1d_fbf2856f","line":67,"range":{"start_line":67,"start_character":2,"end_line":67,"end_character":79},"in_reply_to":"bf57530f_526ca107","updated":"2017-09-29 22:08:23.000000000","message":"I don\u0027t think that\u0027s a big deal compared to the ambiguity of what passing ?traits\u003d means - does it mean ignore? Does it mean all traits? Does it mean no traits specifically?\n\nThink about doing GET /servers/detail?status\u003d\n\nWhat does the compute API do for that today? Return VMs with any status, or no VMs because it equates status to None? or is that an error?","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"de3c64117de551c5bd87c0c3afd71b777fd3b336","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  used with `resources` together"},{"line_number":65,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":66,"context_line":"  `HTTPBadRequest 400`."},{"line_number":67,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The traits will be included in the provider summary of the responses::"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf57530f_526ca107","line":67,"range":{"start_line":67,"start_character":2,"end_line":67,"end_character":79},"in_reply_to":"ff5d4b2f_205f9342","updated":"2017-09-20 06:37:34.000000000","message":"yea, it is same as not specifying traits in the query parameters.\n\nI\u0027m thinking it is more convenience for construct the url.  For example, the code looks like below:\n\n\"http://.../allocation_candidates?resources\u003d...\u0026traits\u003d%s\" % \u0027:\u0027.join(required_traits)\n\nThe required_traits can be an empty list. If we doesn\u0027t accept an empty value of traits, the code need a \"if..else\" to not add tratis paramter to the url.\n\nDoes make sense?","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    \"used\": 0"},{"line_number":102,"context_line":"                }"},{"line_number":103,"context_line":"            },"},{"line_number":104,"context_line":"            \"traits\": ["},{"line_number":105,"context_line":"                \"HW:CPU:X86:AVX\","},{"line_number":106,"context_line":"                \"HW:CPU:X86:AVX2\""},{"line_number":107,"context_line":"            ]"},{"line_number":108,"context_line":"        }"},{"line_number":109,"context_line":"    }"},{"line_number":110,"context_line":"  }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_fb3c90c0","line":107,"range":{"start_line":104,"start_character":12,"end_line":107,"end_character":13},"updated":"2017-09-19 13:34:03.000000000","message":"This could be confused with the parameter query example you have above using \"traits\u003dHW:CPU:X86:AVX,HW:CPU:X86:AVX2\" but the returned traits here are a subset, correct?\n\nSo if I query for \"traits\u003dHW:CPU:X86:AVX,HW:CPU:X86:AVX2\" but this resource provider has 5 traits, all 5 traits would be returned.\n\nAnd if the resource provider only has HW:CPU:X86:AVX but not HW:CPU:X86:AVX2 then we wouldn\u0027t get that resource provider back, since we are asking for providers that have both traits.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"de3c64117de551c5bd87c0c3afd71b777fd3b336","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    \"used\": 0"},{"line_number":102,"context_line":"                }"},{"line_number":103,"context_line":"            },"},{"line_number":104,"context_line":"            \"traits\": ["},{"line_number":105,"context_line":"                \"HW:CPU:X86:AVX\","},{"line_number":106,"context_line":"                \"HW:CPU:X86:AVX2\""},{"line_number":107,"context_line":"            ]"},{"line_number":108,"context_line":"        }"},{"line_number":109,"context_line":"    }"},{"line_number":110,"context_line":"  }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf57530f_f2095531","line":107,"range":{"start_line":104,"start_character":12,"end_line":107,"end_character":13},"in_reply_to":"ff5d4b2f_fb3c90c0","updated":"2017-09-20 06:37:34.000000000","message":"If the resource provider has 5 traits, all the 5 traits will be returned.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    }"},{"line_number":110,"context_line":"  }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"When there is no traits for a resource provider. The `traits` attribute is"},{"line_number":113,"context_line":"still in the response, and with a empty list."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"All the above change are in a new microversion."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_3b0d8837","line":112,"range":{"start_line":112,"start_character":47,"end_line":112,"end_character":52},"updated":"2017-09-19 13:34:03.000000000","message":"s/. The/, the/","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":136,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":137,"context_line":"in the main SQL. It will slow than single SQL, but it is acceptable. And"},{"line_number":138,"context_line":"avoid to generate a huge SQL which is hard to maintain."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Other deployer impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_1b69a4bd","line":137,"range":{"start_line":137,"start_character":25,"end_line":137,"end_character":29},"updated":"2017-09-19 13:34:03.000000000","message":"be slower","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dbd91c85d6d546a577c68a54deafa89e6147f71","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":136,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":137,"context_line":"in the main SQL. It will slow than single SQL, but it is acceptable. And"},{"line_number":138,"context_line":"avoid to generate a huge SQL which is hard to maintain."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Other deployer impact"},{"line_number":141,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff5d4b2f_fbaa50d0","line":138,"range":{"start_line":137,"start_character":69,"end_line":138,"end_character":55},"updated":"2017-09-19 13:34:03.000000000","message":"This seems like something that could be left out of the spec and just left for implementation details/review, since I\u0027m going to rely on Jay for this one.","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"de3c64117de551c5bd87c0c3afd71b777fd3b336","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":136,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":137,"context_line":"in the main SQL. It will slow than single SQL, but it is acceptable. And"},{"line_number":138,"context_line":"avoid to generate a huge SQL which is hard to maintain."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Other deployer impact"},{"line_number":141,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf57530f_d2065121","line":138,"range":{"start_line":137,"start_character":69,"end_line":138,"end_character":55},"in_reply_to":"ff5d4b2f_fbaa50d0","updated":"2017-09-20 06:37:34.000000000","message":"Done","commit_id":"be1f55db4d5ece2cdaa2d28ca68612ef8678cd8c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0a9815dc47513f3ead86761bb8edb3dccde6b22b","unresolved":false,"context_lines":[{"line_number":54,"context_line":"Proposals to add `traits` parameter to the `GET /allocation_candidates`. It"},{"line_number":55,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026traits\u003dHW:CPU:X86:AVX,HW:CPU:X86:AVX2"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"In the above request, the traits `HW:CPU:X86:AVX` and `HW:CPU:X86:AVX2` are"},{"line_number":60,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf57530f_9d0a2588","line":57,"range":{"start_line":57,"start_character":83,"end_line":57,"end_character":97},"updated":"2017-09-20 12:16:42.000000000","message":"Is this how traits are named?  I thought they had underscores.  These colons are confusing, especially as colon is the delimiter used to separate resource class and quantity for the `resources` key.","commit_id":"57bb707e49e7587223751187f16322a22ce0fd78"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"78648e331b9e996b68dfe2e1db8d982f10b603e0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"Proposals to add `traits` parameter to the `GET /allocation_candidates`. It"},{"line_number":55,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026traits\u003dHW:CPU:X86:AVX,HW:CPU:X86:AVX2"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"In the above request, the traits `HW:CPU:X86:AVX` and `HW:CPU:X86:AVX2` are"},{"line_number":60,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f5c4f37_c658d757","line":57,"range":{"start_line":57,"start_character":83,"end_line":57,"end_character":97},"in_reply_to":"bf57530f_9d0a2588","updated":"2017-09-21 06:12:18.000000000","message":"oh, yea, I used to use the old style, I will fix them, thanks!","commit_id":"57bb707e49e7587223751187f16322a22ce0fd78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0a9815dc47513f3ead86761bb8edb3dccde6b22b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"* Integrate the common query method into the main query"},{"line_number":173,"context_line":"* fill the traits into the AllocationCandidates object"},{"line_number":174,"context_line":"* Expose the \u0027traits\u0027 in the `GET /allocation_candidates` API."},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"Dependencies"},{"line_number":177,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf57530f_5d870dd9","line":175,"updated":"2017-09-20 12:16:42.000000000","message":"* Create a new microversion","commit_id":"57bb707e49e7587223751187f16322a22ce0fd78"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"23574b09f3599054cf2904fdaac4802090d2ba6f","unresolved":false,"context_lines":[{"line_number":172,"context_line":"* Integrate the common query method into the main query"},{"line_number":173,"context_line":"* fill the traits into the AllocationCandidates object"},{"line_number":174,"context_line":"* Expose the \u0027traits\u0027 in the `GET /allocation_candidates` API."},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"Dependencies"},{"line_number":177,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f5c4f37_263fb3d7","line":175,"in_reply_to":"bf57530f_5d870dd9","updated":"2017-09-21 06:13:10.000000000","message":"yea","commit_id":"57bb707e49e7587223751187f16322a22ce0fd78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/add-trait-support-in-allocation-candidates"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The placement API already supports to query resource by quantitative aspect."},{"line_number":14,"context_line":"The qualitative aspect of the resource is also key feature for the placement,"},{"line_number":15,"context_line":"this spec aims to proposal adding the query support for the qualitative aspect."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_09a6d0c2","line":13,"range":{"start_line":13,"start_character":26,"end_line":13,"end_character":75},"updated":"2017-09-25 11:53:14.000000000","message":"supports filtering resource providers that have capacity for a requested amount of resources.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/add-trait-support-in-allocation-candidates"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The placement API already supports to query resource by quantitative aspect."},{"line_number":14,"context_line":"The qualitative aspect of the resource is also key feature for the placement,"},{"line_number":15,"context_line":"this spec aims to proposal adding the query support for the qualitative aspect."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_a97d7c1d","line":15,"range":{"start_line":14,"start_character":0,"end_line":15,"end_character":79},"updated":"2017-09-25 11:53:14.000000000","message":"Suggest rewording to:\n\n\"In addition to those quantitative aspects of the request, the placement API also needs to filter out resource providers that do not have a set of required qualitative attributes.\"","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"The `GET /allocation_candidates` only supports to query by quantitative aspect"},{"line_number":21,"context_line":"with `resources` query parameters. For the qualitative aspect, we need a"},{"line_number":22,"context_line":"parameter also."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_4974c835","line":20,"range":{"start_line":20,"start_character":38,"end_line":20,"end_character":55},"updated":"2017-09-25 11:53:14.000000000","message":"supports querying","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a0da076254799f8146bfdb5890154ad592866422","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"The `GET /allocation_candidates` only supports to query by quantitative aspect"},{"line_number":21,"context_line":"with `resources` query parameters. For the qualitative aspect, we need a"},{"line_number":22,"context_line":"parameter also."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_a83788e3","line":20,"range":{"start_line":20,"start_character":38,"end_line":20,"end_character":55},"in_reply_to":"7f515b1d_2d5f3873","updated":"2017-09-26 14:43:18.000000000","message":"no worries, Alex :) English is a terribly confusing and awkward language!","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a8a68c107a323027ada2b9b9999a1e9fc86104b7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"The `GET /allocation_candidates` only supports to query by quantitative aspect"},{"line_number":21,"context_line":"with `resources` query parameters. For the qualitative aspect, we need a"},{"line_number":22,"context_line":"parameter also."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_2d5f3873","line":20,"range":{"start_line":20,"start_character":38,"end_line":20,"end_character":55},"in_reply_to":"7f515b1d_4974c835","updated":"2017-09-26 12:12:48.000000000","message":"I will remember the \u0027support\u0027 is transitive verb, it needn\u0027t \u0027to\u0027.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This is an API proposal for the internal interactive between Nova and"},{"line_number":28,"context_line":"Placement. The final use-case is the end user wants to boot up instance on the"},{"line_number":29,"context_line":"compute node which has AVX cpu feature."},{"line_number":30,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_09949036","line":27,"range":{"start_line":27,"start_character":41,"end_line":27,"end_character":52},"updated":"2017-09-25 11:53:14.000000000","message":"interaction","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a8a68c107a323027ada2b9b9999a1e9fc86104b7","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This is an API proposal for the internal interactive between Nova and"},{"line_number":28,"context_line":"Placement. The final use-case is the end user wants to boot up instance on the"},{"line_number":29,"context_line":"compute node which has AVX cpu feature."},{"line_number":30,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_6dcad01a","line":27,"range":{"start_line":27,"start_character":41,"end_line":27,"end_character":52},"in_reply_to":"7f515b1d_09949036","updated":"2017-09-26 12:12:48.000000000","message":"yea, it should be \u0027noun\u0027.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":31,"context_line":"Proposed change"},{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_49c28835","line":34,"range":{"start_line":34,"start_character":17,"end_line":34,"end_character":23},"updated":"2017-09-25 11:53:14.000000000","message":"s/traits/require/","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_69c5443c","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"updated":"2017-09-25 11:53:14.000000000","message":"have each of the traits","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_09e250d6","line":37,"range":{"start_line":37,"start_character":29,"end_line":37,"end_character":35},"updated":"2017-09-25 11:53:14.000000000","message":"s/traits/require/","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b135da61cc4c6ffdb45b5b66fdcd40ce075ea09d","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_9d31d7a5","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_02222201","updated":"2017-09-25 14:47:21.000000000","message":"See my comment below on line 71","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fe03180cd68b308cd21d19bb3821ef4854bcfd55","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_3c141b4e","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_1c86ffdc","updated":"2017-09-25 20:24:06.000000000","message":"\u003e There\u0027s still questions of trait inheritance that should be\n \u003e addressed (the stuff on L71 doesn\u0027t close the gap).\n \u003e \n \u003e Does a child RP inherit its traits from its parent? \u003d\u003e Pro: Allows\n \u003e us to eliminate some redundancy e.g. in a NUMA scenario where all\n \u003e the NUMA nodes (each of which is represented as a separate RP)\n \u003e share all of the CPU and memory traits except the one that\n \u003e identifies the NUMA node.\n\nThere is no trait that \"identifies the NUMA node\". Each NUMA node will be represented by a different resource provider record entirely.\n\n \u003e  Con: harder to code and validate.  So\n \u003e probably prefer the duplication.  But let\u0027s state that.\n \u003e \n \u003e Does a parent RP accumulate traits from its children? \u003d\u003e Pro:\n \u003e Allows the scheduler to filter root RPs (e.g. hosts, in the most\n \u003e common case) without having to look at the whole tree.  Con: need\n \u003e to percolate traits up the tree any time a RP is added/updated. \n \u003e And we can probably do that lookup cheaply in SQL anyway.  So\n \u003e probably prefer no inheritance.  But let\u0027s state that.\n\nI wouldn\u0027t necessarily say that a parent \"accumulates\" traits from its children, but I suppose you could say that the provider *tree* has the union of all traits associated with providers containing the same root_provider_uuid.\n\nAnd yes, that\u0027s exactly how I envision the filtering working. We will be doing a query similar to:\n\n SELECT rp.id, rp.root_provider_uuid\n FROM resource_providers AS rp\n JOIN resource_provider_traits AS rpt\n ON rp.id \u003d rpt.resource_provider_id\n AND rpt.trait_id IN ($required_traits)\n GROUP BY rp.id, rp.root_provider_uuid\n HAVING COUNT(DISTINCT rpt.trait_id) \u003d $num_required_traits\n\nand then grabbing the root_provider_uuid values from that result.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"15369590cc78973cc89426f54eeb79a68e22fb17","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_5ff34974","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_1f5dd1e8","updated":"2017-09-25 20:47:59.000000000","message":":) It depends.\n\nFor traits like HW_CPU_X86_AVX, that can/should be a trait on the compute node\u0027s resource provider (i.e. the root provider). NUMA nodes don\u0027t have anything to do with CPU instruction set extensions.\n\nThat said, I could imagine Intel coming up with some type of nifty technology with RDT/CAT that allows one NUMA node to expose some cache allocation widget or capability and not others.\n\nIn that case, individual NUMA nodes could possibly have a different set of traits from each other.\n\nAt the end of the day, it\u0027s going to come down to the hypervisor or things like the generic device manager to tag child resource providers with the traits that it determines is most appropriate.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0acdee9471bcd39ca44f64e3af2241831615034c","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_1f5dd1e8","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_3c141b4e","updated":"2017-09-25 20:34:42.000000000","message":"\u003e There is no trait that \"identifies the NUMA node\". Each NUMA node\n \u003e will be represented by a different resource provider record\n \u003e entirely.\n\nBah, okay, fine, so the point remains: do the traits (like HW_CPU_X86_AVX) belong to the parent compute node RP, or are they duplicated on each NUMA node RP?  It should be stated explicitly in the spec either way, because it\u0027s a question that\u0027s going to come up every time someone has to model nested RPs.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5631689a102fb6c6e1747736afa64813b1a4194d","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_92f08b69","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_5ff34974","updated":"2017-09-26 05:55:22.000000000","message":"yes, agree with Jay, it shouldn\u0027t say \"accumulates\" exactly, it is just a way filtering the RPs.\n\n@Eric, not sure I should say something the traits should belong to parent RP or child RP in the spec, it is more about how we construct the hardware topology. Just as Jay raised example","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7766c2984418ef121de2d07aef53ba550155354","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_02222201","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_69c5443c","updated":"2017-09-25 14:38:44.000000000","message":"Does this assume trait inheritance in the nested provider case? If yes, can we state that explicitly?","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e2b60df522d8da8520d06362b789e632f648926","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_521d65bb","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_92f08b69","updated":"2017-09-26 14:16:57.000000000","message":"That\u0027s exactly my point.  The folks who need to construct the hardware topology need to know the answer to this question so they know where to put their traits.  Based on what Jay said above, it sounds like we (at least) need to be able to inherit traits downward (from parent to children).\n\nWhatever the case, it should be discussed in the spec (this one, or the NRP one, or both).","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc3fe060f33489a0011644e58365e0bdbc2af5b4","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposes to add `traits` query parameter to the `GET /allocation_candidates`"},{"line_number":35,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":36,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":37,"context_line":"the traits in the parameter `traits`."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Alternatives"},{"line_number":40,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_1c86ffdc","line":37,"range":{"start_line":36,"start_character":72,"end_line":37,"end_character":10},"in_reply_to":"7f515b1d_9d31d7a5","updated":"2017-09-25 20:11:08.000000000","message":"There\u0027s still questions of trait inheritance that should be addressed (the stuff on L71 doesn\u0027t close the gap).\n\nDoes a child RP inherit its traits from its parent? \u003d\u003e Pro: Allows us to eliminate some redundancy e.g. in a NUMA scenario where all the NUMA nodes (each of which is represented as a separate RP) share all of the CPU and memory traits except the one that identifies the NUMA node.  Con: harder to code and validate.  So probably prefer the duplication.  But let\u0027s state that.\n\nDoes a parent RP accumulate traits from its children? \u003d\u003e Pro: Allows the scheduler to filter root RPs (e.g. hosts, in the most common case) without having to look at the whole tree.  Con: need to percolate traits up the tree any time a RP is added/updated.  And we can probably do that lookup cheaply in SQL anyway.  So probably prefer no inheritance.  But let\u0027s state that.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":54,"context_line":"Proposals to add `traits` parameter to the `GET /allocation_candidates`. It"},{"line_number":55,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026traits\u003dHW_CPU_X86_AVX,HW_CPU_X86_AVX2"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `HW_CPU_X86_AVX2` are"},{"line_number":60,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_c939d841","line":57,"range":{"start_line":57,"start_character":98,"end_line":57,"end_character":113},"updated":"2017-09-25 11:53:14.000000000","message":"I don\u0027t think requesting AVX *and* AVX2 is really a valid thing is it? I mean, if an x86 CPU supports the AVX2 instruction set extensions, it always supports the AVX extension, right?\n\nHow about making this example request HW_CPU_X86_AVX2,STORAGE_DISK_SSD instead?","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":54,"context_line":"Proposals to add `traits` parameter to the `GET /allocation_candidates`. It"},{"line_number":55,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026traits\u003dHW_CPU_X86_AVX,HW_CPU_X86_AVX2"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `HW_CPU_X86_AVX2` are"},{"line_number":60,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_29062c88","line":57,"range":{"start_line":57,"start_character":76,"end_line":57,"end_character":82},"updated":"2017-09-25 11:53:14.000000000","message":"s/traits/require","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5631689a102fb6c6e1747736afa64813b1a4194d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"Proposals to add `traits` parameter to the `GET /allocation_candidates`. It"},{"line_number":55,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026traits\u003dHW_CPU_X86_AVX,HW_CPU_X86_AVX2"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `HW_CPU_X86_AVX2` are"},{"line_number":60,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_72f3cf74","line":57,"range":{"start_line":57,"start_character":98,"end_line":57,"end_character":113},"in_reply_to":"7f515b1d_c939d841","updated":"2017-09-26 05:55:22.000000000","message":"Yea, agree with that, I just free write something here, let me use SSD instead.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":59,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `HW_CPU_X86_AVX2` are"},{"line_number":60,"context_line":"required."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The validation for the `traits` are:"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_6921c4fb","line":62,"range":{"start_line":62,"start_character":24,"end_line":62,"end_character":30},"updated":"2017-09-25 11:53:14.000000000","message":"s/traits/require","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":62,"context_line":"The validation for the `traits` are:"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_e98254c8","line":65,"updated":"2017-09-25 11:53:14.000000000","message":"I\u0027m not sure what you mean by \"the traits must be used with resources together\"? The quantitative aspects of the request don\u0027t really have anything to do with each other.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0acdee9471bcd39ca44f64e3af2241831615034c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"The validation for the `traits` are:"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_df1cd914","line":65,"in_reply_to":"7f515b1d_9c02ef0a","updated":"2017-09-25 20:34:42.000000000","message":"That\u0027s even more confusing.  If it\u0027s legal, we could use some verbiage about what it means, what use cases it satisfies.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fe03180cd68b308cd21d19bb3821ef4854bcfd55","unresolved":false,"context_lines":[{"line_number":62,"context_line":"The validation for the `traits` are:"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_9c02ef0a","line":65,"in_reply_to":"7f515b1d_d1ebbed9","updated":"2017-09-25 20:24:06.000000000","message":"OK. I don\u0027t think it\u0027s necessary to have this sentence, though. There\u0027s frankly nothing wrong with requesting a set of required traits and no resources...","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5631689a102fb6c6e1747736afa64813b1a4194d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"The validation for the `traits` are:"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_f208df2d","line":65,"in_reply_to":"7f515b1d_df1cd914","updated":"2017-09-26 05:55:22.000000000","message":"Yes, as Eric said: \"You can\u0027t specify `traits` without specifying `resources`.\n\nAgree there is nothing about quantitaive and qualitative. But, at \u0027Rest API Impact` section, it is more about describing the API behaviour. For the \u0027GET /allocation_candidates\u0027, at least you should specify `resources` https://github.com/openstack/nova/blob/master/nova/objects/resource_provider.py#L2419\n\nIf you want to filter by resources and traits separately, that is the API behavior of `GET /resource_providers`.\n\nDoes make sense?","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b65c47004da99b6d1cdf1d7424325f43d08def98","unresolved":false,"context_lines":[{"line_number":62,"context_line":"The validation for the `traits` are:"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_d1ebbed9","line":65,"in_reply_to":"7f515b1d_e98254c8","updated":"2017-09-25 13:12:51.000000000","message":"I took this to mean, \"You can\u0027t specify `traits` without specifying `resources`.\"","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e2b60df522d8da8520d06362b789e632f648926","unresolved":false,"context_lines":[{"line_number":62,"context_line":"The validation for the `traits` are:"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_925bdd52","line":65,"in_reply_to":"7f515b1d_f208df2d","updated":"2017-09-26 14:16:57.000000000","message":"Yeah, kind of.  But it sounds like Jay may disagree with you.  @Jay, are you suggesting that it would be legal to e.g.\n\n GET /allocation_candidates?traits\u003dHW_CPU_X86_AVX\n\n?  If so, what does that mean?  Do you get back something like\n\n  {\n    \"allocation_requests\": [\n        {\n            \"allocations\": [\n                {\n                    \"resource_provider\": {\n                        \"uuid\": \"88a5187d-e0a4-426d-bed4-54e7e89b2adb\"\n                    },\n                    \"resources\": {\n                        # ?? THIS IS EMPTY ??\n                    }\n                }\n            ]\n        }\n    ],\n    \"provider_summaries\": {\n        \"88a5187d-e0a4-426d-bed4-54e7e89b2adb\": {\n            \"resources\": {\n                \"VCPU\": {\n                    \"capacity\": 128,\n                    \"used\": 1\n                }\n                \"MEMORY_MB\": {\n                    \"capacity\": 8096,\n                    \"used\": 0\n                }\n                \"DISK_GB\": {\n                    \"capacity\": 40960,\n                    \"used\": 0\n                }\n            },\n            \"traits\": [\n                \"HW_CPU_X86_SSE\",\n                \"HW_CPU_X86_SSE2\",\n                \"HW_CPU_X86_AVX\",\n                \"HW_CPU_X86_AVX2\",\n                ...\n            ]\n        }\n    }\n  }\n\n?  If so, what good does that do you?","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_69766409","line":66,"range":{"start_line":66,"start_character":2,"end_line":66,"end_character":5},"updated":"2017-09-25 11:53:14.000000000","message":"Any","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_e95b7484","line":66,"range":{"start_line":66,"start_character":53,"end_line":66,"end_character":72},"updated":"2017-09-25 11:53:14.000000000","message":"result in a","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_4973a816","line":66,"range":{"start_line":66,"start_character":29,"end_line":66,"end_character":35},"updated":"2017-09-25 11:53:14.000000000","message":"s/traits/require","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":64,"context_line":"* The `traits` is optional, but `resources` is required. The `traits` must be"},{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_29c74c15","line":67,"range":{"start_line":67,"start_character":24,"end_line":67,"end_character":29},"updated":"2017-09-25 11:53:14.000000000","message":"s/The invalid/Invalid/","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_09cc9033","line":68,"range":{"start_line":68,"start_character":21,"end_line":68,"end_character":25},"updated":"2017-09-25 11:53:14.000000000","message":"and also isn\u0027t a custom trait","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":65,"context_line":"  used with `resources` together"},{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_c960b835","line":68,"range":{"start_line":68,"start_character":12,"end_line":68,"end_character":20},"updated":"2017-09-25 11:53:14.000000000","message":"library","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":66,"context_line":"* The invalid traits in the `traits` parameters will lead the API return"},{"line_number":67,"context_line":"  `HTTPBadRequest 400`. The invalid trait means the trait isn\u0027t in the"},{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_89d760c0","line":69,"range":{"start_line":69,"start_character":22,"end_line":69,"end_character":28},"updated":"2017-09-25 11:53:14.000000000","message":"s/traits/require","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_24e9b119","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":43},"updated":"2017-09-25 11:53:14.000000000","message":"We should be explicit here about shared and nested resource providers and how they affect the calculation of which providers are returned for a given set of required traits.\n\nEach resource provider in the returned list of allocation candidates will have every required trait. Rather, the combination of resource providers included in each allocation request will have all of the required traits.\n\nFor example, the compute node resource provider might have the HW_CPU_X86_AVX2 trait but not the STORAGE_DISK_SSD trait. That trait may be associated with the shared storage provider that is providing the DISK_GB resources for the request. Taken together, however, the allocations are against resource providers that, combined, have all of the required traits.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5631689a102fb6c6e1747736afa64813b1a4194d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_0d3c7cc6","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":43},"in_reply_to":"7f515b1d_1c127f0a","updated":"2017-09-26 05:55:22.000000000","message":"@Eric, not sure \u0027not\u0027 is missing or not...but I think I get the point from Jay","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dc3fe060f33489a0011644e58365e0bdbc2af5b4","unresolved":false,"context_lines":[{"line_number":68,"context_line":"  os-traits librarym also isn\u0027t the custom trait defined by traits API."},{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_1c127f0a","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":43},"in_reply_to":"7f515b1d_24e9b119","updated":"2017-09-25 20:11:08.000000000","message":"\u003e Each resource provider in the returned list of allocation\n \u003e candidates will have every required trait.\n\nIs there a \"not\" missing in there?","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b62e3d110dcbcff103db8497df162fd2064be95b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"allocation_requests\": ["}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f5c4f37_3b70d872","line":72,"updated":"2017-09-21 15:13:54.000000000","message":"Somewhere, somehow, the *requested* traits need to be represented.  That is, by the time we get to virt, virt needs to be able to figure out whether CUSTOM_MAGIC_CAPABILITY_THATS_OFF_BY_DEFAULT_AND_MAY_BE_EXPENSIVE_TO_TURN_ON was actually requested, versus just being available on the RP.  The simplest thing would be to include the requested traits in the allocations, e.g.:\n\n \"allocations\": [\n     {\n         \"resource_provider\": {\n             \"uuid\": \"88a5187d-e0a4-426d-bed4-54e7e89b2adb\"\n         },\n         \"resources\": {\n             \"VCPU\": 8,\n             \"MEMORY_MB\": 1024,\n             \"DISK_GB\": 4096\n         },\n         \"requested_traits\": [\n             \"HW_CPU_X86_AVX\",\n             \"HW_CPU_X86_AVX2\"\n         ]\n     }\n ]","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b65c47004da99b6d1cdf1d7424325f43d08def98","unresolved":false,"context_lines":[{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"allocation_requests\": ["}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_9131c6a5","line":72,"in_reply_to":"7f515b1d_69fd4439","updated":"2017-09-25 13:12:51.000000000","message":"I don\u0027t get this.  Here\u0027s a simple example:\n\nI have a network resource with traits HW_NIC_SWITCH_MODE_VEB and HW_NIC_SWITCH_MODE_VEPA.  By putting one or the other of those in my request, I\u0027m indicating which mode I want my network resource to get.  It would be way easier for me to be able to see which traits were requested in the allocations than to, what, model those modes as inventory-less resource classes?\n\n(BTW, @alex_xu, the most recent rev of the request-traits spec no longer promises to put the requested traits in the request_spec [1] - a fact about which I have duly complained ;)\n\n[1] https://review.openstack.org/#/c/468797/6/specs/queens/approved/request-traits.rst@40","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bb575cdd72d4d67460ae35c703a4e4538ee66a9a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"allocation_requests\": ["}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_f491089b","line":72,"in_reply_to":"7f515b1d_9131c6a5","updated":"2017-09-25 13:36:17.000000000","message":"\u003e I don\u0027t get this.  Here\u0027s a simple example:\n \u003e \n \u003e I have a network resource with traits HW_NIC_SWITCH_MODE_VEB and\n \u003e HW_NIC_SWITCH_MODE_VEPA.  By putting one or the other of those in\n \u003e my request, I\u0027m indicating which mode I want my network resource to\n \u003e get.  It would be way easier for me to be able to see which traits\n \u003e were requested in the allocations than to, what, model those modes\n \u003e as inventory-less resource classes?\n\nAllocations represent resources that are consumed by an instance. The switch mode is not a trait. It\u0027s not a capability at all and it\u0027s not in os-traits.\n\n \u003e (BTW, @alex_xu, the most recent rev of the request-traits spec no\n \u003e longer promises to put the requested traits in the request_spec [1]\n \u003e - a fact about which I have duly complained ;)\n \u003e \n \u003e [1] https://review.openstack.org/#/c/468797/6/specs/queens/approved/request-traits.rst@40\n\nYou are confusing capabilities of a resource *provider* (i.e. traits) with attributes of things like a port binding request. The two concepts are entirely different.\n\nBest,\n\n-jay","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5631689a102fb6c6e1747736afa64813b1a4194d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"allocation_requests\": ["}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_4dccb4bb","line":72,"in_reply_to":"7f515b1d_94f3f473","updated":"2017-09-26 05:55:22.000000000","message":"Yea, I got the point from Jay. Sometimes we mix the traits and the configuration together.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fcdd598c3162a361d08b13af1344a22f086a7042","unresolved":false,"context_lines":[{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"allocation_requests\": ["}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_94f3f473","line":72,"in_reply_to":"7f515b1d_f491089b","updated":"2017-09-25 13:51:54.000000000","message":"Okay.  My confusion notwithstanding, I\u0027d like to understand how such things get through from the operator to the instance.  It seems like there\u0027s some synergy between traits and these kinds of attributes/settings, and maybe I chose a poor example.  Or maybe I\u0027m trying to force everything to look like a nail.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"allocation_requests\": ["}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_69fd4439","line":72,"in_reply_to":"9f5c4f37_3b70d872","updated":"2017-09-25 11:53:14.000000000","message":"No, traits aren\u0027t consumed by an instance. The provider either has or doesn\u0027t have a trait. It\u0027s not dynamically consumed. If it is, it should be a resource that is consumable by an instance.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cbcd5891382d2e1f135586c7608700758f86243b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"* The empty value of `traits` can be accepted, and it means no required traits."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":72,"context_line":"summary of the responses::"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"allocation_requests\": ["}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_3fff8602","line":72,"in_reply_to":"9f5c4f37_3b70d872","updated":"2017-09-25 06:48:06.000000000","message":"The requested traits are stored in the request_spec, so that is passed to the compute node, is that enough?\n\nhttps://review.openstack.org/#/c/468797/5/specs/queens/approved/request-traits.rst@54\n\nAnd the dict in the \u0027allocations\u0027 is a request body of the \u0027PUT /allocations\u0027, the \u0027requested_triats\u0027 isn\u0027t part of that API request body.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    }"},{"line_number":116,"context_line":"  }"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"When there is no traits for a resource provider, the `traits` attribute is"},{"line_number":119,"context_line":"still in the response, and with a empty list."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"All the above change are in a new microversion."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_44e38d34","line":118,"range":{"start_line":118,"start_character":11,"end_line":118,"end_character":13},"updated":"2017-09-25 11:53:14.000000000","message":"are","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8828aff251aa18bbb8639e45bd9a1af540997adf","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":142,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":143,"context_line":"in the main SQL. It will be slow than single SQL, but it is acceptable."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"Other deployer impact"},{"line_number":146,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_c4453d19","line":143,"range":{"start_line":143,"start_character":17,"end_line":143,"end_character":48},"updated":"2017-09-25 11:53:14.000000000","message":"it *may* be slower :) it could also be better performing.","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5631689a102fb6c6e1747736afa64813b1a4194d","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":142,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":143,"context_line":"in the main SQL. It will be slow than single SQL, but it is acceptable."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"Other deployer impact"},{"line_number":146,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_cdbf84f9","line":143,"range":{"start_line":143,"start_character":17,"end_line":143,"end_character":48},"in_reply_to":"7f515b1d_c4453d19","updated":"2017-09-26 05:55:22.000000000","message":"ok, so it depends on like how we build the index, or whether the complex filtering can leverage the index?","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6375a3c9382bed137408dc45ff44c99a961b2ca9","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":142,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":143,"context_line":"in the main SQL. It will be slow than single SQL, but it is acceptable."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"Other deployer impact"},{"line_number":146,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_7d16a957","line":143,"range":{"start_line":143,"start_character":17,"end_line":143,"end_character":48},"in_reply_to":"7f515b1d_cdbf84f9","updated":"2017-09-28 16:04:52.000000000","message":"No, it\u0027s actually an RDBMS-specific thing. Sometimes a single query is faster. Sometimes doing multiple queries is actually faster... it\u0027s just a weird thing that needs to be bench","commit_id":"59a00b4a6f045f9a4745aece99b1c8d92a359ded"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1aaab2e21d0b53e242e2ff8ab4cf59a4efe3caa8","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"All the required traits may not in the single resource provider, the traits"},{"line_number":41,"context_line":"may be in the resource provider which shared resource in the same aggregate,"},{"line_number":42,"context_line":"also the traits may be in the nested resource provider."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Alternatives"},{"line_number":45,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7f515b1d_0cba37dd","line":42,"updated":"2017-09-26 11:35:31.000000000","message":"++","commit_id":"8dac90e73ccff5c309e36c166a51792971a661f9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1aaab2e21d0b53e242e2ff8ab4cf59a4efe3caa8","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The validation for the `required` are:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":70,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":71,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":72,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":73,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7f515b1d_ac9fa35d","line":70,"updated":"2017-09-26 11:35:31.000000000","message":"++ we can relax it later if needed to allow asking for traits only","commit_id":"8dac90e73ccff5c309e36c166a51792971a661f9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1aaab2e21d0b53e242e2ff8ab4cf59a4efe3caa8","unresolved":false,"context_lines":[{"line_number":81,"context_line":"For example, the compute node resource provider might have the `HW_CPU_X86_AVX`"},{"line_number":82,"context_line":"trait but not the `STORAGE_DISK_SSD` trait. That trait may be associated with"},{"line_number":83,"context_line":"the shared storage provider that is providing the DISK_GB resources for the"},{"line_number":84,"context_line":"request. and in the above request, the API will return an allocation request"},{"line_number":85,"context_line":"which includes two resource providers, compute node resource provider provides"},{"line_number":86,"context_line":"`VCPU` and `MEMORY_MB` resources with trait `HW_CPU_X86_AVX`, the shared"},{"line_number":87,"context_line":"storage provider are sharing `DISK_GB` resource with trait `STORAGE_DISK_GB`."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7f515b1d_eca35b9d","line":84,"range":{"start_line":84,"start_character":7,"end_line":84,"end_character":19},"updated":"2017-09-26 11:35:31.000000000","message":"nit:s/. and in the/. For the/","commit_id":"8dac90e73ccff5c309e36c166a51792971a661f9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a8a68c107a323027ada2b9b9999a1e9fc86104b7","unresolved":false,"context_lines":[{"line_number":81,"context_line":"For example, the compute node resource provider might have the `HW_CPU_X86_AVX`"},{"line_number":82,"context_line":"trait but not the `STORAGE_DISK_SSD` trait. That trait may be associated with"},{"line_number":83,"context_line":"the shared storage provider that is providing the DISK_GB resources for the"},{"line_number":84,"context_line":"request. and in the above request, the API will return an allocation request"},{"line_number":85,"context_line":"which includes two resource providers, compute node resource provider provides"},{"line_number":86,"context_line":"`VCPU` and `MEMORY_MB` resources with trait `HW_CPU_X86_AVX`, the shared"},{"line_number":87,"context_line":"storage provider are sharing `DISK_GB` resource with trait `STORAGE_DISK_GB`."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7f515b1d_a71c5c12","line":84,"range":{"start_line":84,"start_character":7,"end_line":84,"end_character":19},"in_reply_to":"7f515b1d_eca35b9d","updated":"2017-09-26 12:12:48.000000000","message":"thanks","commit_id":"8dac90e73ccff5c309e36c166a51792971a661f9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1aaab2e21d0b53e242e2ff8ab4cf59a4efe3caa8","unresolved":false,"context_lines":[{"line_number":85,"context_line":"which includes two resource providers, compute node resource provider provides"},{"line_number":86,"context_line":"`VCPU` and `MEMORY_MB` resources with trait `HW_CPU_X86_AVX`, the shared"},{"line_number":87,"context_line":"storage provider are sharing `DISK_GB` resource with trait `STORAGE_DISK_GB`."},{"line_number":88,"context_line":" "},{"line_number":89,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":90,"context_line":"summary of the responses::"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7f515b1d_cc79bf2f","line":88,"updated":"2017-09-26 11:35:31.000000000","message":"nit: whitespace in empty line","commit_id":"8dac90e73ccff5c309e36c166a51792971a661f9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a8a68c107a323027ada2b9b9999a1e9fc86104b7","unresolved":false,"context_lines":[{"line_number":85,"context_line":"which includes two resource providers, compute node resource provider provides"},{"line_number":86,"context_line":"`VCPU` and `MEMORY_MB` resources with trait `HW_CPU_X86_AVX`, the shared"},{"line_number":87,"context_line":"storage provider are sharing `DISK_GB` resource with trait `STORAGE_DISK_GB`."},{"line_number":88,"context_line":" "},{"line_number":89,"context_line":"All traits which the resource provider have will be included in the provider"},{"line_number":90,"context_line":"summary of the responses::"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7f515b1d_871720ee","line":88,"in_reply_to":"7f515b1d_cc79bf2f","updated":"2017-09-26 12:12:48.000000000","message":"Done","commit_id":"8dac90e73ccff5c309e36c166a51792971a661f9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e2b60df522d8da8520d06362b789e632f648926","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":36,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_ad6f9a90","line":35,"range":{"start_line":35,"start_character":17,"end_line":35,"end_character":25},"updated":"2017-09-26 14:16:57.000000000","message":"is it `require` or `required` Jay?","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"91095eb4b742a5c7113d7d38e0fbd9f218185e3d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":36,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_b1a5a506","line":35,"range":{"start_line":35,"start_character":17,"end_line":35,"end_character":25},"in_reply_to":"7f515b1d_1eedb624","updated":"2017-09-27 06:50:58.000000000","message":"Why not \u0027requires\u0027?, Since the value is a list of traits.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"473dffa8a61df8540bf1f02fd29f820c9ab9a155","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":36,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_d4b22849","line":35,"range":{"start_line":35,"start_character":17,"end_line":35,"end_character":25},"in_reply_to":"7f515b1d_4df23f72","updated":"2017-09-28 01:59:29.000000000","message":"Ah...right, require is verb, not noun.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a0da076254799f8146bfdb5890154ad592866422","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":36,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_c874046b","line":35,"range":{"start_line":35,"start_character":17,"end_line":35,"end_character":25},"in_reply_to":"7f515b1d_ad6f9a90","updated":"2017-09-26 14:43:18.000000000","message":"I like \"require\" or \"requires\" vs. \"required\"","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3d00a812c929c11fd658ce8a04cc81574076a7a1","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":36,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_4df23f72","line":35,"range":{"start_line":35,"start_character":17,"end_line":35,"end_character":25},"in_reply_to":"7f515b1d_b1a5a506","updated":"2017-09-27 14:29:20.000000000","message":"Heh, that sort of makes my point: \"requires\" is a third-person verb (\"my VM requires such-and-such\") not a plural noun (that would be \"requirements\").\n\nNot that we as developers are in any way beholden to the Queen\u0027s English when coming up with token names.\n\nAnyway, `requires` is fine.  And when we do the other thing, it\u0027ll be called `prefers`.\n\nI just felt like those read a little weirder than \"require\" and \"prefer\".","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1e36d7d43c12a0cd6cee06db538ba8e62ab3d957","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":36,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_1eedb624","line":35,"range":{"start_line":35,"start_character":17,"end_line":35,"end_character":25},"in_reply_to":"7f515b1d_c874046b","updated":"2017-09-26 15:21:33.000000000","message":"I prefer \"require\" FWIW.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"3a9ae7bb8a08082da99a5b866243c922a56cf592","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":36,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_85a227fb","line":35,"range":{"start_line":35,"start_character":17,"end_line":35,"end_character":25},"in_reply_to":"7f515b1d_d4b22849","updated":"2017-09-28 17:49:03.000000000","message":"The existing parameter, \u0027resources\u0027, is a noun. A verb just feels inconsistent. My vote is for \u0027required\u0027, as it isn\u0027t as verby as \u0027require\u0027 or \u0027requires\u0027.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a0da076254799f8146bfdb5890154ad592866422","unresolved":false,"context_lines":[{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"All the required traits may not in the single resource provider, the traits"},{"line_number":41,"context_line":"may be in the resource provider which shared resource in the same aggregate,"},{"line_number":42,"context_line":"also the traits may be in the nested resource provider."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_4806d4d0","line":40,"range":{"start_line":40,"start_character":28,"end_line":40,"end_character":34},"updated":"2017-09-26 14:43:18.000000000","message":"s/not in the/not be associated with a/","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e2b60df522d8da8520d06362b789e632f648926","unresolved":false,"context_lines":[{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"All the required traits may not in the single resource provider, the traits"},{"line_number":41,"context_line":"may be in the resource provider which shared resource in the same aggregate,"},{"line_number":42,"context_line":"also the traits may be in the nested resource provider."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Alternatives"},{"line_number":45,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_cd609604","line":42,"range":{"start_line":40,"start_character":0,"end_line":42,"end_character":55},"updated":"2017-09-26 14:16:57.000000000","message":"I\u0027m not sure what you\u0027re saying about shared RPs and aggregates, but traits should *not* percolate around aggregates.\n\nAnd for nested RPs, it needs to be clear that traits percolate down, but not up.\n\nHow about:\n\n\"With nested resource providers, traits defined on a parent RP are assumed to belong to all its child (descendant) RPs.  However, traits defined on a child RP do not apply to the parent (ancestor) RPs.  There is no implied sharing of traits within aggregates.\"\n\nAnd an example wouldn\u0027t go amiss.  The one Jay described in PS4 would work:\n\n # Compute RP:\n {\n     \"uuid\": \u003cUUID0\u003e,\n     \"resources\": { ... },\n     \"traits\": [\n         \"HW_CPU_X86_SSE\",\n         \"HW_CPU_X86_SSE2\",\n         \"HW_CPU_X86_AVX\",\n         \"HW_CPU_X86_AVX2\",\n     ]\n }\n # NUMA node 1 RP:\n {\n     \"uuid\": \u003cUUID1\u003e,\n     \"parent_provider_uuid\": \u003cUUID0\u003e,\n     \"root_provider_uuid\": \u003cUUID0\u003e,\n     \"resources\": { ... },\n     \"traits\": [\n         \"HW_CPU_MAGIC_CACHE_THINGY\",\n     ]\n }\n # NUMA node 2 RP:\n {\n     \"uuid\": \u003cUUID2\u003e,\n     \"parent_provider_uuid\": \u003cUUID0\u003e,\n     \"root_provider_uuid\": \u003cUUID0\u003e,\n     \"resources\": { ... },\n     \"traits\": []\n }\n\n Requesting\n     GET /allocation_candidates?resources\u003d...,required\u003dHW_CPU_X86_SSE2,HW_CPU_MAGIC_CACHE_THINGY\n ...will hit NUMA node 1 RP (the \"HW_CPU_X86_SSE2\" trait is inherited from the Compute RP).","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a0da076254799f8146bfdb5890154ad592866422","unresolved":false,"context_lines":[{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"All the required traits may not in the single resource provider, the traits"},{"line_number":41,"context_line":"may be in the resource provider which shared resource in the same aggregate,"},{"line_number":42,"context_line":"also the traits may be in the nested resource provider."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Alternatives"},{"line_number":45,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_e89c605e","line":42,"range":{"start_line":40,"start_character":0,"end_line":42,"end_character":55},"in_reply_to":"7f515b1d_cd609604","updated":"2017-09-26 14:43:18.000000000","message":"Chatted a bit about this on IRC. Eric\u0027s proposed wording above is good:\n\n\"With nested resource providers, traits defined on a parent RP are assumed to belong to all its child (descendant) RPs. However, traits defined on a child RP do not apply to the parent (ancestor) RPs. There is no implied sharing of traits within aggregates.\"\n\nThere\u0027s no need to go into implementation details about the SQL queries that would need to be produced, though.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"91095eb4b742a5c7113d7d38e0fbd9f218185e3d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":38,"context_line":"each of the traits in the parameter `required`."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"All the required traits may not in the single resource provider, the traits"},{"line_number":41,"context_line":"may be in the resource provider which shared resource in the same aggregate,"},{"line_number":42,"context_line":"also the traits may be in the nested resource provider."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Alternatives"},{"line_number":45,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_b05c78ed","line":42,"range":{"start_line":40,"start_character":0,"end_line":42,"end_character":55},"in_reply_to":"7f515b1d_e89c605e","updated":"2017-09-27 06:50:58.000000000","message":"agree with the words, it pretty clear, thanks","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bd0587a10a8a1596b66304559b876a4d116c1207","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"There also a proposal about `preferred_traits` parameter, it means nice to"},{"line_number":48,"context_line":"have a list of traits. But there still haven\u0027t clear use-case for it, so it"},{"line_number":49,"context_line":"isn\u0027t in the proposal."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_6f92baa0","line":49,"updated":"2017-09-26 13:33:02.000000000","message":"Good call, feels currently more like what Nova weigher would use anyways.\n\nI guess the other thing we are ignoring for now, on purpose, is wanting competing traits from different resource provides (give me SSD and spinning disk).","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1e36d7d43c12a0cd6cee06db538ba8e62ab3d957","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"There also a proposal about `preferred_traits` parameter, it means nice to"},{"line_number":48,"context_line":"have a list of traits. But there still haven\u0027t clear use-case for it, so it"},{"line_number":49,"context_line":"isn\u0027t in the proposal."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_de815e4c","line":49,"in_reply_to":"7f515b1d_08857c08","updated":"2017-09-26 15:21:33.000000000","message":"Sorry, I was talking about John\u0027s second point: \"wanting competing traits from different resource providres (give me SSD and spinning disk)\".\n\nAgree \"preferred traits\" is not in scope for Queens.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a0da076254799f8146bfdb5890154ad592866422","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"There also a proposal about `preferred_traits` parameter, it means nice to"},{"line_number":48,"context_line":"have a list of traits. But there still haven\u0027t clear use-case for it, so it"},{"line_number":49,"context_line":"isn\u0027t in the proposal."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_08857c08","line":49,"in_reply_to":"7f515b1d_6d5f620e","updated":"2017-09-26 14:43:18.000000000","message":"I don\u0027t remember saying that preferred traits would be a Queens thing.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"91095eb4b742a5c7113d7d38e0fbd9f218185e3d","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"There also a proposal about `preferred_traits` parameter, it means nice to"},{"line_number":48,"context_line":"have a list of traits. But there still haven\u0027t clear use-case for it, so it"},{"line_number":49,"context_line":"isn\u0027t in the proposal."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_90c73c97","line":49,"in_reply_to":"7f515b1d_6f92baa0","updated":"2017-09-27 06:50:58.000000000","message":"++ for weigher","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e2b60df522d8da8520d06362b789e632f648926","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"There also a proposal about `preferred_traits` parameter, it means nice to"},{"line_number":48,"context_line":"have a list of traits. But there still haven\u0027t clear use-case for it, so it"},{"line_number":49,"context_line":"isn\u0027t in the proposal."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_6d5f620e","line":49,"in_reply_to":"7f515b1d_6f92baa0","updated":"2017-09-26 14:16:57.000000000","message":"Yeah, that\u0027s something Jay was going to put in a separate spec, which was also supposed to be implemented in Queens. Once that\u0027s done, both specs should be updated to point to each other, since they build on each other and both define aspects of the /allocation_candidates API.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"3a9ae7bb8a08082da99a5b866243c922a56cf592","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"There also a proposal about `preferred_traits` parameter, it means nice to"},{"line_number":48,"context_line":"have a list of traits. But there still haven\u0027t clear use-case for it, so it"},{"line_number":49,"context_line":"isn\u0027t in the proposal."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Data model impact"},{"line_number":52,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_05e4f73a","line":49,"in_reply_to":"7f515b1d_90c73c97","updated":"2017-09-28 17:49:03.000000000","message":"Placement results are not ordered in any meaningful way. Adding a \u0027prefers\u0027 trait to the mix will mean that the results are indeed ordered. Since the scheduler will immediately start re-ordering the placement results, this seems incorrect.\n\nPreferred traits should affect weighing, and not anything in placement.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bd0587a10a8a1596b66304559b876a4d116c1207","unresolved":false,"context_lines":[{"line_number":59,"context_line":"Proposals to add `required` parameter to the `GET /allocation_candidates`. It"},{"line_number":60,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026requireds\u003dHW_CPU_X86_AVX,STORAGE_DISK_SSD"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `STORAGE_DISK_SSD` are"},{"line_number":65,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_afaf92e1","line":62,"range":{"start_line":62,"start_character":76,"end_line":62,"end_character":85},"updated":"2017-09-26 13:33:02.000000000","message":"Nit: this doesn\u0027t match the \"required\u003d\" mentioned above.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"91095eb4b742a5c7113d7d38e0fbd9f218185e3d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"Proposals to add `required` parameter to the `GET /allocation_candidates`. It"},{"line_number":60,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026requireds\u003dHW_CPU_X86_AVX,STORAGE_DISK_SSD"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `STORAGE_DISK_SSD` are"},{"line_number":65,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_10390ca3","line":62,"range":{"start_line":62,"start_character":76,"end_line":62,"end_character":85},"in_reply_to":"7f515b1d_afaf92e1","updated":"2017-09-27 06:50:58.000000000","message":"Done","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bd0587a10a8a1596b66304559b876a4d116c1207","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The validation for the `required` are:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":70,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":71,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":72,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":73,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_0fd6a650","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":22},"updated":"2017-09-26 13:33:02.000000000","message":"should not be?","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8e2b60df522d8da8520d06362b789e632f648926","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The validation for the `required` are:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":70,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":71,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":72,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":73,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_edf6b2f9","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":22},"in_reply_to":"7f515b1d_0fd6a650","updated":"2017-09-26 14:16:57.000000000","message":"should be - i.e. if you\u0027re going to specify `required`, it has to be along with `resources`.  Really, the first sentence says all that needs to be said; the second sentence is just confusing and can be omitted.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"91095eb4b742a5c7113d7d38e0fbd9f218185e3d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The validation for the `required` are:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":70,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":71,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":72,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":73,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_5052e4df","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":22},"in_reply_to":"7f515b1d_4807f483","updated":"2017-09-27 06:50:58.000000000","message":"yea, just as Eric and Jay said","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"3a9ae7bb8a08082da99a5b866243c922a56cf592","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The validation for the `required` are:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":70,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":71,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":72,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":73,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_65ce0bb5","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":22},"in_reply_to":"7f515b1d_5052e4df","updated":"2017-09-28 17:49:03.000000000","message":"Or you could say \"`required` is not required.\"  :)\n\nEnglish can be crazy.","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2f73c2f009065b07eed12a3fad3538ef695dc3c3","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The validation for the `required` are:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":70,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":71,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":72,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":73,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_c1d24c28","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":22},"in_reply_to":"7f515b1d_65ce0bb5","updated":"2017-10-17 05:42:39.000000000","message":":)","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a0da076254799f8146bfdb5890154ad592866422","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The validation for the `required` are:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":70,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":71,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":72,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":73,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7f515b1d_4807f483","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":22},"in_reply_to":"7f515b1d_edf6b2f9","updated":"2017-09-26 14:43:18.000000000","message":"Agree with Eric, I think you can sum this up to:\n\n * The `require` parameter is optional, however \u0027resources\u0027 is a mandatory parameter","commit_id":"7f5632280cfd4c5b1da6eebabda05029436222ba"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"52b68f067d5ec3331d46831c94c909922d4df555","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This is an API proposal for the internal interaction between Nova and"},{"line_number":29,"context_line":"Placement. The final use-case is the end user wants to boot up instance on the"},{"line_number":30,"context_line":"compute node which has AVX cpu feature."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"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":7,"id":"7f515b1d_75e36bda","line":30,"updated":"2017-09-28 08:26:41.000000000","message":"Nit: its tempting to be specific saying you filter out resource providers without AVX CPU feature, even though they have the capacity (all the quantitative resources)","commit_id":"60d3ff83cd8cb214bdc0c8c9b36c6b4f8f158c8c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"52b68f067d5ec3331d46831c94c909922d4df555","unresolved":false,"context_lines":[{"line_number":73,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":74,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":75,"context_line":"* The empty value of `requires` can be accepted, and it means no required"},{"line_number":76,"context_line":"  traits."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":79,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7f515b1d_75312b5a","line":76,"updated":"2017-09-28 08:26:41.000000000","message":"Nit: its tempting to add it does not mean pick a resource provider that has no traits.","commit_id":"60d3ff83cd8cb214bdc0c8c9b36c6b4f8f158c8c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"410d1d94ae2ca8d204aa003a8e350b262ab8a7c2","unresolved":false,"context_lines":[{"line_number":73,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":74,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":75,"context_line":"* The empty value of `requires` can be accepted, and it means no required"},{"line_number":76,"context_line":"  traits."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":79,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7f515b1d_171f94b7","line":76,"in_reply_to":"7f515b1d_75312b5a","updated":"2017-09-28 14:32:23.000000000","message":"Which raises a couple of interesting future feature possibilities:\n\n- only\u003dTHIS_TRAIT,THAT_TRAIT (exclude RPs that have any traits besides these) (mutually exclusive with `require`)\n- exclude\u003dTRAIT_ON_RP_I_WANT_TO_RESERVE_FOR_SPECIAL_VMS (exclude RPs that have this trait) (redundant with `only`)","commit_id":"60d3ff83cd8cb214bdc0c8c9b36c6b4f8f158c8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6dbcc8f68e782dffc62a0ee3dffbf7a7397a89a","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The `GET /allocation_candidates` only supports querying by quantitative aspect"},{"line_number":22,"context_line":"with `resources` query parameters. For the qualitative aspect, we need a"},{"line_number":23,"context_line":"parameter also."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_bb3f6d85","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":9},"updated":"2017-09-29 21:50:06.000000000","message":"\"required\" parameter?","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fcb5272e3db88d63410f88e22bbdef663ed73ac6","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The `GET /allocation_candidates` only supports querying by quantitative aspect"},{"line_number":22,"context_line":"with `resources` query parameters. For the qualitative aspect, we need a"},{"line_number":23,"context_line":"parameter also."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_f8d392ff","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":9},"in_reply_to":"7f515b1d_bb3f6d85","updated":"2017-10-02 15:52:14.000000000","message":"Done","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6dbcc8f68e782dffc62a0ee3dffbf7a7397a89a","unresolved":false,"context_lines":[{"line_number":33,"context_line":"Proposed change"},{"line_number":34,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Proposes to add `required` query parameter to the `GET /allocation_candidates`"},{"line_number":37,"context_line":"API. It will accept a list of traits, and the API will return a set of"},{"line_number":38,"context_line":"allocation requests, the resource providers in those allocation request have"},{"line_number":39,"context_line":"each of the traits in the parameter `required`."}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_5b48792b","line":36,"range":{"start_line":36,"start_character":17,"end_line":36,"end_character":25},"updated":"2017-09-29 21:50:06.000000000","message":"I assume there has been a lot of discussion about this already, since \u0027traits\u0027 was too generic for required vs preferred I guess? But why not call this \"required_traits\" at least so it\u0027s obvious what is required?","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"45cdbd116355d93066b38cc6a07e5857f442817d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"With nested resource providers, traits defined on a parent RP are assumed to"},{"line_number":42,"context_line":"belong to all its child (descendant) RPs. However, traits defined on a child"},{"line_number":43,"context_line":"RP do not apply to the parent (ancestor) RPs. There is no implied sharing of"},{"line_number":44,"context_line":"traits within aggregates."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_39403ea5","line":44,"updated":"2017-09-28 21:29:48.000000000","message":"Why is this relevant here? The traits don\u0027t belong to the children do they, they just happen to be present because the parent is present. You can\u0027t have the trait without the parent, right?","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d02bbcf308fe8f9d8cf10e2be13442ed5a923532","unresolved":false,"context_lines":[{"line_number":41,"context_line":"With nested resource providers, traits defined on a parent RP are assumed to"},{"line_number":42,"context_line":"belong to all its child (descendant) RPs. However, traits defined on a child"},{"line_number":43,"context_line":"RP do not apply to the parent (ancestor) RPs. There is no implied sharing of"},{"line_number":44,"context_line":"traits within aggregates."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_74f0fbfd","line":44,"in_reply_to":"7f515b1d_39403ea5","updated":"2017-09-28 22:32:12.000000000","message":"See history PS4 and PS6.  Also chatted about this in IRC: http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-09-28.log.html#t2017-09-28T21:37:43","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"45cdbd116355d93066b38cc6a07e5857f442817d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"Proposals to add `required` parameter to the `GET /allocation_candidates`. It"},{"line_number":62,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026required\u003dHW_CPU_X86_AVX,STORAGE_DISK_SSD"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `STORAGE_DISK_SSD` are"},{"line_number":67,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_1926a216","line":64,"updated":"2017-09-28 21:29:48.000000000","message":"how do we feel about this working too:\n\n    required\u003dHW_CPU_X86_AVX\u0026required\u003dSTORAGE_DISK_SSD\n\nthis query parameter parsing will handle this automatically already, so we don\u0027t really need to mention it here, I just wanted to point out that it is legit.","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d02bbcf308fe8f9d8cf10e2be13442ed5a923532","unresolved":false,"context_lines":[{"line_number":61,"context_line":"Proposals to add `required` parameter to the `GET /allocation_candidates`. It"},{"line_number":62,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026required\u003dHW_CPU_X86_AVX,STORAGE_DISK_SSD"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `STORAGE_DISK_SSD` are"},{"line_number":67,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_747b5b7a","line":64,"in_reply_to":"7f515b1d_1926a216","updated":"2017-09-28 22:32:12.000000000","message":"I would think we want the comma-or-repeated-key-ness to be the same for resources\u003d as for required\u003d, nah?  And it\u0027s too late to change it for resources\u003d?\n\nAlso want to point out how it\u0027s going to extend when we do the \"grouping\" business.  As written:\n\n resources1\u003dVCPU:8,MEMORY_MB:1024\u0026resources2\u003dVF:1\u0026required2\u003dPHYSNET_A,SWITCH_1\u0026resources3\u003dVF:1\u0026required3\u003dPHYSNET_B,SWITCH_2\n\n...versus your suggestion (not sure if `resources1` would split or not, but...):\n\n resources1\u003dVCPU:8\u0026resources1\u003dMEMORY_MB:1024\u0026resources2\u003dVF:1\u0026required2\u003dPHYSNET_A\u0026required2\u003dSWITCH_1\u0026resources3\u003dVF:1\u0026required3\u003dPHYSNET_B\u0026required3\u003dSWITCH_2","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"623995e9211cb50fd2b778bf559eba101a733df3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"Proposals to add `required` parameter to the `GET /allocation_candidates`. It"},{"line_number":62,"context_line":"accepts a list of traits separated by `,`. For example::"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    GET /allocation_candidates?resources\u003dVCPU:8,MEMORY_MB:1024,DISK_GB:4096\u0026required\u003dHW_CPU_X86_AVX,STORAGE_DISK_SSD"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"In the above request, the traits `HW_CPU_X86_AVX` and `STORAGE_DISK_SSD` are"},{"line_number":67,"context_line":"required."}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_c53c9130","line":64,"in_reply_to":"7f515b1d_747b5b7a","updated":"2017-09-29 09:16:33.000000000","message":"I think we said move to JSON when we hit the more complicated cases. For now, while it can be simple, leave it simple. I am happy with that.\n\nGood point on the repeated key, seems legit to support both. We could tighten that up in a follow on patch.","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6dbcc8f68e782dffc62a0ee3dffbf7a7397a89a","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The validation for the `required` are:"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":72,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_5bf639d9","line":72,"range":{"start_line":71,"start_character":2,"end_line":72,"end_character":62},"updated":"2017-09-29 21:50:06.000000000","message":"Is it just me or is calling a parameter itself \"required\" really confusing? \"Is the \u0027required\u0027 parameter required? No, it\u0027s optional. OK?\".","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"28f267ba9e7f3fc850805c5aeb659bb2827243c4","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The validation for the `required` are:"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"* The `required` is optional, but `resources` is required parameter. So the"},{"line_number":72,"context_line":"  `required` should be specified with specifiying `resources`."},{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_7b2a15db","line":72,"range":{"start_line":71,"start_character":2,"end_line":72,"end_character":62},"in_reply_to":"7f515b1d_5bf639d9","updated":"2017-09-29 21:57:48.000000000","message":"No, I don\u0027t think it\u0027s confusing. There\u0027s lots of precedence of naming parameters \"required\". I personally think required_traits is overly verbose. But whatever, I\u0027m so over bike-shedding on this. :(","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6dbcc8f68e782dffc62a0ee3dffbf7a7397a89a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":76,"context_line":"* The empty value of `required` can be accepted, and it means no specific trait"},{"line_number":77,"context_line":"  is required for resource provider, the filtering will only consider the"},{"line_number":78,"context_line":"  quantitative resources and nothing about the qualitative part."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":81,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_9b295138","line":78,"range":{"start_line":76,"start_character":2,"end_line":78,"end_character":64},"updated":"2017-09-29 21:50:06.000000000","message":"This still seems weird to me. What happens if I call nova with:\n\nGET /servers/detail?status\u003d\n\n? Do I get all servers regardless of vm_state, or None, or an error.","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9d9621c7c97627ac3e52ecb61289e50dbc5924b6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":76,"context_line":"* The empty value of `required` can be accepted, and it means no specific trait"},{"line_number":77,"context_line":"  is required for resource provider, the filtering will only consider the"},{"line_number":78,"context_line":"  quantitative resources and nothing about the qualitative part."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":81,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_87532b6b","line":78,"range":{"start_line":76,"start_character":2,"end_line":78,"end_character":64},"in_reply_to":"7f515b1d_4cbf9aa9","updated":"2017-09-30 17:35:40.000000000","message":"IMO it\u0027s:\n\nc) Give me something that has all of the traits I list (non-exclusively).\n\nIOW (pseudo-sql):\n\n required \u003d qparams.get(\u0027required\u0027, \u0027\u0027).split(\u0027,\u0027)\n\n SELECT {whatever} FROM resource_providers AS rp\n    WHERE {inventory available} AND\n    ALL(r IN rp.traits FOR r IN $required)\n\nIf $required is empty, that ALL() is TRUE.  This saves us having to do the if/else described above, as well as the extra condition to error if the qparam is present-but-empty.\n\nBTW, I don\u0027t think it\u0027s valid to compare this to `/servers/detail?status`.  Does that guy accept a list?  I couldn\u0027t make it do so, at least not with commas.  And even if it did, the semantic there is clearly, \"give me servers with *any* of these statuses,\" since status is a single value on a server.  Versus \"give me resource providers with *all* of these traits.\"","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fcb5272e3db88d63410f88e22bbdef663ed73ac6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":76,"context_line":"* The empty value of `required` can be accepted, and it means no specific trait"},{"line_number":77,"context_line":"  is required for resource provider, the filtering will only consider the"},{"line_number":78,"context_line":"  quantitative resources and nothing about the qualitative part."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":81,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_1820aef6","line":78,"range":{"start_line":76,"start_character":2,"end_line":78,"end_character":64},"in_reply_to":"7f515b1d_87532b6b","updated":"2017-10-02 15:52:14.000000000","message":"Based on the scheduler meeting, we\u0027ve decided to disallow empty required as its too ambiguous.","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"28f267ba9e7f3fc850805c5aeb659bb2827243c4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":76,"context_line":"* The empty value of `required` can be accepted, and it means no specific trait"},{"line_number":77,"context_line":"  is required for resource provider, the filtering will only consider the"},{"line_number":78,"context_line":"  quantitative resources and nothing about the qualitative part."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":81,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_fb2de5fd","line":78,"range":{"start_line":76,"start_character":2,"end_line":78,"end_character":64},"in_reply_to":"7f515b1d_9b295138","updated":"2017-09-29 21:57:48.000000000","message":"Agree with you. I\u0027d just as soon return an error if required is empty but present.","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"720db530910478211b28f54696d261c14549a0a2","unresolved":false,"context_lines":[{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":76,"context_line":"* The empty value of `required` can be accepted, and it means no specific trait"},{"line_number":77,"context_line":"  is required for resource provider, the filtering will only consider the"},{"line_number":78,"context_line":"  quantitative resources and nothing about the qualitative part."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":81,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_4cbf9aa9","line":78,"range":{"start_line":76,"start_character":2,"end_line":78,"end_character":64},"in_reply_to":"7f515b1d_bb6bedee","updated":"2017-09-30 15:41:36.000000000","message":"\u003e So what the compute API does would be different from what this API does, and I don\u0027t think those should be different - especially since I think it\u0027s just weird to allow \"?required\u003d\".\n\nSorry, this was probably a confusing statement. If we made the behavior the same, that would mean passing \"?required\u003d\" would be interpreted as I want allocation candidates on resource providers that explicitly do not have any traits, which is weird.\n\nI assume the ?required\u003d thing is simpler from an implementation perspective because the code will be doing something like:\n\n  if required:\n    build_traits_join_query + regular_alloc_candidates_query\n  else:\n    regular_alloc_candidates_query\n\nIt still seems weird to allow ?required\u003d but ignore it. I think we should either:\n\na) fail if required is specified without a value or\nb) honor it as \"I want something without any traits\"\n\nI don\u0027t see how (b) makes any sense so I\u0027m inclined to think (a) is the correct behavior we should model in the API.","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5cfcd5ad04ab87a3da47b06bcf15ba93ab2873e3","unresolved":false,"context_lines":[{"line_number":73,"context_line":"* Any invalid traits in the `required` parameters will result in a"},{"line_number":74,"context_line":"  `HTTPBadRequest 400`. Invalid trait means the trait isn\u0027t in the `os-traits`"},{"line_number":75,"context_line":"  library and also isn\u0027t a custom trait defined by traits API."},{"line_number":76,"context_line":"* The empty value of `required` can be accepted, and it means no specific trait"},{"line_number":77,"context_line":"  is required for resource provider, the filtering will only consider the"},{"line_number":78,"context_line":"  quantitative resources and nothing about the qualitative part."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"The API will return a set of allocation requests, each allocation request is"},{"line_number":81,"context_line":"a combination of root resource provider, nested resource providers and shared"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_bb6bedee","line":78,"range":{"start_line":76,"start_character":2,"end_line":78,"end_character":64},"in_reply_to":"7f515b1d_fb2de5fd","updated":"2017-09-29 22:24:36.000000000","message":"Playing with the compute API, apparently this isn\u0027t an error:\n\n2017-09-29 18:20:35,920 INFO [nova.api.openstack.requestlog] 127.0.0.1 \"GET /v2/6f70656e737461636b20342065766572/servers/detail?status\u003d\" status: 200 len: 15 microversion: 2.1 time: 0.019426\n\nHowever, what it does is apply status\u003d\u0027\u0027 as the filter, which means you don\u0027t get anything back, as there are no instances w/o a vm_state.\n\nSo what the compute API does would be different from what this API does, and I don\u0027t think those should be different - especially since I think it\u0027s just weird to allow \"?required\u003d\".","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"45cdbd116355d93066b38cc6a07e5857f442817d","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":177,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":178,"context_line":"in the main SQL. It will be slow than single SQL, but it is acceptable."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"Other deployer impact"},{"line_number":181,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_19546252","line":178,"range":{"start_line":178,"start_character":28,"end_line":178,"end_character":32},"updated":"2017-09-28 21:29:48.000000000","message":"slower","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fcb5272e3db88d63410f88e22bbdef663ed73ac6","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"In the implementation, there will be a separate SQL to query the resource"},{"line_number":177,"context_line":"providers which have required traits. Then filter those resource providers"},{"line_number":178,"context_line":"in the main SQL. It will be slow than single SQL, but it is acceptable."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"Other deployer impact"},{"line_number":181,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_18754efa","line":178,"range":{"start_line":178,"start_character":28,"end_line":178,"end_character":32},"in_reply_to":"7f515b1d_19546252","updated":"2017-10-02 15:52:14.000000000","message":"Done","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6dbcc8f68e782dffc62a0ee3dffbf7a7397a89a","unresolved":false,"context_lines":[{"line_number":205,"context_line":"* Add a common method to query the resource providers which have required"},{"line_number":206,"context_line":"  traits."},{"line_number":207,"context_line":"* Integrate the common query method into the main query."},{"line_number":208,"context_line":"* fill the traits into the AllocationCandidates object."},{"line_number":209,"context_line":"* Expose the `required` in the `GET /allocation_candidates` API with new"},{"line_number":210,"context_line":"  microversion."},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_3beffde9","line":208,"range":{"start_line":208,"start_character":27,"end_line":208,"end_character":47},"updated":"2017-09-29 21:50:06.000000000","message":"well, via the ProviderSummaries object, but OK","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fcb5272e3db88d63410f88e22bbdef663ed73ac6","unresolved":false,"context_lines":[{"line_number":205,"context_line":"* Add a common method to query the resource providers which have required"},{"line_number":206,"context_line":"  traits."},{"line_number":207,"context_line":"* Integrate the common query method into the main query."},{"line_number":208,"context_line":"* fill the traits into the AllocationCandidates object."},{"line_number":209,"context_line":"* Expose the `required` in the `GET /allocation_candidates` API with new"},{"line_number":210,"context_line":"  microversion."},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_d864564c","line":208,"range":{"start_line":208,"start_character":27,"end_line":208,"end_character":47},"in_reply_to":"7f515b1d_3beffde9","updated":"2017-10-02 15:52:14.000000000","message":"Done","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"45cdbd116355d93066b38cc6a07e5857f442817d","unresolved":false,"context_lines":[{"line_number":206,"context_line":"  traits."},{"line_number":207,"context_line":"* Integrate the common query method into the main query."},{"line_number":208,"context_line":"* fill the traits into the AllocationCandidates object."},{"line_number":209,"context_line":"* Expose the `required` in the `GET /allocation_candidates` API with new"},{"line_number":210,"context_line":"  microversion."},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_f94ce6c8","line":209,"range":{"start_line":209,"start_character":24,"end_line":209,"end_character":26},"updated":"2017-09-28 21:29:48.000000000","message":"parameter in","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fcb5272e3db88d63410f88e22bbdef663ed73ac6","unresolved":false,"context_lines":[{"line_number":206,"context_line":"  traits."},{"line_number":207,"context_line":"* Integrate the common query method into the main query."},{"line_number":208,"context_line":"* fill the traits into the AllocationCandidates object."},{"line_number":209,"context_line":"* Expose the `required` in the `GET /allocation_candidates` API with new"},{"line_number":210,"context_line":"  microversion."},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f515b1d_f84832b3","line":209,"range":{"start_line":209,"start_character":24,"end_line":209,"end_character":26},"in_reply_to":"7f515b1d_f94ce6c8","updated":"2017-10-02 15:52:14.000000000","message":"Done","commit_id":"3076b22ce4aa949aa6fe543da7b690aca30ddbf4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d5a20850f16d161ff8fcb4f62ff376e745feabb6","unresolved":false,"context_lines":[{"line_number":41,"context_line":"With nested resource providers, traits defined on a parent RP are assumed to"},{"line_number":42,"context_line":"belong to all its child (descendant) RPs. However, traits defined on a child"},{"line_number":43,"context_line":"RP do not apply to the parent (ancestor) RPs. There is no implied sharing of"},{"line_number":44,"context_line":"traits within aggregates."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_e98611bb","line":44,"updated":"2017-10-03 13:59:28.000000000","message":"Thanks for clarifying that.\nSo, say I\u0027d like a specific trait that only one PF has (in a SR-IOV world), I wouldn\u0027t get the corresponding compute service, even if I only need 1 VF ?","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a3062c8f5f6c963c9e603060e8d4698bcd8d26e4","unresolved":false,"context_lines":[{"line_number":41,"context_line":"With nested resource providers, traits defined on a parent RP are assumed to"},{"line_number":42,"context_line":"belong to all its child (descendant) RPs. However, traits defined on a child"},{"line_number":43,"context_line":"RP do not apply to the parent (ancestor) RPs. There is no implied sharing of"},{"line_number":44,"context_line":"traits within aggregates."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_0f5dede8","line":44,"in_reply_to":"7f515b1d_2f07891b","updated":"2017-10-03 14:58:34.000000000","message":"All good with me, let\u0027s defer that discussion for later anyway.","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9759dcadf469b9e6733515a79302ea77c502a0fe","unresolved":false,"context_lines":[{"line_number":41,"context_line":"With nested resource providers, traits defined on a parent RP are assumed to"},{"line_number":42,"context_line":"belong to all its child (descendant) RPs. However, traits defined on a child"},{"line_number":43,"context_line":"RP do not apply to the parent (ancestor) RPs. There is no implied sharing of"},{"line_number":44,"context_line":"traits within aggregates."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_2f07891b","line":44,"in_reply_to":"7f515b1d_8cfd6bb3","updated":"2017-10-03 14:43:57.000000000","message":"I think you may be talking about one (or more) of the scenarios that Eric and I have been brainstorming about here:\n\nhttps://etherpad.openstack.org/p/nova-multi-alloc-request-syntax-brainstorm\n\nThese are all good scenarios but require a number of changes that are out of scope for this (basic) proposal.\n\nI agree the wording above \"However, traits defined on a child\nRP do not apply to the parent (ancestor) RPs.\" is a little misleading. While it\u0027s true that the direct parent doesn\u0027t \"have\" the traits of its children, the tree of providers represented by the root_provider_id has a collection of traits made up of all traits of all nodes in the tree. We first will do a query that gets all the root_provider_ids representing trees that have any of the traits being requested:\n\n SELECT rp.root_provider_id FROM resource_providers AS rp\n JOIN resource_provider_traits AS rpt\n ON rp.id \u003d rpt.resource_provider_id\n AND rpt.trait_id IN ($required_traits)\n GROUP BY rp.root_provider_id\n\nThis will give us the selection of provider trees that we can then analyze whether different trait requirements are met. See the related discussion on shared providers and traits I\u0027m having here:\n\nhttps://review.openstack.org/#/c/489206/","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"bf9e9363acb83c2eb1b43b765a928f3789ca9820","unresolved":false,"context_lines":[{"line_number":41,"context_line":"With nested resource providers, traits defined on a parent RP are assumed to"},{"line_number":42,"context_line":"belong to all its child (descendant) RPs. However, traits defined on a child"},{"line_number":43,"context_line":"RP do not apply to the parent (ancestor) RPs. There is no implied sharing of"},{"line_number":44,"context_line":"traits within aggregates."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_8cfd6bb3","line":44,"in_reply_to":"7f515b1d_a92c99ac","updated":"2017-10-03 14:14:50.000000000","message":"I totally understand your point when you have one PF.\nNow, say you have a node that is having *two* physical functions. We would then have a root Resource Provider (the node) and two children Resource Providers (both PFs).\nSay only one of those two PFs is only having HW_NIC_OFFLOAD_TSO, then if I\u0027m asking for :\n\n  {\n    \u0027resources\u0027: {\n         \u0027SRIOV_NET_VF\u0027: 1\n    },\n    \u0027required\u0027: [\n         \u0027HW_NIC_OFFLOAD_TSO\u0027\n    ]\n  }\n\n, should I get the node as an allocation candidate ?","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"564296b28fe6c19e6a3adbc283c72bfabd79f482","unresolved":false,"context_lines":[{"line_number":41,"context_line":"With nested resource providers, traits defined on a parent RP are assumed to"},{"line_number":42,"context_line":"belong to all its child (descendant) RPs. However, traits defined on a child"},{"line_number":43,"context_line":"RP do not apply to the parent (ancestor) RPs. There is no implied sharing of"},{"line_number":44,"context_line":"traits within aggregates."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_a92c99ac","line":44,"in_reply_to":"7f515b1d_e98611bb","updated":"2017-10-03 14:03:56.000000000","message":"The PF is the resource provider. The PF would have an inventory of, say, 8 SRIOV_NET_VF. The PF would also be tagged with a particular capability, say HW_NIC_OFFLOAD_TSO. If the request comes in for:\n\n {\n    \u0027resources\u0027: {\n         \u0027SRIOV_NET_VF\u0027: 1\n    },\n    \u0027required\u0027: [\n         \u0027HW_NIC_OFFLOAD_TSO\u0027\n    ]\n }\n\nthen that compute node would be returned in the list of allocation candidates.\n\nHowever, if the request came in like this:\n\n\n {\n    \u0027resources\u0027: {\n         \u0027SRIOV_NET_VF\u0027: 1\n    },\n    \u0027required\u0027: [\n         \u0027HW_NIC_OFFLOAD_GRO\u0027\n    ]\n }\n\nthen that compute node would not be in the allocation candidates (because it doesn\u0027t have the required trait)","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d5a20850f16d161ff8fcb4f62ff376e745feabb6","unresolved":false,"context_lines":[{"line_number":46,"context_line":"Alternatives"},{"line_number":47,"context_line":"------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"There also a proposal about `preferred_traits` parameter, it means nice to"},{"line_number":50,"context_line":"have a list of traits. But there still haven\u0027t clear use-case for it, so it"},{"line_number":51,"context_line":"isn\u0027t in the proposal."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"7f515b1d_c9feb537","line":49,"range":{"start_line":49,"start_character":29,"end_line":49,"end_character":45},"updated":"2017-10-03 13:59:28.000000000","message":"nit: I\u0027d prefer to have it named preferred\u003d but meh ;)","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7cc8306cfe5d432f2a41cbfa2170472f2c46c139","unresolved":false,"context_lines":[{"line_number":80,"context_line":"a combination of root resource provider, nested resource providers and shared"},{"line_number":81,"context_line":"resource providers. The required traits may spread in those resource providers."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"For example, the compute node resource provider might have the `HW_CPU_X86_AVX`"},{"line_number":84,"context_line":"trait but not the `STORAGE_DISK_SSD` trait. That trait may be associated with"},{"line_number":85,"context_line":"the shared storage provider that is providing the DISK_GB resources for the"},{"line_number":86,"context_line":"request. For the above request, the API will return an allocation request"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f4e5783_663df5db","line":83,"updated":"2017-10-16 18:32:55.000000000","message":"Yeah - this stops working with nested.\n\nOr at least requires some more explanation to describe *how* it\u0027s supposed to work.\n\nWe talked about trait \"propagation\" in a previous revision [1].  Based on that discussion, if we\u0027re *just* talking about NRP, you need to get inventory from RPs with the requested traits *on* or *above* that RP - but in particular *not* from any RP in the whole tree (e.g. sibling/cousin RPs) or descendants (this one would be a weird model).\n\nWith aggregates, I don\u0027t even know how it should work.  I\u0027m thinking we may want to require the inventory \u0026 traits for the shared resource to be specified in a numbered request group per [2].  Otherwise I don\u0027t see how we could possibly ensure that the right traits are getting satisfied by the shared RP.\n\n[1] https://review.openstack.org/#/c/497713/6/specs/queens/approved/add-trait-support-in-allocation-candidates.rst@42\n[2] https://review.openstack.org/#/c/510244/","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"234f96728e61f8bc90a2e38e5110829913be4ce4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"a combination of root resource provider, nested resource providers and shared"},{"line_number":81,"context_line":"resource providers. The required traits may spread in those resource providers."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"For example, the compute node resource provider might have the `HW_CPU_X86_AVX`"},{"line_number":84,"context_line":"trait but not the `STORAGE_DISK_SSD` trait. That trait may be associated with"},{"line_number":85,"context_line":"the shared storage provider that is providing the DISK_GB resources for the"},{"line_number":86,"context_line":"request. For the above request, the API will return an allocation request"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f4e5783_6b3488fc","line":83,"in_reply_to":"5f4e5783_376600c3","updated":"2017-10-17 12:39:06.000000000","message":"Here\u0027s the counterexample we talked through yesterday [1].  This isn\u0027t a bug in the code - it\u0027s a limitation of the current design.  There\u0027s just no way to express the scenario properly without adding some new semantic like the numbered groupings.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-10-16.log.html#t2017-10-16T19:29:56","commit_id":"093739250f110a615682a7c10def882d129a07dc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2f73c2f009065b07eed12a3fad3538ef695dc3c3","unresolved":false,"context_lines":[{"line_number":80,"context_line":"a combination of root resource provider, nested resource providers and shared"},{"line_number":81,"context_line":"resource providers. The required traits may spread in those resource providers."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"For example, the compute node resource provider might have the `HW_CPU_X86_AVX`"},{"line_number":84,"context_line":"trait but not the `STORAGE_DISK_SSD` trait. That trait may be associated with"},{"line_number":85,"context_line":"the shared storage provider that is providing the DISK_GB resources for the"},{"line_number":86,"context_line":"request. For the above request, the API will return an allocation request"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f4e5783_376600c3","line":83,"in_reply_to":"5f4e5783_663df5db","updated":"2017-10-17 05:42:39.000000000","message":"@Eric, do you have anyspecific example which doesn\u0027t work with nested?\n\nI thought the nested RP and shared RP should be work with the non-numbered request. People will use the numbered request for some specific use-cases which are described in your spec.\n\n\nFor example: \"?resources\u003dVCPU:1,SRIOV_VF\u003d1\u0026required\u003dCUSTOM_NET1\". This is a case for nested RP, but it works with non-numbered request.\n\nAnother example for shared, \"?resources\u003dVCPU:1,DISK_GB\u003d10\u0026required\u003dHW_STROAGE_SSD\". This works with non-numbered request also.","commit_id":"093739250f110a615682a7c10def882d129a07dc"}]}
