)]}'
{"specs/rocky/approved/glance-image-traits.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7faa17664a9249f515a49ef7a232eafcf6ec98bf","unresolved":false,"context_lines":[{"line_number":91,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":92,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"For the above issue, the scheduler can request traits of current host and try"},{"line_number":95,"context_line":"to match those traits with the traits specifid in the image."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Based on the `ironic driver traits spec`_ implemented we need to send image"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_4ce306d9","line":94,"updated":"2018-04-12 17:48:21.000000000","message":"Sure...but how do we not re-introduce bug 1750623 if we\u0027re going to have the scheduler call GET /allocation_candidates which currently requires that resources are passed in?\n\nhttps://developer.openstack.org/api-ref/placement/#list-allocation-candidates\n\nMaybe it\u0027s possible to fake out the allocation request such that we request 0 resources, e.g.:\n\n  resources\u003dVCPU:0\n\nThat might work...\n\nAnother issue, however, is that if we have a large cloud with let\u0027s say 10,000 compute hosts (and compute node resource providers), the scheduler by default only requests a limit of 1000 per the [scheduler]/max_placement_results config option, so it could be possible that the host (compute node resource provider) we care about is not in the response. Then how do we deal with that? Maybe we need to add the same \"in_tree\" filter paramter to GET /allocation_candidates as we have in GET /resource_providers:\n\nhttps://developer.openstack.org/api-ref/placement/#list-resource-providers\n\nSo there are at least two distinct issues that this spec should be covering with regard to rebuilding a server with a new image that has different traits in it from the original image. I suggest documenting the rebase-specific issues in a new subsection of \"Proposed change\" in this doc.","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e5620e42d8760f01d08d9e3e4f58560d48fc2f4a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":92,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"For the above issue, the scheduler can request traits of current host and try"},{"line_number":95,"context_line":"to match those traits with the traits specifid in the image."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Based on the `ironic driver traits spec`_ implemented we need to send image"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_8cc7de12","line":94,"in_reply_to":"bf659307_4ce306d9","updated":"2018-04-12 17:51:32.000000000","message":"\u003e I suggest documenting the rebase-specific issues in a new subsection of \"Proposed change\" in this doc.\n\nFor example:\n\n**Dealing with rebase**\n\nIn case of rebuild with new...\n\nor\n\nDealing with rebase\n~~~~~~~~~~~~~~~~~~~\nIn case of rebuild with new...\n\nSomething like that.","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e83eb6133caf595383ad5abb21eb36b0fa4f7cfc","unresolved":false,"context_lines":[{"line_number":91,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":92,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"For the above issue, the scheduler can request traits of current host and try"},{"line_number":95,"context_line":"to match those traits with the traits specifid in the image."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Based on the `ironic driver traits spec`_ implemented we need to send image"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_88525566","line":94,"in_reply_to":"bf659307_6c6e0a01","updated":"2018-04-13 10:00:55.000000000","message":"I\u0027m clearly in favor of having the \u0027resources\u0027 parameter optional, rather than asking for *zero* resources for a specific class.","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3348cb8d8b48ad2d15e0258698a9e91c505191e5","unresolved":false,"context_lines":[{"line_number":91,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":92,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"For the above issue, the scheduler can request traits of current host and try"},{"line_number":95,"context_line":"to match those traits with the traits specifid in the image."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Based on the `ironic driver traits spec`_ implemented we need to send image"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_6c6e0a01","line":94,"in_reply_to":"bf659307_8cc7de12","updated":"2018-04-12 17:55:26.000000000","message":"(12:52:06 PM) mriedem: if we can request resources\u003dVCPU:0 and in_tree\u003d\u003ccompute node uuid\u003e then i think we\u0027d be ok\n(12:53:11 PM) efried: mriedem: I think jaypipes wanted to deal with that by using the GET /resource_providers API instead of GET /a_c.  (I disagreed; I think ?in_tree in GET /a_c is a fine idea)\n(12:53:34 PM) dansmith: but asking for zero resources seems weird\n(12:53:38 PM) mriedem: actually if we added in_tree to GET /allocation_candidates, just make resources optional in the same microversion\n(12:54:04 PM) mriedem: so GET /allocation_candidates?in_tree\u003d1234\u0026required\u003dCUSTOM_NEW_IMAGE_TRAIT","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02a72071a4eb9c8b8c08c0a4895240dcd43a47c7","unresolved":false,"context_lines":[{"line_number":91,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":92,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"For the above issue, the scheduler can request traits of current host and try"},{"line_number":95,"context_line":"to match those traits with the traits specifid in the image."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Based on the `ironic driver traits spec`_ implemented we need to send image"},{"line_number":98,"context_line":"traits to ironic similar to how we are sending `extra_specs` traits to ironic."}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_676e2301","line":95,"range":{"start_line":94,"start_character":0,"end_line":95,"end_character":60},"updated":"2018-04-12 18:27:25.000000000","message":"If this is just saying, for rebuild, we won\u0027t call GET /allocation_candidates but instead just call:\n\nhttps://developer.openstack.org/api-ref/placement/#list-resource-provider-traits\n\nFor the targeted host, and compare the traits, then I\u0027m OK with that and then the alternative below makes more sense.","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7faa17664a9249f515a49ef7a232eafcf6ec98bf","unresolved":false,"context_lines":[{"line_number":92,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"For the above issue, the scheduler can request traits of current host and try"},{"line_number":95,"context_line":"to match those traits with the traits specifid in the image."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Based on the `ironic driver traits spec`_ implemented we need to send image"},{"line_number":98,"context_line":"traits to ironic similar to how we are sending `extra_specs` traits to ironic."}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_4c246660","line":95,"range":{"start_line":95,"start_character":38,"end_line":95,"end_character":46},"updated":"2018-04-12 17:48:21.000000000","message":"specified","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e83eb6133caf595383ad5abb21eb36b0fa4f7cfc","unresolved":false,"context_lines":[{"line_number":91,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":92,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"For the above issue, the scheduler can request traits of current host and try"},{"line_number":95,"context_line":"to match those traits with the traits specifid in the image."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Based on the `ironic driver traits spec`_ implemented we need to send image"},{"line_number":98,"context_line":"traits to ironic similar to how we are sending `extra_specs` traits to ironic."}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_e8f1916c","line":95,"range":{"start_line":94,"start_character":0,"end_line":95,"end_character":60},"in_reply_to":"bf659307_676e2301","updated":"2018-04-13 10:00:55.000000000","message":"Are we saying that nova-scheduler would make different calls to Placement based on the operation type ? (boot vs. rebuild ) ? I\u0027m very not happy with that, you know.","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7faa17664a9249f515a49ef7a232eafcf6ec98bf","unresolved":false,"context_lines":[{"line_number":129,"context_line":"aggregates to be pre-created with duplicated standard traits which is not"},{"line_number":130,"context_line":"ideal."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Alternative for rebuild issue"},{"line_number":133,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"see `rebuild shouldn\u0027t check with placement`_"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"We can make a allocation request to placement without resources and only traits"},{"line_number":138,"context_line":"and make sure the host list returned contains the host we are currently doing a"},{"line_number":139,"context_line":"rebuild of. This would require a API change as currently resources are"},{"line_number":140,"context_line":"required."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Data model impact"},{"line_number":143,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_4c31c658","line":140,"range":{"start_line":132,"start_character":0,"end_line":140,"end_character":9},"updated":"2018-04-12 17:48:21.000000000","message":"I would just remove this. This alternative isn\u0027t an alternative to a viable solution described above for handling the rebase case.\n\nA more logical solution, albiet not a good one, would be to say that for rebuild with a new image, we won\u0027t filter that image in placement even if it has new traits. That\u0027s not a good alternative since it would re-introduce CVE-2017-16239.","commit_id":"bc7cdda9d99ac3dde1b3559598db76173e8469ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e83eb6133caf595383ad5abb21eb36b0fa4f7cfc","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_c8b84d76","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"updated":"2018-04-13 10:00:55.000000000","message":"So the scheduler would special-case the rebuild action, and instead of asking for allocation candidates, it would just ask for resource providers ?\n\nIf so, how the scheduler would get allocation candidates for claiming an instance ?","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77227798d0031b1cabe087fe0ae80321bc2c8ced","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_9d660aed","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"updated":"2018-04-13 15:43:10.000000000","message":"This is probably me just not knowing the rebuild path well enough, but for the rebuild-to-same-host scenario, why does the scheduler need to be involved at all? Couldn\u0027t the conductor handle this call to GET /resource_providers/{uuid}/traits for its \"pre flight check\"?","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d0b3cc70b24f4374e91374f92dd0a51861681a1","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f6a8fd7_704b88af","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"in_reply_to":"9f6a8fd7_4446dd7e","updated":"2018-04-19 14:51:03.000000000","message":"\u003e I prefer to just reject such kind of request in the API layer. If the user want to change another image with different set of traits, the user should create a new instance.\n\nThat\u0027s the easy way, but the user experience for that isn\u0027t great, because consider that the operator creates the images, users can\u0027t upload their own. If some images have traits in the properties but others don\u0027t, the user can rebuild with some images but not others, which is weird.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03fd9036ffc16e7ad075ad837fcaace3ce337c14","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f6a8fd7_c741780d","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"in_reply_to":"9f6a8fd7_704b88af","updated":"2018-04-19 16:51:06.000000000","message":"\u003e \u003e I prefer to just reject such kind of request in the API layer. If\n \u003e the user want to change another image with different set of traits,\n \u003e the user should create a new instance.\n \u003e \n \u003e That\u0027s the easy way, but the user experience for that isn\u0027t great,\n \u003e because consider that the operator creates the images, users can\u0027t\n \u003e upload their own. If some images have traits in the properties but\n \u003e others don\u0027t, the user can rebuild with some images but not others,\n \u003e which is weird.\n\nWe could return an error to the user saying the image traits have changed since original boot, therefore instead of rebuilding the instance, you should create a new instance with the same image.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"2e78e1bc67d78b184bad3f76454f0781832ebd30","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f6a8fd7_a59260f5","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"in_reply_to":"9f6a8fd7_8b22d8a3","updated":"2018-04-18 15:15:44.000000000","message":"good point alex. I am not too familiar with nested resource providers, so will let others comment on it.\n\ni think rather than denying the image change, going through with the placement call might be a better experience.\n\nBasically, in case of rebuild where image traits have changed, we go through placement. In other cases, we go through the regular flow. does that make sense?\n\nI will update the spec with this approach.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ed162432cc14c750d70ce007abadda109518510d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f6a8fd7_4446dd7e","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"in_reply_to":"9f6a8fd7_a59260f5","updated":"2018-04-18 22:54:09.000000000","message":"I prefer to just reject such kind of request in the API layer. If the user want to change another image with different set of traits, the user should create a new instance.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"29e64b0b0abd6e2da31c60ec30cb73bb49d95240","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_eed3ce5e","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"in_reply_to":"bf659307_9d660aed","updated":"2018-04-13 17:55:24.000000000","message":"this was my question as well. But the filters are needed to be re-run in case of rebuild, hence scheduler gets involved.\n\nSee\nhttps://review.openstack.org/#/c/546357/","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"29e64b0b0abd6e2da31c60ec30cb73bb49d95240","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_aef076fe","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"in_reply_to":"bf659307_c8b84d76","updated":"2018-04-13 17:55:24.000000000","message":"since its a rebuild, my understanding is the resources are already claimed so we dont need to claim anything more.\n\nWe just need to make sure the image traits and RP traits still match.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"41f3a2abe5c741ecf6a68470b67420738627ec19","unresolved":false,"context_lines":[{"line_number":96,"context_line":"in-case the compute is close to full as the current host will be excluded. This"},{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"To solve the issue, the scheduler can request traits of current host using the"},{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f6a8fd7_8b22d8a3","line":99,"range":{"start_line":99,"start_character":20,"end_line":99,"end_character":33},"in_reply_to":"bf659307_eed3ce5e","updated":"2018-04-18 07:40:19.000000000","message":"This isn\u0027t enough just check whether traits attached to the compute node\u0027s resource provider. \n\nThe traits maybe attach to a nested resource provider under the compute node.\n\nAlso, think about the case, the instance is running on a host which  has two SRIOV nic. One is normal SRIOV nic, another one with some kind of offload feature. \n\nSo, the original request is:\nresources\u003dSRIOV_VF:1\nThe instance gets a VF from the normal SRIOV nic.\n\nBut with the new image, the new request is:\nresources\u003dSRIOV_VF:1\ntraits\u003dHW_NIC_OFFLOAD_XX\nAfter we bypass the scheduler, we can\u0027t ensure we allocated VF from another SRIOV PF.\n\nSo I\u0027m thinking we can just deny if the user change an new image, and the new image includes different traits with original image.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e83eb6133caf595383ad5abb21eb36b0fa4f7cfc","unresolved":false,"context_lines":[{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":104,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":105,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_e84d119a","line":104,"range":{"start_line":103,"start_character":0,"end_line":104,"end_character":15},"updated":"2018-04-13 10:00:55.000000000","message":"Oh gosh, that looks like another layer of confusion we would introduce, exactly like what we have with \u0027forced\u0027 host/node.\n\nCouldn\u0027t we rather design a better interface for the scheduler that wouldn\u0027t make an allocation, but just verifying a resource, if that helps ?\nI\u0027m not saying to add a new API method, but maybe considering a general scheduler case, rather than trying to add yet another conditional in the scheduler...","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"29e64b0b0abd6e2da31c60ec30cb73bb49d95240","unresolved":false,"context_lines":[{"line_number":100,"context_line":"existing `GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":101,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":104,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":105,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_ce5a8af0","line":104,"range":{"start_line":103,"start_character":0,"end_line":104,"end_character":15},"in_reply_to":"bf659307_e84d119a","updated":"2018-04-13 17:55:24.000000000","message":"We already have(or planning to have) the conditional. \n\nSee https://review.openstack.org/#/c/546357/\n\nAll we will be changing is instead of making an allocation candidate call, we would be making `GET /resource_providers/{hostUUID}/traits` call.\n\nWe can wrap this logic into a different method in the scheduler and we can hash that out in the code review.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e83eb6133caf595383ad5abb21eb36b0fa4f7cfc","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":104,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":105,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Alternatives"},{"line_number":108,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_a811595f","line":105,"updated":"2018-04-13 10:00:55.000000000","message":"TBC, let me reinforce something : I\u0027m very not happy with the idea that the scheduler should differenciate between a rebuild and other move operations (or even a boot).\n\nA rebuild is asking the scheduler to verify its host. Why couldn\u0027t we assume that it would be exactly like any other move operation (hence a Migration object) so the scheduler would claim the instance against that Migration object ?","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"29e64b0b0abd6e2da31c60ec30cb73bb49d95240","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":104,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":105,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Alternatives"},{"line_number":108,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_ee2f4e3c","line":105,"in_reply_to":"bf659307_a811595f","updated":"2018-04-13 17:55:24.000000000","message":"Again see See https://review.openstack.org/#/c/546357/\n\nwe have that differentiation logic already.\n\nYou are suggesting creating a migration object which specifies the same host as the destination? \n\nEven in the above case there has to be logic somewhere which understands the uniqueness of the situation. Any suggestions on where this logic will reside?","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f97df6ae4ba6b1954865946582d7dde41a0b322","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":104,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":105,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"Alternatives"},{"line_number":108,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9f6a8fd7_49e7d6e5","line":105,"in_reply_to":"bf659307_ee2f4e3c","updated":"2018-04-18 21:35:51.000000000","message":"\u003e A rebuild is asking the scheduler to verify its host. Why couldn\u0027t we assume that it would be exactly like any other move operation (hence a Migration object) so the scheduler would claim the instance against that Migration object ?\n\nA rebuild is not a move, so there is no Migration object, and creating one would be confusing.","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"77227798d0031b1cabe087fe0ae80321bc2c8ced","unresolved":false,"context_lines":[{"line_number":141,"context_line":"see `rebuild shouldn\u0027t check with placement`_"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"We can make an allocation request to placement using"},{"line_number":144,"context_line":"`GET /allocation_candidates` API without resources and only traits"},{"line_number":145,"context_line":"and make sure the host list returned contains the host we are currently doing a"},{"line_number":146,"context_line":"rebuild of. This would require a API change as currently resources are"},{"line_number":147,"context_line":"required in the allocation request API."}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_fd006603","line":144,"range":{"start_line":144,"start_character":0,"end_line":144,"end_character":66},"updated":"2018-04-13 15:43:10.000000000","message":"actually, no, this is not possible. Allocation candidates are just that: candidates for allocating resources. Therefore, it is required that you are requesting some amount of resources.\n\nThat said, the GET /resource_provider/{node_uuid}/traits API call sounds like it is precisely what you are looking for, as you mention above on line 100...\n\n\u003clater\u003e oh, I now realize this is in the Alternatives section. :) Never mind...","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"29e64b0b0abd6e2da31c60ec30cb73bb49d95240","unresolved":false,"context_lines":[{"line_number":141,"context_line":"see `rebuild shouldn\u0027t check with placement`_"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"We can make an allocation request to placement using"},{"line_number":144,"context_line":"`GET /allocation_candidates` API without resources and only traits"},{"line_number":145,"context_line":"and make sure the host list returned contains the host we are currently doing a"},{"line_number":146,"context_line":"rebuild of. This would require a API change as currently resources are"},{"line_number":147,"context_line":"required in the allocation request API."}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf659307_ce284a34","line":144,"range":{"start_line":144,"start_character":0,"end_line":144,"end_character":66},"in_reply_to":"bf659307_fd006603","updated":"2018-04-13 17:55:24.000000000","message":":)","commit_id":"8b84dd2d64f81ef43bfa083b0550909a2fae5934"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9496ef6090a065823e34ff6a9009f15d2fc97dff","unresolved":false,"context_lines":[{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"The conductor can pass in a flag to the scheduler indicating if the image"},{"line_number":100,"context_line":"properties have changed from the original image. The scheduler can use this"},{"line_number":101,"context_line":"information to trigger the placement -\u003e filter flow or just allow the filter"},{"line_number":102,"context_line":"flow."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"This does re-introduce the issue that the current host maybe be excluded as a"},{"line_number":105,"context_line":"candidate host if the compute is close to full and the image properties have"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_f69b0bc6","line":102,"range":{"start_line":100,"start_character":49,"end_line":102,"end_character":5},"updated":"2018-04-19 18:09:55.000000000","message":"We could needlessly get back 1000 allocation candidates when we know we only care about one. Since we can\u0027t specify a specific node with GET /allocation_candidates, in PS1 we talked about other options for that like adding an in_tree query parameter to GET /allocation_candidates so it would at least restrict what comes back for filtering, but ultimately I thought there was some consensus that we\u0027d just continue to *NOT* call GET /allocation_candidates if we\u0027re doing a rebuild, and instead call:\n\nGET /resource_providers/{rp_uuid}/traits\n\nAnd compare the results. Where we left things with that in PS1 last week was whether to do that in the ImagePropertiesFilter (that\u0027s what I vote for), or just always do it in select_destinations() if we\u0027re doing a rebuild and not getting allocation candidates. Either way it\u0027s more performant than getting all allocation candidates again and then filtering them out - plus, as noted in the next paragraph, that will potentially re-introduce bug 1750623.\n\nAnyway, I\u0027m a -1 on this as the proposed solution.","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc9869e2ad9ab2985859d3eb3442ea9f24fe318f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"The conductor can pass in a flag to the scheduler indicating if the image"},{"line_number":100,"context_line":"properties have changed from the original image. The scheduler can use this"},{"line_number":101,"context_line":"information to trigger the placement -\u003e filter flow or just allow the filter"},{"line_number":102,"context_line":"flow."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"This does re-introduce the issue that the current host maybe be excluded as a"},{"line_number":105,"context_line":"candidate host if the compute is close to full and the image properties have"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_0700c6aa","line":102,"range":{"start_line":100,"start_character":49,"end_line":102,"end_character":5},"in_reply_to":"9f6a8fd7_1666bf52","updated":"2018-04-20 01:25:35.000000000","message":"\u003e and allocation candidates call is supposed to provide RP/hosts based on requirements.\n\nWe can still do that with alternative 1 below, the only drawback is we don\u0027t have nested providers in the mix, but as noted below, we already don\u0027t handle claims for NUMA resources for rebuild anyway, so those could be fixed together later.\n\n\u003e BTW, is there a hard requirement for the rebuild to make sure we stay on the same host? or is it more of a preference to stay on the same host?\n\nIt is a hard requirement.","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"ae26292983cfbc150cdc49bcea6b45113bf37d90","unresolved":false,"context_lines":[{"line_number":97,"context_line":"is described in the issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"The conductor can pass in a flag to the scheduler indicating if the image"},{"line_number":100,"context_line":"properties have changed from the original image. The scheduler can use this"},{"line_number":101,"context_line":"information to trigger the placement -\u003e filter flow or just allow the filter"},{"line_number":102,"context_line":"flow."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"This does re-introduce the issue that the current host maybe be excluded as a"},{"line_number":105,"context_line":"candidate host if the compute is close to full and the image properties have"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_1666bf52","line":102,"range":{"start_line":100,"start_character":49,"end_line":102,"end_character":5},"in_reply_to":"9f6a8fd7_f69b0bc6","updated":"2018-04-19 18:43:05.000000000","message":"we will trigger the call to GET /allocation_candidates ONLY in case the image properties have changed. Image properties changing does mean the RP/host requirements have changed, and allocation candidates call is supposed to provide RP/hosts based on requirements. we can make it more specific to check if image `traits_required` field has changed so as to make it more specific.\n\nBTW, is there a hard requirement for the rebuild to make sure we stay on the same host? or is it more of a preference to stay on the same host?","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9496ef6090a065823e34ff6a9009f15d2fc97dff","unresolved":false,"context_lines":[{"line_number":101,"context_line":"information to trigger the placement -\u003e filter flow or just allow the filter"},{"line_number":102,"context_line":"flow."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"This does re-introduce the issue that the current host maybe be excluded as a"},{"line_number":105,"context_line":"candidate host if the compute is close to full and the image properties have"},{"line_number":106,"context_line":"changed. But this seems to be a reasonable case where we want the placement"},{"line_number":107,"context_line":"to make sure all the requirements of the image are met."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_1688ff6e","line":107,"range":{"start_line":104,"start_character":0,"end_line":107,"end_character":55},"updated":"2018-04-19 18:09:55.000000000","message":"I don\u0027t think it\u0027s reasonable to knowingly regress this when we have a simple alternative to maintain this fix and still handle validation for rebuild with a new image that has new traits on it.","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9496ef6090a065823e34ff6a9009f15d2fc97dff","unresolved":false,"context_lines":[{"line_number":149,"context_line":"`GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":150,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":153,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":154,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Potential issue with this is that the traits on the image maybe attached to a"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_d6cfe7ad","line":153,"range":{"start_line":152,"start_character":0,"end_line":153,"end_character":16},"updated":"2018-04-19 18:09:55.000000000","message":"I would run this from within the ImagePropertiesFilter, as noted before, since today rebuild + new image scheduler filter validation is completely dependent on your scheduler filter configuration, and I think we should continue to honor that - besides, ImagePropertiesFilter is already a default enabled filter and everyone uses it, see:\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2018-April/129482.html","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc9869e2ad9ab2985859d3eb3442ea9f24fe318f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"`GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":150,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":153,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":154,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Potential issue with this is that the traits on the image maybe attached to a"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_47231e57","line":153,"range":{"start_line":152,"start_character":0,"end_line":153,"end_character":16},"in_reply_to":"9f6a8fd7_16f47f5a","updated":"2018-04-20 01:25:35.000000000","message":"\u003e the ImagePropertiesFilter and the filtering done using trait properties are completely independent. If you remove ImagePropertiesFilter tommorow, filtering using traits(even during rebuild) should work.\n\nI disagree, and we have scheduler filters which are configurable for a reason, but this isn\u0027t a sticking point for me, it\u0027s just an implementation detail.\n\n\u003e If we run this from the ImagePropertiesFilter for rebuild, we will lose the  functionality of filtering hosts by traits.\n\nI don\u0027t understand how those are related. For a rebuild, there is only one host that we care about, which is the host that the instance is already running on.","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"ae26292983cfbc150cdc49bcea6b45113bf37d90","unresolved":false,"context_lines":[{"line_number":149,"context_line":"`GET /resource_providers/{hostUUID}/traits` API and try to match the"},{"line_number":150,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"},{"line_number":153,"context_line":"filters are run. If the traits match, then the request will continue to be"},{"line_number":154,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Potential issue with this is that the traits on the image maybe attached to a"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_16f47f5a","line":153,"range":{"start_line":152,"start_character":0,"end_line":153,"end_character":16},"in_reply_to":"9f6a8fd7_d6cfe7ad","updated":"2018-04-19 18:43:05.000000000","message":"the ImagePropertiesFilter and the filtering done using trait properties are completely independent. If you remove ImagePropertiesFilter tommorow, filtering using traits(even during rebuild) should work.\n\nIf we run this from the ImagePropertiesFilter for rebuild, we will lose the  functionality of filtering hosts by traits.","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9496ef6090a065823e34ff6a9009f15d2fc97dff","unresolved":false,"context_lines":[{"line_number":154,"context_line":"processed as it does currently(passing through the various filters etc)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Potential issue with this is that the traits on the image maybe attached to a"},{"line_number":157,"context_line":"nested resource provider under the compute node. For example, in case the"},{"line_number":158,"context_line":"instance is running on a host which has two SRIOV nic\u0027s. One is normal SRIOV"},{"line_number":159,"context_line":"nic, another one with some kind of offload feature."},{"line_number":160,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_3692e39f","line":157,"updated":"2018-04-19 18:09:55.000000000","message":"ugh","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9496ef6090a065823e34ff6a9009f15d2fc97dff","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    resources\u003dSRIOV_VF:1"},{"line_number":170,"context_line":"    traits\u003dHW_NIC_OFFLOAD_XX"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"After we bypass the scheduler, we can\u0027t ensure we allocated VF from another"},{"line_number":173,"context_line":"SRIOV PF."},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"*Alternative 2*"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_d681274c","line":173,"range":{"start_line":172,"start_character":0,"end_line":173,"end_character":9},"updated":"2018-04-19 18:09:55.000000000","message":"We don\u0027t allocate (claim resources) during rebuild. Not even if you rebuild today with a new image that has different pci/numa properties in it, see bug 1763766.\n\nGiven this is an existing issue for NUMA + rebuild, I\u0027m inclined to not muddy the solution for rebuild + image + traits by calling GET /allocation_candidates unless we have to, and if we did, I\u0027d say we have to go with alternative 2 below.","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9496ef6090a065823e34ff6a9009f15d2fc97dff","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"*Alternative 2*"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"We can make an allocation request to placement using"},{"line_number":178,"context_line":"`GET /allocation_candidates` API without resources and only traits"},{"line_number":179,"context_line":"and make sure the host list returned contains the host we are currently doing a"},{"line_number":180,"context_line":"rebuild of."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"This would require a API change as currently resources are"},{"line_number":183,"context_line":"required in the allocation request API."},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"Data model impact"},{"line_number":186,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f6a8fd7_9693afa3","line":183,"range":{"start_line":177,"start_character":0,"end_line":183,"end_character":39},"updated":"2018-04-19 18:09:55.000000000","message":"If we did this, I think we\u0027d also want to include the in_tree query parameter to GET /allocation_candidates so that we are restricting the results to the root compute node resource provider that we know we\u0027re going to use.","commit_id":"6554b40f14195f6c02da5f33700d9fd33946db84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f36e5b900fc175c31a3062bb2334d553a9da8bd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"is close to full as the current host will be excluded. This is described in the"},{"line_number":98,"context_line":"issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"If the image\u0027s required traits have changed from the original image, we can"},{"line_number":101,"context_line":"reject the rebuild request. Effectively, since the qualitative requirements"},{"line_number":102,"context_line":"have changed the user should create a new instance."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Alternatives"},{"line_number":105,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_520b9f7b","line":102,"range":{"start_line":100,"start_character":0,"end_line":102,"end_character":51},"updated":"2018-04-23 19:10:11.000000000","message":"If I\u0027m following correctly, the new proposal in PS5 is that rather than even attempt to support rebuilding with a new image that has new required traits, we simply fail fast in the API because the scheduler doesn\u0027t support that scenario yet. Is that correct?\n\nSeems like alternative 2 is simple enough that we could avoid this as the solution. Yes it\u0027s work in the placement API, but the API logic already exists for GET /resource_providers and the changes on the nova-scheduler side shouldn\u0027t be bad.","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"7fb7d17043edfe0d8773c8a7e2307b1c9e3f47ee","unresolved":false,"context_lines":[{"line_number":97,"context_line":"is close to full as the current host will be excluded. This is described in the"},{"line_number":98,"context_line":"issue `rebuild shouldn\u0027t check with placement`_."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"If the image\u0027s required traits have changed from the original image, we can"},{"line_number":101,"context_line":"reject the rebuild request. Effectively, since the qualitative requirements"},{"line_number":102,"context_line":"have changed the user should create a new instance."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Alternatives"},{"line_number":105,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_ad0bbed3","line":102,"range":{"start_line":100,"start_character":0,"end_line":102,"end_character":51},"in_reply_to":"9f6a8fd7_520b9f7b","updated":"2018-04-23 19:43:24.000000000","message":"\u003e Allocation candidates are just that: candidates for allocating \n \u003e resources. Therefore, it is required that you are requesting some \n \u003e amount of resources.\n\nI think jaypipes did not like the suggestion of alternative 2. would like to get more thoughts from the other core\u0027s as well.\n\nAlso even if we make the changes to support alternative #2,  in case of scenario 2(described in the comment), we have to reject the request correct?\n\nBut with alternative #2, we will succeed. Hence why i reverted to original suggestion of alex.\n\nIf we make the errror message more clear, would that help? I think jay suggested something like below. \n\n \u003e We could return an error to the user saying the image traits have changed since original boot, therefore instead of rebuilding the instance, you should create a new instance with the same image.\n\nIts not a regression because this is a new feature and we dont support rebuild in case of trait changes. If there are requests for allowing trait changes we can handle it at that time with more of the extensive changes we are discussing.","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f36e5b900fc175c31a3062bb2334d553a9da8bd","unresolved":false,"context_lines":[{"line_number":170,"context_line":"Ideally this request should fail since we can\u0027t ensure we allocated VF from the"},{"line_number":171,"context_line":"other SRIOV PF."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"This alternative can also be implemented ImagePropertiesFilter in case of"},{"line_number":174,"context_line":"rebuild. But this is not ideal since none of the other fitlers make any API"},{"line_number":175,"context_line":"calls during the filtering process."},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_12fbe778","line":173,"range":{"start_line":173,"start_character":29,"end_line":173,"end_character":40},"updated":"2018-04-23 19:10:11.000000000","message":"implemented in the","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"7fb7d17043edfe0d8773c8a7e2307b1c9e3f47ee","unresolved":false,"context_lines":[{"line_number":170,"context_line":"Ideally this request should fail since we can\u0027t ensure we allocated VF from the"},{"line_number":171,"context_line":"other SRIOV PF."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"This alternative can also be implemented ImagePropertiesFilter in case of"},{"line_number":174,"context_line":"rebuild. But this is not ideal since none of the other fitlers make any API"},{"line_number":175,"context_line":"calls during the filtering process."},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_cde39233","line":173,"range":{"start_line":173,"start_character":29,"end_line":173,"end_character":40},"in_reply_to":"9f6a8fd7_12fbe778","updated":"2018-04-23 19:43:24.000000000","message":"Done","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f36e5b900fc175c31a3062bb2334d553a9da8bd","unresolved":false,"context_lines":[{"line_number":171,"context_line":"other SRIOV PF."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"This alternative can also be implemented ImagePropertiesFilter in case of"},{"line_number":174,"context_line":"rebuild. But this is not ideal since none of the other fitlers make any API"},{"line_number":175,"context_line":"calls during the filtering process."},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"*Alternative 2*"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_72026371","line":174,"range":{"start_line":174,"start_character":55,"end_line":174,"end_character":62},"updated":"2018-04-23 19:10:11.000000000","message":"filters","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"7fb7d17043edfe0d8773c8a7e2307b1c9e3f47ee","unresolved":false,"context_lines":[{"line_number":171,"context_line":"other SRIOV PF."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"This alternative can also be implemented ImagePropertiesFilter in case of"},{"line_number":174,"context_line":"rebuild. But this is not ideal since none of the other fitlers make any API"},{"line_number":175,"context_line":"calls during the filtering process."},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"*Alternative 2*"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_2ddb2e7c","line":174,"range":{"start_line":174,"start_character":55,"end_line":174,"end_character":62},"in_reply_to":"9f6a8fd7_72026371","updated":"2018-04-23 19:43:24.000000000","message":"Done","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f36e5b900fc175c31a3062bb2334d553a9da8bd","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"This alternative can also be implemented ImagePropertiesFilter in case of"},{"line_number":174,"context_line":"rebuild. But this is not ideal since none of the other fitlers make any API"},{"line_number":175,"context_line":"calls during the filtering process."},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"*Alternative 2*"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_7237c34e","line":175,"updated":"2018-04-23 19:10:11.000000000","message":"Well, none of the in-tree filters do, but we\u0027ve had filters before, like the TrustedFilter, which would make calls to external services (the attestation service in the case of the TrustedFilter). I agree it\u0027s not ideal, but the point in using ImagePropertiesFilter is that it\u0027s configurable in case you don\u0027t care about filtering on image properties (or traits in this case).","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f36e5b900fc175c31a3062bb2334d553a9da8bd","unresolved":false,"context_lines":[{"line_number":186,"context_line":"allocation request API and it seems hacky to use the allocation candidates API"},{"line_number":187,"context_line":"to just filter instead of actually allocating resources."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"We can also create a new API with the above properties, but it"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"Data model impact"},{"line_number":192,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_52fddf6b","line":189,"range":{"start_line":189,"start_character":56,"end_line":189,"end_character":62},"updated":"2018-04-23 19:10:11.000000000","message":"?","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"7fb7d17043edfe0d8773c8a7e2307b1c9e3f47ee","unresolved":false,"context_lines":[{"line_number":186,"context_line":"allocation request API and it seems hacky to use the allocation candidates API"},{"line_number":187,"context_line":"to just filter instead of actually allocating resources."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"We can also create a new API with the above properties, but it"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"Data model impact"},{"line_number":192,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f6a8fd7_0dde6a6c","line":189,"range":{"start_line":189,"start_character":56,"end_line":189,"end_character":62},"in_reply_to":"9f6a8fd7_52fddf6b","updated":"2018-04-23 19:43:24.000000000","message":"Done","commit_id":"5944d57c7dbf4420266e522b05dd8631135f6d1d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"43a7ff655434f29ab4604ebd4e1d0435452e066b","unresolved":false,"context_lines":[{"line_number":93,"context_line":"In case of rebuild with new image(host and flavor staying the same), we need to"},{"line_number":94,"context_line":"make sure the image traits(if updated) are taken into account. Ideally the"},{"line_number":95,"context_line":"scheduler would request new candidates from placement and makes sure the"},{"line_number":96,"context_line":"current host is part of that list, but this is problematic in-case the compute"},{"line_number":97,"context_line":"is close to full as the current host will be excluded. This is described in the"},{"line_number":98,"context_line":"issue `rebuild should not check with placement`_."},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_1104e916","line":96,"range":{"start_line":96,"start_character":0,"end_line":96,"end_character":33},"updated":"2018-05-04 13:29:34.000000000","message":"Even that would be insufficient, because the traits could belong to providers not associated with the instance.","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"8b0d7aa08639b61ccd1df416d1ed9239abf1a49e","unresolved":false,"context_lines":[{"line_number":93,"context_line":"In case of rebuild with new image(host and flavor staying the same), we need to"},{"line_number":94,"context_line":"make sure the image traits(if updated) are taken into account. Ideally the"},{"line_number":95,"context_line":"scheduler would request new candidates from placement and makes sure the"},{"line_number":96,"context_line":"current host is part of that list, but this is problematic in-case the compute"},{"line_number":97,"context_line":"is close to full as the current host will be excluded. This is described in the"},{"line_number":98,"context_line":"issue `rebuild should not check with placement`_."},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_02b814c6","line":96,"range":{"start_line":96,"start_character":0,"end_line":96,"end_character":33},"in_reply_to":"5f7c97a3_1104e916","updated":"2018-05-04 16:24:15.000000000","message":"good point. Alternative would be to get allocations as well from the placement...but thats going to be another rathole :)","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"43a7ff655434f29ab4604ebd4e1d0435452e066b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"request to make sure the image traits can still be accommodated within the"},{"line_number":102,"context_line":"current allocations for that instance."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"The conductor can request current allocations for the instance using"},{"line_number":105,"context_line":"`GET /allocations/{instance_uuid}` and collect all the resource providers and"},{"line_number":106,"context_line":"their corresponding traits from the allocations. It can then check to see if"},{"line_number":107,"context_line":"any of the requested image traits are missing from the set of traits above."},{"line_number":108,"context_line":"If there are any missing traits, we can fail the rebuild."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Alternatives"},{"line_number":111,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_192def94","line":108,"range":{"start_line":104,"start_character":0,"end_line":108,"end_character":57},"updated":"2018-05-04 13:29:34.000000000","message":"++","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"8b0d7aa08639b61ccd1df416d1ed9239abf1a49e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"request to make sure the image traits can still be accommodated within the"},{"line_number":102,"context_line":"current allocations for that instance."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"The conductor can request current allocations for the instance using"},{"line_number":105,"context_line":"`GET /allocations/{instance_uuid}` and collect all the resource providers and"},{"line_number":106,"context_line":"their corresponding traits from the allocations. It can then check to see if"},{"line_number":107,"context_line":"any of the requested image traits are missing from the set of traits above."},{"line_number":108,"context_line":"If there are any missing traits, we can fail the rebuild."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Alternatives"},{"line_number":111,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_220bd08e","line":108,"range":{"start_line":104,"start_character":0,"end_line":108,"end_character":57},"in_reply_to":"5f7c97a3_192def94","updated":"2018-05-04 16:24:15.000000000","message":"paraphased from the ML here http://lists.openstack.org/pipermail/openstack-dev/2018-April/129740.html","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"00d80ad35740c41002ebdf89751c9815acaab96f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"request to make sure the image traits can still be accommodated within the"},{"line_number":102,"context_line":"current allocations for that instance."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"The conductor can request current allocations for the instance using"},{"line_number":105,"context_line":"`GET /allocations/{instance_uuid}` and collect all the resource providers and"},{"line_number":106,"context_line":"their corresponding traits from the allocations. It can then check to see if"},{"line_number":107,"context_line":"any of the requested image traits are missing from the set of traits above."},{"line_number":108,"context_line":"If there are any missing traits, we can fail the rebuild."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Alternatives"},{"line_number":111,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_ead7e1be","line":108,"range":{"start_line":104,"start_character":0,"end_line":108,"end_character":57},"in_reply_to":"5f7c97a3_220bd08e","updated":"2018-05-07 01:50:34.000000000","message":"After reading the ML, I agree with the case Matt and Melanie said. So I \u0027m cool with this.","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61fa317ac3b802110f918c1e66a7411761f41cd6","unresolved":false,"context_lines":[{"line_number":156,"context_line":"*Alternative 2*"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"The scheduler can request traits of current host using the existing"},{"line_number":159,"context_line":"`GET /resource_providers/{UUID}/traits` API and try to match the"},{"line_number":160,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_ce8243c9","line":159,"range":{"start_line":159,"start_character":1,"end_line":159,"end_character":38},"updated":"2018-05-04 20:50:27.000000000","message":"Well, GET /resource_providers/?in_tree\u003d\u003cUUID\u003e\u0026required\u003d\u003ctraits\u003e.\n\nI think that\u0027s what Eric suggested at one point in the discussion.","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"596441fd3c168e12691a5f7e5ec8f38bfd3a2580","unresolved":false,"context_lines":[{"line_number":156,"context_line":"*Alternative 2*"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"The scheduler can request traits of current host using the existing"},{"line_number":159,"context_line":"`GET /resource_providers/{UUID}/traits` API and try to match the"},{"line_number":160,"context_line":"traits returned for the current host against the traits specified in the image."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"If the traits do not match, `NoValidHost` exception will be raised before the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_ce132366","line":159,"range":{"start_line":159,"start_character":1,"end_line":159,"end_character":38},"in_reply_to":"5f7c97a3_ce8243c9","updated":"2018-05-04 21:07:28.000000000","message":"Yeah, but I took it back.  That will only get you the providers with *all* of the traits, whereas the traits we need might be spread across several providers in the tree (and shared via aggregate).","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"43a7ff655434f29ab4604ebd4e1d0435452e066b","unresolved":false,"context_lines":[{"line_number":184,"context_line":"provider present in the tree."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"Ideally this request should fail since we can\u0027t ensure we allocated VF from the"},{"line_number":187,"context_line":"other SRIOV PF."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"This alternative can also be implemented in the ImagePropertiesFilter in case"},{"line_number":190,"context_line":"of rebuild. But this is not ideal since none of the other filters make any API"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5f7c97a3_993d7fbd","line":187,"updated":"2018-05-04 13:29:34.000000000","message":"yeah, this.","commit_id":"7875dfc70356028a7bc3e806a6faabc2f0d5278a"}]}
