)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fb18fac42a5c15cd223287f7d5a9d8271dba91cb","unresolved":false,"context_lines":[{"line_number":23,"context_line":"root_gb, the min_disk stored in the instance image system metadata"},{"line_number":24,"context_line":"is the flavor[\u0027root_gb\u0027] which could be larger than the root volume"},{"line_number":25,"context_line":"size). The giant comment is updated as a result (note how tightly"},{"line_number":26,"context_line":"coupled all of this validation code is to what calls it?). If/when"},{"line_number":27,"context_line":"we support rebuilding a volume backed server with a new image, we\u0027ll"},{"line_number":28,"context_line":"likely need to revisit this logic - or just completely bypass it for"},{"line_number":29,"context_line":"the resize case, which was probably the original intent behind passing"},{"line_number":30,"context_line":"root_bdm\u003dNone during resize in the first place."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fce034c_9960b803","line":27,"range":{"start_line":26,"start_character":59,"end_line":27,"end_character":62},"updated":"2019-04-17 04:06:39.000000000","message":"This definitely makes me nervous because I have very little confidence we\u0027ll remember to test this case when that code is added.\n\nSimilarly, if we ever need to call this during a root volume attach/detach support scenario, that could also make this weird.\n\nIt might be better to just refactor the disk checks out of that method and then pass a parameter through telling it to skip the root_bdm check or not - or be smarter about detecting when we need to do the root_bdm vs image calculation somehow. It\u0027s all pretty terrible.","commit_id":"eabf526917a1842f82288aeb30266996c6a209cc"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"db38795611faa2153b1fd373ea93209a2a19dee0","unresolved":false,"context_lines":[{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        image_meta \u003d _get_image_meta_obj(image)"},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        # Only validate values of flavor/image so the return results of"},{"line_number":682,"context_line":"        # following \u0027get\u0027 functions are not used."},{"line_number":683,"context_line":"        hardware.get_number_of_serial_ports(instance_type, image_meta)"},{"line_number":684,"context_line":"        if hardware.is_realtime_enabled(instance_type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_b437b9e3","line":681,"updated":"2019-04-17 04:18:49.000000000","message":"Maybe split this out and only call this when resizing a volume backed server to avoid the mess above.","commit_id":"eabf526917a1842f82288aeb30266996c6a209cc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"afe7af923d129fe4cb0c29029944ef51c863f327","unresolved":false,"context_lines":[{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        image_meta \u003d _get_image_meta_obj(image)"},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        # Only validate values of flavor/image so the return results of"},{"line_number":682,"context_line":"        # following \u0027get\u0027 functions are not used."},{"line_number":683,"context_line":"        hardware.get_number_of_serial_ports(instance_type, image_meta)"},{"line_number":684,"context_line":"        if hardware.is_realtime_enabled(instance_type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_e1f01b6a","line":681,"in_reply_to":"3fce034c_b437b9e3","updated":"2019-04-17 13:24:24.000000000","message":"Yeah that\u0027s probably better because the change in stein started calling this method just to get to this part:\n\nhttps://review.openstack.org/#/c/620706/32/nova/compute/api.py@3593\n\nBut didn\u0027t do any validation of the flavor before that.\n\nFor the non-volume-backed case we still likely want to call this method for the else block above to validate flavor/image disk size but for the volume-backed case the image isn\u0027t changing so we don\u0027t need to do those checks and can just validate the flavor for numa/pci.","commit_id":"eabf526917a1842f82288aeb30266996c6a209cc"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e6c17c4dd1686bd9d9241fad64efa55f11f07b58","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        :param context: A context.RequestContext"},{"line_number":573,"context_line":"        :param image: a dict representation of the image including properties,"},{"line_number":574,"context_line":"                      enforces the image status is active."},{"line_number":575,"context_line":"        :param instance_type: Flavor object"},{"line_number":576,"context_line":"        :param root_bdm: BlockDeviceMapping for root disk.  Will be None for"},{"line_number":577,"context_line":"               the resize case."}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_f0a45fbb","line":574,"range":{"start_line":574,"start_character":22,"end_line":574,"end_character":57},"updated":"2019-04-17 16:30:25.000000000","message":"this part of comment is not accurate, image activity is checked in _validate_flavor_image.","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"07eb5aa22d2b49f2abe315e66ff2dcf88c8e5756","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        :param context: A context.RequestContext"},{"line_number":573,"context_line":"        :param image: a dict representation of the image including properties,"},{"line_number":574,"context_line":"                      enforces the image status is active."},{"line_number":575,"context_line":"        :param instance_type: Flavor object"},{"line_number":576,"context_line":"        :param root_bdm: BlockDeviceMapping for root disk.  Will be None for"},{"line_number":577,"context_line":"               the resize case."}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_b086d7da","line":574,"range":{"start_line":574,"start_character":22,"end_line":574,"end_character":57},"in_reply_to":"3fce034c_d0060387","updated":"2019-04-17 16:35:23.000000000","message":"Done","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5a0f70708de0c56ad803504b34d7ac77102c0b20","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        :param context: A context.RequestContext"},{"line_number":573,"context_line":"        :param image: a dict representation of the image including properties,"},{"line_number":574,"context_line":"                      enforces the image status is active."},{"line_number":575,"context_line":"        :param instance_type: Flavor object"},{"line_number":576,"context_line":"        :param root_bdm: BlockDeviceMapping for root disk.  Will be None for"},{"line_number":577,"context_line":"               the resize case."}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_d0060387","line":574,"range":{"start_line":574,"start_character":22,"end_line":574,"end_character":57},"in_reply_to":"3fce034c_f0a45fbb","updated":"2019-04-17 16:32:33.000000000","message":"Sure, but that\u0027s your fault not mine right? :)","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e6c17c4dd1686bd9d9241fad64efa55f11f07b58","unresolved":false,"context_lines":[{"line_number":679,"context_line":"        with each other."},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        :param image: a dict representation of the image including properties,"},{"line_number":682,"context_line":"                      enforces the image status is active."},{"line_number":683,"context_line":"        :param instance_type: Flavor object"},{"line_number":684,"context_line":"        :param validate_numa: Flag to indicate whether or not to validate"},{"line_number":685,"context_line":"               the NUMA-related metadata."}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_90ab9b87","line":682,"range":{"start_line":682,"start_character":22,"end_line":682,"end_character":57},"updated":"2019-04-17 16:30:25.000000000","message":"this part of comment is not accurate, image activity is checked in _validate_flavor_image.","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"07eb5aa22d2b49f2abe315e66ff2dcf88c8e5756","unresolved":false,"context_lines":[{"line_number":679,"context_line":"        with each other."},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        :param image: a dict representation of the image including properties,"},{"line_number":682,"context_line":"                      enforces the image status is active."},{"line_number":683,"context_line":"        :param instance_type: Flavor object"},{"line_number":684,"context_line":"        :param validate_numa: Flag to indicate whether or not to validate"},{"line_number":685,"context_line":"               the NUMA-related metadata."}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_506d3330","line":682,"range":{"start_line":682,"start_character":22,"end_line":682,"end_character":57},"in_reply_to":"3fce034c_50fa1375","updated":"2019-04-17 16:35:23.000000000","message":"Done","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5a0f70708de0c56ad803504b34d7ac77102c0b20","unresolved":false,"context_lines":[{"line_number":679,"context_line":"        with each other."},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        :param image: a dict representation of the image including properties,"},{"line_number":682,"context_line":"                      enforces the image status is active."},{"line_number":683,"context_line":"        :param instance_type: Flavor object"},{"line_number":684,"context_line":"        :param validate_numa: Flag to indicate whether or not to validate"},{"line_number":685,"context_line":"               the NUMA-related metadata."}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_50fa1375","line":682,"range":{"start_line":682,"start_character":22,"end_line":682,"end_character":57},"in_reply_to":"3fce034c_90ab9b87","updated":"2019-04-17 16:32:33.000000000","message":"Yeah I can remove that (copy/paste).","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"e6c17c4dd1686bd9d9241fad64efa55f11f07b58","unresolved":false,"context_lines":[{"line_number":3636,"context_line":"        else:"},{"line_number":3637,"context_line":"            new_instance_type \u003d flavors.get_flavor_by_flavor_id("},{"line_number":3638,"context_line":"                    flavor_id, read_deleted\u003d\"no\")"},{"line_number":3639,"context_line":"            # Check to see if we\u0027re resizing to a zero-disk flavor which is"},{"line_number":3640,"context_line":"            # only supported with volume-backed servers."},{"line_number":3641,"context_line":"            if (new_instance_type.get(\u0027root_gb\u0027) \u003d\u003d 0 and"},{"line_number":3642,"context_line":"                    current_instance_type.get(\u0027root_gb\u0027) !\u003d 0):"},{"line_number":3643,"context_line":"                volume_backed \u003d compute_utils.is_volume_backed_instance("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_f0e0dfce","line":3640,"range":{"start_line":3639,"start_character":14,"end_line":3640,"end_character":56},"updated":"2019-04-17 16:30:25.000000000","message":"I think the bug reported by Wendy applies to resizing to any smaller flavor, not just a zero-disk flavor.","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5a0f70708de0c56ad803504b34d7ac77102c0b20","unresolved":false,"context_lines":[{"line_number":3636,"context_line":"        else:"},{"line_number":3637,"context_line":"            new_instance_type \u003d flavors.get_flavor_by_flavor_id("},{"line_number":3638,"context_line":"                    flavor_id, read_deleted\u003d\"no\")"},{"line_number":3639,"context_line":"            # Check to see if we\u0027re resizing to a zero-disk flavor which is"},{"line_number":3640,"context_line":"            # only supported with volume-backed servers."},{"line_number":3641,"context_line":"            if (new_instance_type.get(\u0027root_gb\u0027) \u003d\u003d 0 and"},{"line_number":3642,"context_line":"                    current_instance_type.get(\u0027root_gb\u0027) !\u003d 0):"},{"line_number":3643,"context_line":"                volume_backed \u003d compute_utils.is_volume_backed_instance("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_b038173d","line":3640,"range":{"start_line":3639,"start_character":14,"end_line":3640,"end_character":56},"in_reply_to":"3fce034c_f0e0dfce","updated":"2019-04-17 16:32:33.000000000","message":"I know, and this isn\u0027t the thing that fails in the functional test nor what I\u0027m trying to fix, I just added this comment for clarity on what this block is doing since it\u0027s kind of a conditional mess and while I was updating it to save off the volume_backed variable I figured I\u0027d document the code.","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"bee2c613e5e828e5b782a4ec6e0c67ea0af7d4e2","unresolved":false,"context_lines":[{"line_number":3636,"context_line":"        else:"},{"line_number":3637,"context_line":"            new_instance_type \u003d flavors.get_flavor_by_flavor_id("},{"line_number":3638,"context_line":"                    flavor_id, read_deleted\u003d\"no\")"},{"line_number":3639,"context_line":"            # Check to see if we\u0027re resizing to a zero-disk flavor which is"},{"line_number":3640,"context_line":"            # only supported with volume-backed servers."},{"line_number":3641,"context_line":"            if (new_instance_type.get(\u0027root_gb\u0027) \u003d\u003d 0 and"},{"line_number":3642,"context_line":"                    current_instance_type.get(\u0027root_gb\u0027) !\u003d 0):"},{"line_number":3643,"context_line":"                volume_backed \u003d compute_utils.is_volume_backed_instance("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_10f48b85","line":3640,"range":{"start_line":3639,"start_character":14,"end_line":3640,"end_character":56},"in_reply_to":"3fce034c_f0e0dfce","updated":"2019-04-17 16:32:06.000000000","message":"never mind, this is just a special case and the more general one is handled below.","commit_id":"4713b49c8646501957a49b8a7f2e13521a2e0544"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b74cff924b9f975909043df851377409f08d1092","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        image_min_disk \u003d int(image.get(\u0027min_disk\u0027) or 0) * units.Gi"},{"line_number":601,"context_line":"        image_size \u003d int(image.get(\u0027size\u0027) or 0)"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        # Target disk is a volume. Don\u0027t check flavor disk size because it"},{"line_number":604,"context_line":"        # doesn\u0027t make sense, and check min_disk against the volume size."},{"line_number":605,"context_line":"        if (root_bdm is not None and root_bdm.is_volume):"},{"line_number":606,"context_line":"            # There are 2 possibilities here: either the target volume already"},{"line_number":607,"context_line":"            # exists, or it doesn\u0027t, in which case the bdm will contain the"},{"line_number":608,"context_line":"            # intended volume size."},{"line_number":609,"context_line":"            #"},{"line_number":610,"context_line":"            # Cinder does its own check against min_disk, so if the target"},{"line_number":611,"context_line":"            # volume already exists this has already been done and we don\u0027t"},{"line_number":612,"context_line":"            # need to check it again here. In this case, volume_size may not be"},{"line_number":613,"context_line":"            # set on the bdm."},{"line_number":614,"context_line":"            #"},{"line_number":615,"context_line":"            # If we\u0027re going to create the volume, the bdm will contain"},{"line_number":616,"context_line":"            # volume_size. Therefore we should check it if it exists. This will"},{"line_number":617,"context_line":"            # still be checked again by cinder when the volume is created, but"},{"line_number":618,"context_line":"            # that will not happen until the request reaches a host. By"},{"line_number":619,"context_line":"            # checking it here, the user gets an immediate and useful failure"},{"line_number":620,"context_line":"            # indication."},{"line_number":621,"context_line":"            #"},{"line_number":622,"context_line":"            # The third possibility is that we have failed to consider"},{"line_number":623,"context_line":"            # something, and there are actually more than 2 possibilities. In"},{"line_number":624,"context_line":"            # this case cinder will still do the check at volume creation time."},{"line_number":625,"context_line":"            # The behaviour will still be correct, but the user will not get an"},{"line_number":626,"context_line":"            # immediate failure from the api, and will instead have to"},{"line_number":627,"context_line":"            # determine why the instance is in an error state with a task of"},{"line_number":628,"context_line":"            # block_device_mapping."},{"line_number":629,"context_line":"            #"},{"line_number":630,"context_line":"            # We could reasonably refactor this check into _validate_bdm at"},{"line_number":631,"context_line":"            # some future date, as the various size logic is already split out"},{"line_number":632,"context_line":"            # in there."},{"line_number":633,"context_line":"            dest_size \u003d root_bdm.volume_size"},{"line_number":634,"context_line":"            if dest_size is not None:"},{"line_number":635,"context_line":"                dest_size *\u003d units.Gi"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"                if image_min_disk \u003e dest_size:"},{"line_number":638,"context_line":"                    raise exception.VolumeSmallerThanMinDisk("},{"line_number":639,"context_line":"                        volume_size\u003ddest_size, image_min_disk\u003dimage_min_disk)"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"        # Target disk is a local disk whose size is taken from the flavor"},{"line_number":642,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffb9cba7_09aa73d3","line":639,"range":{"start_line":603,"start_character":0,"end_line":639,"end_character":77},"updated":"2019-04-23 17:48:37.000000000","message":"so is this whole block of code irrelevant now if _validate_flavor_image_nostatus() is no longer going to be called for volume-backed instances?","commit_id":"8aae3e39e58a05ed50b891aeae261641f544ad1f"}]}
