)]}'
{"nova/conf/scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                default\u003dFalse,"},{"line_number":183,"context_line":"                help\u003d\"\"\""},{"line_number":184,"context_line":"This setting causes the scheduler to ask placement only for compute"},{"line_number":185,"context_line":"hosts that support the type of the image used in the request."},{"line_number":186,"context_line":"\"\"\"),"},{"line_number":187,"context_line":"]"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_4193df5b","line":185,"range":{"start_line":185,"start_character":19,"end_line":185,"end_character":40},"updated":"2019-05-01 18:54:45.000000000","message":"We should expand/clarify this a bit to make it clear that it filters hosts based on the disk_format value of the image.\n\nI would leave it for docs to explain how the computes have traits for the disk formats they support and this filter is used to correlate those values during scheduling.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"}],"nova/scheduler/request_filter.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            [agg.uuid for agg in aggregates])"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"def require_image_type_support(ctxt, request_spec):"},{"line_number":89,"context_line":"    \"\"\"Request type-specific trait on candidates."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    This will modify the request_spec to request hosts that support the"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_e1c69368","line":88,"updated":"2019-05-01 18:54:45.000000000","message":"We should have something about this in the scheduler config docs somewhere, but I\u0027m not sure where:\n\nhttps://docs.openstack.org/nova/latest/admin/configuration/schedulers.html\n\nThe other request filters in here fit into the aggregates section in there, but this is different.\n\nYou could maybe slide a sub-section in under https://docs.openstack.org/nova/latest/admin/configuration/schedulers.html#imagepropertiesfilter but I\u0027m not sure if that\u0027s very good.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fdd0577d7cbb6e6ea093447c083b72a884ef73c2","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            [agg.uuid for agg in aggregates])"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"def require_image_type_support(ctxt, request_spec):"},{"line_number":89,"context_line":"    \"\"\"Request type-specific trait on candidates."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    This will modify the request_spec to request hosts that support the"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_e9f4f5d1","line":88,"in_reply_to":"ffb9cba7_e1c69368","updated":"2019-05-02 15:35:53.000000000","message":"Yep, I was going to do the docs in the next patch, if that\u0027s okay.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    \"\"\"Request type-specific trait on candidates."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    This will modify the request_spec to request hosts that support the"},{"line_number":92,"context_line":"    type of the image provide."},{"line_number":93,"context_line":"    \"\"\""},{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_217fcb15","line":92,"range":{"start_line":92,"start_character":4,"end_line":92,"end_character":8},"updated":"2019-05-01 18:54:45.000000000","message":"disk_format","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    \"\"\"Request type-specific trait on candidates."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    This will modify the request_spec to request hosts that support the"},{"line_number":92,"context_line":"    type of the image provide."},{"line_number":93,"context_line":"    \"\"\""},{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_8186b712","line":92,"range":{"start_line":92,"start_character":22,"end_line":92,"end_character":29},"updated":"2019-05-01 18:54:45.000000000","message":"provided","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    disk_format \u003d request_spec.image.disk_format"},{"line_number":98,"context_line":"    trait_name \u003d \u0027COMPUTE_IMAGE_TYPE_%s\u0027 % disk_format.upper()"},{"line_number":99,"context_line":"    if not hasattr(os_traits, trait_name):"},{"line_number":100,"context_line":"        LOG.error((\u0027Computed trait name %r is not valid; \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_815eb773","line":97,"range":{"start_line":97,"start_character":18,"end_line":97,"end_character":36},"updated":"2019-05-01 18:54:45.000000000","message":"This might not work for a volume-backed server. I know in that case the image.id won\u0027t be set, but there should be properties from the image copied into the request_spec.image because of:\n\nhttps://github.com/openstack/nova/blob/1f74441680b4376cd401ecc0b0449b464cf7a5fb/nova/utils.py#L940\n\nLooking at that it looks like we\u0027ll copy the disk_format value from the volume\u0027s image meta, so I guess we should be OK. But what if we boot from a volume snapshot?\n\nIt looks like we pop those out:\n\nhttps://github.com/openstack/nova/blob/1f74441680b4376cd401ecc0b0449b464cf7a5fb/nova/compute/api.py#L3095\n\nBut then it looks like because of how we create the image, you\u0027re getting lucky and we\u0027ll store a default disk_format:\n\nhttps://github.com/openstack/nova/blob/1f74441680b4376cd401ecc0b0449b464cf7a5fb/nova/image/glance.py#L567\n\nAnyway, seems like a pretty dicey situation to rely on that. What happens if you try to create an image in glance without specifying a disk_format? It looks like disk_format is optional in the glance image create API, and according to the GET /images/{image_id} API reference the disk_format could be null:\n\n\"The value might be null (JSON null data type).\"\n\nSo I guess maybe the morale is we can expect to have the disk_format in the request spec\u0027s image, but the value might be None. Trying to request required\u003dCOMPUTE_IMAGE_TYPE_NONE will blow up in GET /allocation_candidates unless that trait exists (which it won\u0027t) so yeah, we could fail if anything ever changes in our volume-backed server snapshot flow to screw this up.\n\nProbably better to just be defensive and handle the case that disk_format either isn\u0027t in the request_spec.image or there is no value.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fdd0577d7cbb6e6ea093447c083b72a884ef73c2","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    disk_format \u003d request_spec.image.disk_format"},{"line_number":98,"context_line":"    trait_name \u003d \u0027COMPUTE_IMAGE_TYPE_%s\u0027 % disk_format.upper()"},{"line_number":99,"context_line":"    if not hasattr(os_traits, trait_name):"},{"line_number":100,"context_line":"        LOG.error((\u0027Computed trait name %r is not valid; \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_c920114d","line":97,"range":{"start_line":97,"start_character":18,"end_line":97,"end_character":36},"in_reply_to":"ffb9cba7_815eb773","updated":"2019-05-02 15:35:53.000000000","message":"I think that if we\u0027re volume-backed, we can just skip this filter entirely. At that point, the format of the image doesn\u0027t really matter.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"541a040c5349db7aef2ad743cc204eaab94deddd","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    disk_format \u003d request_spec.image.disk_format"},{"line_number":98,"context_line":"    trait_name \u003d \u0027COMPUTE_IMAGE_TYPE_%s\u0027 % disk_format.upper()"},{"line_number":99,"context_line":"    if not hasattr(os_traits, trait_name):"},{"line_number":100,"context_line":"        LOG.error((\u0027Computed trait name %r is not valid; \u0027"},{"line_number":101,"context_line":"                   \u0027is os-traits up to date?\u0027), trait_name)"},{"line_number":102,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_c1202faf","line":99,"updated":"2019-05-01 19:02:15.000000000","message":"Should have a unit test for this case.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    disk_format \u003d request_spec.image.disk_format"},{"line_number":98,"context_line":"    trait_name \u003d \u0027COMPUTE_IMAGE_TYPE_%s\u0027 % disk_format.upper()"},{"line_number":99,"context_line":"    if not hasattr(os_traits, trait_name):"},{"line_number":100,"context_line":"        LOG.error((\u0027Computed trait name %r is not valid; \u0027"},{"line_number":101,"context_line":"                   \u0027is os-traits up to date?\u0027), trait_name)"},{"line_number":102,"context_line":"        return"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    request_spec.flavor.extra_specs[\u0027trait:%s\u0027 % trait_name] \u003d \u0027required\u0027"},{"line_number":105,"context_line":"    request_spec.obj_reset_changes(fields\u003d[\u0027flavor\u0027], recursive\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_014ac7aa","line":102,"range":{"start_line":100,"start_character":8,"end_line":102,"end_character":14},"updated":"2019-05-01 18:54:45.000000000","message":"Yeah this is what I\u0027m talking about above for the None case, so probably better to avoid that for the potentially known None case.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        return"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    request_spec.flavor.extra_specs[\u0027trait:%s\u0027 % trait_name] \u003d \u0027required\u0027"},{"line_number":105,"context_line":"    request_spec.obj_reset_changes(fields\u003d[\u0027flavor\u0027], recursive\u003dTrue)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"ALL_REQUEST_FILTERS \u003d ["}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_21dcabe2","line":105,"updated":"2019-05-01 18:54:45.000000000","message":"Would be good to leave a comment about why we are doing this, i.e. we\u0027re hitching a ride on the request spec\u0027s flavor just for this specific run through the scheduler but we don\u0027t want to persist that change into the RequestSpec since the value could change later, i.e. during a rebuild with a new image.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"541a040c5349db7aef2ad743cc204eaab94deddd","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        return"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    request_spec.flavor.extra_specs[\u0027trait:%s\u0027 % trait_name] \u003d \u0027required\u0027"},{"line_number":105,"context_line":"    request_spec.obj_reset_changes(fields\u003d[\u0027flavor\u0027], recursive\u003dTrue)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"ALL_REQUEST_FILTERS \u003d ["}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_6406311f","line":105,"in_reply_to":"ffb9cba7_21dcabe2","updated":"2019-05-01 19:02:15.000000000","message":"Should also have a unit test for this case probably to assert that anything which saves changes to the request spec after going through this method isn\u0027t persisted.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ad6f53d8d792da768e46652da42c3fee5d7fe32","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    if \u0027disk_format\u0027 not in request_spec.image:"},{"line_number":98,"context_line":"        # No image.disk_format means we are booting from volume,"},{"line_number":99,"context_line":"        # and thus compute node support does not matter."},{"line_number":100,"context_line":"        return"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_f14b6aad","line":98,"updated":"2019-05-03 20:52:40.000000000","message":"I think there will still be a disk_format in the request_spec.image for volume-backed servers because of volume_image_metadata in the volume, but sure this is defensive in case we had some weird case that we didn\u0027t have the disk_format.\n\nWhat if disk_format is None? Then disk_format.upper() below will explode, so shouldn\u0027t this be:\n\nif \u0027disk_format\u0027 not in request_spec.image or \\\n        not request_spec.image.disk_format:\n    return","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"769dbe0bc89255ce06c881e1cf9df886f4a8664e","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    if \u0027disk_format\u0027 not in request_spec.image:"},{"line_number":98,"context_line":"        # No image.disk_format means we are booting from volume,"},{"line_number":99,"context_line":"        # and thus compute node support does not matter."},{"line_number":100,"context_line":"        return"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_0f9b6e72","line":98,"in_reply_to":"dfbec78f_965bff2c","updated":"2019-05-04 15:07:11.000000000","message":"\u003e ImageMeta.disk_format is not nullable so it can\u0027t be None.\n\nAck good point, didn\u0027t look at that. I thought it was just lumped into ImageMetaProps, but if it were you\u0027d have to use request_spec.image.properties.disk_format.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8b8e084956872ba8018c40856bf56a756d420638","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    if \u0027disk_format\u0027 not in request_spec.image:"},{"line_number":98,"context_line":"        # No image.disk_format means we are booting from volume,"},{"line_number":99,"context_line":"        # and thus compute node support does not matter."},{"line_number":100,"context_line":"        return"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_965bff2c","line":98,"in_reply_to":"dfbec78f_f14b6aad","updated":"2019-05-03 23:55:08.000000000","message":"ImageMeta.disk_format is not nullable so it can\u0027t be None. If it\u0027s set and not something we support, then we will (and should) hit the LOG.error and the graceful exit on L107.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8690272cf1f000e6c92abc3362cf360dde40dd1e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    if \u0027disk_format\u0027 not in request_spec.image:"},{"line_number":98,"context_line":"        # No image.disk_format means we are booting from volume,"},{"line_number":99,"context_line":"        # and thus compute node support does not matter."},{"line_number":100,"context_line":"        return"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    disk_format \u003d request_spec.image.disk_format"},{"line_number":103,"context_line":"    trait_name \u003d \u0027COMPUTE_IMAGE_TYPE_%s\u0027 % disk_format.upper()"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_ae133a0d","line":100,"range":{"start_line":97,"start_character":4,"end_line":100,"end_character":14},"updated":"2019-05-05 15:42:08.000000000","message":"Something I thought about this later. The disk_format should always be in the request_spec.image because of the volume_image_metadata in the root volume - it\u0027s only not because the fake bootable volume in our cinder fixture doesn\u0027t set it.\n\nLet\u0027s say I set the disk_format\u003d\u0027vhd\u0027 in the fake volume response in our fixture, then the volume-backed functional test would fail since there are no hosts that support vhd, even though if I\u0027m doing a boot-from-volume that shouldn\u0027t matter.\n\nSo shouldn\u0027t we either (1) replace this or (2) supplement this with a check for request_spec.is_bfv and if True return since we don\u0027t care what image type the compute host supports? At best this filter does no harm in a real bfv scenario, but I worry a bit about filtering out hosts for a volume-backed server that would otherwise be fine.\n\nSomewhat tangential, but I\u0027ve been thinking lately about how we don\u0027t really have debug logs on the pre-filters like we do on the normal filters, but that\u0027s definitely something we could address separately later (since I\u0027m not sure what that logging would look like). At a minimum I\u0027ve been thinking about adding a simple decorator which if debug logging is enabled, times how long each of these pre-filters take to execute. This one wouldn\u0027t take long, but the ones based on aggregates might if you have a log of aggregates.","commit_id":"85546011e980e1053acc6a68f8927c4015988209"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8f700bf2db6db2fb50c17145e88186206d6dda39","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    if \u0027disk_format\u0027 not in request_spec.image:"},{"line_number":98,"context_line":"        # No image.disk_format means we are booting from volume,"},{"line_number":99,"context_line":"        # and thus compute node support does not matter."},{"line_number":100,"context_line":"        return"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    disk_format \u003d request_spec.image.disk_format"},{"line_number":103,"context_line":"    trait_name \u003d \u0027COMPUTE_IMAGE_TYPE_%s\u0027 % disk_format.upper()"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_652226a7","line":100,"range":{"start_line":97,"start_character":4,"end_line":100,"end_character":14},"in_reply_to":"dfbec78f_170e043b","updated":"2019-05-07 15:46:21.000000000","message":"\u003e Yeah, I guess that\u0027s possible. I just swapped this out for an is_bfv check and it passes the same volume test, as expected. So if you\u0027re cool with that...\n\nYup, that\u0027s what I was thinking.","commit_id":"85546011e980e1053acc6a68f8927c4015988209"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"552e6fbcf8bd18de24d91a52c35933e591e95e60","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    if \u0027disk_format\u0027 not in request_spec.image:"},{"line_number":98,"context_line":"        # No image.disk_format means we are booting from volume,"},{"line_number":99,"context_line":"        # and thus compute node support does not matter."},{"line_number":100,"context_line":"        return"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    disk_format \u003d request_spec.image.disk_format"},{"line_number":103,"context_line":"    trait_name \u003d \u0027COMPUTE_IMAGE_TYPE_%s\u0027 % disk_format.upper()"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_170e043b","line":100,"range":{"start_line":97,"start_character":4,"end_line":100,"end_character":14},"in_reply_to":"dfbec78f_ae133a0d","updated":"2019-05-07 15:00:33.000000000","message":"Yeah, I guess that\u0027s possible. I just swapped this out for an is_bfv check and it passes the same volume test, as expected. So if you\u0027re cool with that...\n\nI think that it\u0027s unlikely you\u0027d have a vhd image intended for xen or hyperv and just boot it, laundered through cinder, on a kvm host. But, it would be confusing if you tried and it failed quietly, so probably better to just do the bfv check.","commit_id":"85546011e980e1053acc6a68f8927c4015988209"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"344f5c8fe931050c95379f291d1c2979a26cc033","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if not CONF.scheduler.query_placement_for_image_type_support:"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    if request_spec.is_bfv:"},{"line_number":98,"context_line":"        # We are booting from volume, and thus compute node image"},{"line_number":99,"context_line":"        # disk_format support does not matter."},{"line_number":100,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_0546ca50","line":97,"updated":"2019-05-07 15:50:02.000000000","message":"Note that while this attribute is new as of Rocky, so older request specs in the API DB won\u0027t have it in the DB, each conductor call to select_destinations will call compute_utils.heal_reqspec_is_bfv first so it should be set by the time we get here.","commit_id":"91d377ef1dd1222c727dd178fa616e2deb25a2b4"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"ddad8e231455ff08a1ce01ffd76adf82ac8a7f4a","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":198,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        print(self.api.get_images(detail\u003dTrue))"},{"line_number":201,"context_line":"        vhd_image \u003d \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027"},{"line_number":202,"context_line":"        raw_image \u003d \u0027a440c04b-79fa-479c-bed1-0b816eaec379\u0027"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_7c4d8598","line":200,"updated":"2019-04-30 02:25:51.000000000","message":"I assume this is a leftover from creating the test? Or are you doing some kind of fun trick to provide useful captured debugging output in the event the test fails?","commit_id":"b72ecf56b06141869ce2e283a32963c9e8ea518a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        self._run_periodics()"},{"line_number":194,"context_line":"        self.assertEqual([1], list(self._get_node_build_failures().values()))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def test_create_server_with_image_type_filter(self):"},{"line_number":197,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":198,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_81ba376b","line":196,"range":{"start_line":196,"start_character":8,"end_line":196,"end_character":49},"updated":"2019-05-01 18:54:45.000000000","message":"Given my concerns with a volume-backed server, we should have a test wrinkle for that as well. The volume-backed snapshot case is really hairy and likely not something that would be easily testable with functional tests - nor necessarily all that trusty-worthy given we have to use fixtures for glance and cinder, so that\u0027s probably a case for testing manually.\n\nThere is a tempest scenario test that does that flow (boot from volume, snapshot the server, then create another server from the snapshot which will have an image-defined volume snapshot in it). So maybe in a follow up patch you should enable this config in the nova-next job so we\u0027re sure to be running this new filter in the gate.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c71467027ebe7f6274ad71ca77c6d5bec91759b1","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        self._run_periodics()"},{"line_number":194,"context_line":"        self.assertEqual([1], list(self._get_node_build_failures().values()))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def test_create_server_with_image_type_filter(self):"},{"line_number":197,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":198,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_b59deb67","line":196,"range":{"start_line":196,"start_character":8,"end_line":196,"end_character":49},"in_reply_to":"ffb9cba7_4123dfbd","updated":"2019-05-02 23:33:15.000000000","message":"I didn\u0027t do a volume-backed test with an image, but I did do one with no image, which I think catches all the cases (either we know of an image and filter, or we don\u0027t and don\u0027t filter).\n\nAnd yes, I think a nova-next change to run with this enabled makes good sense.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6f6845cb658f02c8a77453467f0c5c86962ed2f","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        self._run_periodics()"},{"line_number":194,"context_line":"        self.assertEqual([1], list(self._get_node_build_failures().values()))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def test_create_server_with_image_type_filter(self):"},{"line_number":197,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":198,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":199,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_4123dfbd","line":196,"range":{"start_line":196,"start_character":8,"end_line":196,"end_character":49},"in_reply_to":"ffb9cba7_81ba376b","updated":"2019-05-01 19:01:15.000000000","message":"To be clear, we should have an in-tree functional test which boots from volume (the cinder fixture has a bootable volume which is using an image underneath with disk_format\u003d\u0027raw\u0027) and verify that works properly through scheduling. If the filter failed though, we likely wouldn\u0027t know since we only have one compute and it would just skip the required trait filtering in the GET /allocation_candidates call. I don\u0027t have good thoughts right now on how to assert the request is what we expect. We could intercept the GET /allocation_candidates API request and inspect the query string, but that kind of sucks.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e44a5355af3cb0c171abb2d7102c2f8839cf0414","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":198,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        print(self.api.get_images(detail\u003dTrue))"},{"line_number":201,"context_line":"        vhd_image \u003d \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027"},{"line_number":202,"context_line":"        raw_image \u003d \u0027a440c04b-79fa-479c-bed1-0b816eaec379\u0027"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_0dee83ec","line":200,"updated":"2019-05-01 03:22:48.000000000","message":"I\u0027m still confused on this. Mentioned it on the previous patch. Is this supposed to be here still?","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ba018d92a8c3cdf2c8823197f67151861999118b","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":198,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        print(self.api.get_images(detail\u003dTrue))"},{"line_number":201,"context_line":"        vhd_image \u003d \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027"},{"line_number":202,"context_line":"        raw_image \u003d \u0027a440c04b-79fa-479c-bed1-0b816eaec379\u0027"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_75ad7d99","line":200,"in_reply_to":"ffb9cba7_01df27d6","updated":"2019-05-01 23:21:33.000000000","message":"Yep, sorry, just debug residue.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":198,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        print(self.api.get_images(detail\u003dTrue))"},{"line_number":201,"context_line":"        vhd_image \u003d \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027"},{"line_number":202,"context_line":"        raw_image \u003d \u0027a440c04b-79fa-479c-bed1-0b816eaec379\u0027"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_01df27d6","line":200,"in_reply_to":"ffb9cba7_0dee83ec","updated":"2019-05-01 18:54:45.000000000","message":"Likely debug residue - should be removed. -1 to make it stick through a rebase.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        vhd_image \u003d \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027"},{"line_number":202,"context_line":"        raw_image \u003d \u0027a440c04b-79fa-479c-bed1-0b816eaec379\u0027"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":205,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":206,"context_line":"        created_server \u003d self.api.post_server({\"server\": server})"},{"line_number":207,"context_line":"        created_server_id \u003d created_server[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_21058b46","line":204,"updated":"2019-05-01 18:54:45.000000000","message":"What are you trying to do in this test? Comments would help.\n\nIt looks like you\u0027re trying to create a server with a vhd image and a server with a raw image, and since the fake compute only reports supporting raw, the vhd image request should fail and the server should go to error due to NoValidHost, right?","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ba018d92a8c3cdf2c8823197f67151861999118b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        vhd_image \u003d \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027"},{"line_number":202,"context_line":"        raw_image \u003d \u0027a440c04b-79fa-479c-bed1-0b816eaec379\u0027"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":205,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":206,"context_line":"        created_server \u003d self.api.post_server({\"server\": server})"},{"line_number":207,"context_line":"        created_server_id \u003d created_server[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_55963940","line":204,"in_reply_to":"ffb9cba7_21058b46","updated":"2019-05-01 23:21:33.000000000","message":"Hmm I mangled this test before upload so its all manner of not right. I blame summit brain.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":205,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":206,"context_line":"        created_server \u003d self.api.post_server({\"server\": server})"},{"line_number":207,"context_line":"        created_server_id \u003d created_server[\u0027id\u0027]"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        server \u003d self._build_minimal_create_server_request("}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_e1fa1341","line":206,"updated":"2019-05-01 18:54:45.000000000","message":"Shouldn\u0027t this fail with NoValidHost because the fake driver doesn\u0027t support vhd?","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        created_server \u003d self.api.post_server({\"server\": server})"},{"line_number":207,"context_line":"        created_server_id \u003d created_server[\u0027id\u0027]"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":210,"context_line":"            image_uuid\u003draw_image)"},{"line_number":211,"context_line":"        found_server \u003d self.api.get_server(created_server_id)"},{"line_number":212,"context_line":"        self.assertEqual(\u0027BUILD\u0027, found_server[\u0027status\u0027])"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_c1f6ef63","line":210,"range":{"start_line":209,"start_character":8,"end_line":210,"end_character":33},"updated":"2019-05-01 18:54:45.000000000","message":"This isn\u0027t used, right?","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ad6f53d8d792da768e46652da42c3fee5d7fe32","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":204,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":205,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":206,"context_line":"        errored_server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":207,"context_line":"        self.assertEqual(\u0027ERROR\u0027, errored_server[\u0027status\u0027])"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_318582ae","line":205,"range":{"start_line":205,"start_character":8,"end_line":205,"end_character":57},"updated":"2019-05-03 20:52:40.000000000","message":"This functional test is using the CastAsCall fixture as far as I know so I\u0027m surprised this doesn\u0027t result in a 500 error response for the NoValidHost.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8b8e084956872ba8018c40856bf56a756d420638","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":204,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":205,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":206,"context_line":"        errored_server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":207,"context_line":"        self.assertEqual(\u0027ERROR\u0027, errored_server[\u0027status\u0027])"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_96d0df52","line":205,"range":{"start_line":205,"start_character":8,"end_line":205,"end_character":57},"in_reply_to":"dfbec78f_318582ae","updated":"2019-05-03 23:55:08.000000000","message":"I\u0027m definitely getting the failure expected (grabbed test logging from a failed run) and I\u0027m definitely not exploding here, even with wait-for-state.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ad6f53d8d792da768e46652da42c3fee5d7fe32","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":204,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":205,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":206,"context_line":"        errored_server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":207,"context_line":"        self.assertEqual(\u0027ERROR\u0027, errored_server[\u0027status\u0027])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":210,"context_line":"            image_uuid\u003draw_image)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_f18e0acf","line":207,"range":{"start_line":206,"start_character":8,"end_line":207,"end_character":59},"updated":"2019-05-03 20:52:40.000000000","message":"nit: we could assert the failure is what we expect by checking the fault message on the error\u0027ed service is for a no valid host.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"769dbe0bc89255ce06c881e1cf9df886f4a8664e","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":204,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":205,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":206,"context_line":"        errored_server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":207,"context_line":"        self.assertEqual(\u0027ERROR\u0027, errored_server[\u0027status\u0027])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":210,"context_line":"            image_uuid\u003draw_image)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_4f7ac624","line":207,"range":{"start_line":206,"start_character":8,"end_line":207,"end_character":59},"in_reply_to":"dfbec78f_16e38f35","updated":"2019-05-04 15:07:11.000000000","message":"It\u0027s a check against some future regression that causes us to get an ERROR for some other reason.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8b8e084956872ba8018c40856bf56a756d420638","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":204,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":205,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":206,"context_line":"        errored_server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":207,"context_line":"        self.assertEqual(\u0027ERROR\u0027, errored_server[\u0027status\u0027])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":210,"context_line":"            image_uuid\u003draw_image)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_16e38f35","line":207,"range":{"start_line":206,"start_character":8,"end_line":207,"end_character":59},"in_reply_to":"dfbec78f_f18e0acf","updated":"2019-05-03 23:55:08.000000000","message":"Seems like a pretty meaningless check if we do the same thing below and it succeeds, but okay.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ad6f53d8d792da768e46652da42c3fee5d7fe32","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":210,"context_line":"            image_uuid\u003draw_image)"},{"line_number":211,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":212,"context_line":"        created_server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":213,"context_line":"        self.assertEqual(\u0027BUILD\u0027, created_server[\u0027status\u0027])"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _test_create_server_with_error_with_retries(self):"},{"line_number":216,"context_line":"        # Create a server which will enter error state."}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_f1a7ea4e","line":213,"range":{"start_line":212,"start_character":8,"end_line":213,"end_character":59},"updated":"2019-05-03 20:52:40.000000000","message":"Same as above re CastAsCall, I\u0027m surprised this isn\u0027t racy or just returned as ACTIVE. Could use _wait_for_state_change here...","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ad6f53d8d792da768e46652da42c3fee5d7fe32","unresolved":false,"context_lines":[{"line_number":4429,"context_line":"            expected_usage,"},{"line_number":4430,"context_line":"            self.admin_api.get_hypervisor_stats()[\u0027local_gb_used\u0027])"},{"line_number":4431,"context_line":""},{"line_number":4432,"context_line":"    def test_volume_backed_image_type_filter(self):"},{"line_number":4433,"context_line":"        # Enable the image type support filter and ensure that a"},{"line_number":4434,"context_line":"        # non-image-having volume-backed server can still boot"},{"line_number":4435,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_cc1b2971","line":4432,"updated":"2019-05-03 20:52:40.000000000","message":"OK so this uses nova_fixtures.CinderFixtureNewAttachFlow.IMAGE_BACKED_VOL which maps to:\n\nhttps://github.com/openstack/nova/blob/09832946a3c70addc98e73882757dff1ad8c3101/nova/tests/fixtures.py#L1812\n\nwhich on a GET of that volume should return this:\n\nhttps://github.com/openstack/nova/blob/09832946a3c70addc98e73882757dff1ad8c3101/nova/tests/fixtures.py#L1914\n\nAnd that\u0027s why you didn\u0027t see the disk_format in the request_spec.image when testing this, but as that comment says, there should be more stuff in there, one of which is disk_format:\n\nhttp://logs.openstack.org/85/656885/3/check/nova-next/90856fb/logs/tempest.txt.gz#_2019-05-02_23_31_26_645\n\n\"volume_image_metadata\": {\"image_id\": \"200fddd6-70e1-4d38-bb6f-8fef8b5f4c9f\", \"image_name\": \"cirros-0.4.0-x86_64-disk\", \"checksum\": \"443b7623e27ecf03dc9e01ee93f67afe\", \"container_format\": \"bare\", \"disk_format\": \"qcow2\", \"min_disk\": \"0\", \"min_ram\": \"0\", \"size\": \"12716032\"}\n\nAnyway, we should be safe and handle disk_format\u003dNone for some reason in the volume_image_metadata (if we change how volume-backed snapshots happen in the future or something).","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"769dbe0bc89255ce06c881e1cf9df886f4a8664e","unresolved":false,"context_lines":[{"line_number":4429,"context_line":"            expected_usage,"},{"line_number":4430,"context_line":"            self.admin_api.get_hypervisor_stats()[\u0027local_gb_used\u0027])"},{"line_number":4431,"context_line":""},{"line_number":4432,"context_line":"    def test_volume_backed_image_type_filter(self):"},{"line_number":4433,"context_line":"        # Enable the image type support filter and ensure that a"},{"line_number":4434,"context_line":"        # non-image-having volume-backed server can still boot"},{"line_number":4435,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_0f74ce34","line":4432,"in_reply_to":"dfbec78f_563d87b9","updated":"2019-05-04 15:07:11.000000000","message":"\u003e As noted in the other file, disk_format is not nullable.\n\nThis resolves my concern so I think we\u0027re OK then.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8b8e084956872ba8018c40856bf56a756d420638","unresolved":false,"context_lines":[{"line_number":4429,"context_line":"            expected_usage,"},{"line_number":4430,"context_line":"            self.admin_api.get_hypervisor_stats()[\u0027local_gb_used\u0027])"},{"line_number":4431,"context_line":""},{"line_number":4432,"context_line":"    def test_volume_backed_image_type_filter(self):"},{"line_number":4433,"context_line":"        # Enable the image type support filter and ensure that a"},{"line_number":4434,"context_line":"        # non-image-having volume-backed server can still boot"},{"line_number":4435,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_563d87b9","line":4432,"in_reply_to":"dfbec78f_cc1b2971","updated":"2019-05-03 23:55:08.000000000","message":"As noted in the other file, disk_format is not nullable.\n\nI thought from your previous comments you just wanted a volume-backed instance functional test (which I think this is) and that the volume snapshot case would have to be done by tempest in nova-next. If you\u0027re saying that the disk_format being unset on the image_meta is not realistic and because of the fixtures, then I\u0027m not sure this test really adds anything that the unit test isn\u0027t covering.\n\nBut, if you\u0027re asking for something else here, you\u0027re probably going to spell it out while speaking really slowly as I\u0027m too dumb to pick it out.","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"09058118494200062ee5baac98904096c84cef1b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"            image_uuid\u003dvhd_image)"},{"line_number":205,"context_line":"        server \u003d self.api.post_server({\u0027server\u0027: server})"},{"line_number":206,"context_line":"        server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":207,"context_line":"        errored_server \u003d self._wait_for_state_change(server, server[\u0027status\u0027])"},{"line_number":208,"context_line":"        self.assertEqual(\u0027ERROR\u0027, errored_server[\u0027status\u0027])"},{"line_number":209,"context_line":"        self.assertIn(\u0027No valid host\u0027, errored_server[\u0027fault\u0027][\u0027message\u0027])"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_257693da","line":207,"updated":"2019-05-04 18:04:19.000000000","message":"Feels like this could be racy but we\u0027ll see.","commit_id":"85546011e980e1053acc6a68f8927c4015988209"}],"nova/tests/unit/scheduler/test_request_filter.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ad6f53d8d792da768e46652da42c3fee5d7fe32","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        request_filter.require_image_type_support(self.context, reqspec)"},{"line_number":181,"context_line":"        self.assertEqual({}, reqspec.flavor.extra_specs)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def test_require_image_type_support_adds_trait(self):"},{"line_number":184,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":185,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":186,"context_line":"        reqspec \u003d objects.RequestSpec("}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_cc49e960","line":183,"range":{"start_line":183,"start_character":8,"end_line":183,"end_character":50},"updated":"2019-05-03 20:52:40.000000000","message":"This test should also assert there are no changes to the request_spec or it\u0027s flavor (obj_get_changes should be empty on both).","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ad6f53d8d792da768e46652da42c3fee5d7fe32","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        reqspec \u003d objects.RequestSpec("},{"line_number":187,"context_line":"            image\u003dobjects.ImageMeta(disk_format\u003d\u0027raw\u0027),"},{"line_number":188,"context_line":"            flavor\u003dobjects.Flavor(extra_specs\u003d{}))"},{"line_number":189,"context_line":"        # Assert that we completely skip the filter if no matching trait"},{"line_number":190,"context_line":"        request_filter.require_image_type_support(self.context, reqspec)"},{"line_number":191,"context_line":"        self.assertEqual({\u0027trait:COMPUTE_IMAGE_TYPE_RAW\u0027: \u0027required\u0027},"},{"line_number":192,"context_line":"                         reqspec.flavor.extra_specs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_ec314dee","line":189,"range":{"start_line":189,"start_character":8,"end_line":189,"end_character":72},"updated":"2019-05-03 20:52:40.000000000","message":"copy paste failure","commit_id":"d4422a0bad0f8325fc3ad8a0d9372d75125896d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"09058118494200062ee5baac98904096c84cef1b","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        request_filter.require_image_type_support(self.context, reqspec)"},{"line_number":191,"context_line":"        self.assertEqual({\u0027trait:COMPUTE_IMAGE_TYPE_RAW\u0027: \u0027required\u0027},"},{"line_number":192,"context_line":"                         reqspec.flavor.extra_specs)"},{"line_number":193,"context_line":"        self.assertEqual(set(), reqspec.flavor.obj_what_changed())"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_a54b6385","line":193,"range":{"start_line":193,"start_character":32,"end_line":193,"end_character":39},"updated":"2019-05-04 18:04:19.000000000","message":"I guess we don\u0027t have to assert that reqspec.obj_what_changed() is also empty because even if the reqspec was dirty, the flavor wouldn\u0027t be (b/c of this assertion), so we should be OK here.","commit_id":"85546011e980e1053acc6a68f8927c4015988209"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"344f5c8fe931050c95379f291d1c2979a26cc033","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        request_filter.require_image_type_support(self.context, reqspec)"},{"line_number":162,"context_line":"        self.assertEqual({}, reqspec.flavor.extra_specs)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def test_require_image_type_support_volume_backed(self):"},{"line_number":165,"context_line":"        self.flags(query_placement_for_image_type_support\u003dTrue,"},{"line_number":166,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":167,"context_line":"        reqspec \u003d objects.RequestSpec(image\u003dobjects.ImageMeta(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_c59e72b7","line":164,"range":{"start_line":164,"start_character":8,"end_line":164,"end_character":53},"updated":"2019-05-07 15:50:02.000000000","message":"This is going to blow up because request_spec.is_bfv isn\u0027t set. The other ones will blow up as well.","commit_id":"91d377ef1dd1222c727dd178fa616e2deb25a2b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"138c8444ea72dd70bad97226048db225af99b1b1","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                   group\u003d\u0027scheduler\u0027)"},{"line_number":168,"context_line":"        reqspec \u003d objects.RequestSpec(flavor\u003dobjects.Flavor(extra_specs\u003d{}),"},{"line_number":169,"context_line":"                                      is_bfv\u003dTrue)"},{"line_number":170,"context_line":"        # Assert that we completely skip the filter if no image"},{"line_number":171,"context_line":"        request_filter.require_image_type_support(self.context, reqspec)"},{"line_number":172,"context_line":"        self.assertEqual({}, reqspec.flavor.extra_specs)"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"dfbec78f_7d35da45","line":170,"range":{"start_line":170,"start_character":8,"end_line":170,"end_character":63},"updated":"2019-05-07 20:34:30.000000000","message":"nit: this comment could be updated","commit_id":"57978de4a8ef43cd46e95e81e5d1874fdf4c69e4"}],"releasenotes/notes/image_type_request_filter-7577ded9834330b6.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ff0ae618ab3e8a10f3fdb72e1612499f38d3fd36","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    the disk_format of the image used in a given request. The"},{"line_number":6,"context_line":"    ``[scheduler]/query_placement_for_image_type_support`` config"},{"line_number":7,"context_line":"    option enables this behavior, but must not be turned on until all"},{"line_number":8,"context_line":"    computes have been upgraded to this version and are exposing image"},{"line_number":9,"context_line":"    type support traits."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ffb9cba7_218a6bbe","line":9,"range":{"start_line":8,"start_character":48,"end_line":9,"end_character":24},"updated":"2019-05-01 18:54:45.000000000","message":"How will an admin know when this is done? Should explain that a bit. It\u0027s probably as simple as saying your compute node resource providers in placement should have at least one COMPUTE_IMAGE_TYPE_* trait - and/or just that the computes have all been upgraded to Train.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fdd0577d7cbb6e6ea093447c083b72a884ef73c2","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    the disk_format of the image used in a given request. The"},{"line_number":6,"context_line":"    ``[scheduler]/query_placement_for_image_type_support`` config"},{"line_number":7,"context_line":"    option enables this behavior, but must not be turned on until all"},{"line_number":8,"context_line":"    computes have been upgraded to this version and are exposing image"},{"line_number":9,"context_line":"    type support traits."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dfbec78f_09b5c9ee","line":9,"range":{"start_line":8,"start_character":48,"end_line":9,"end_character":24},"in_reply_to":"ffb9cba7_218a6bbe","updated":"2019-05-02 15:35:53.000000000","message":"Well, I said \"have been upgraded to this version\". I\u0027ll add a \"thus\" which might make it clear that they\u0027re related.","commit_id":"6cf7823bcb1e678a3f9ebfe5a98d98f9a4b58fd8"}]}
