)]}'
{"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a192b1dd61968ca60772b76c38af08e0409aff4","unresolved":false,"context_lines":[{"line_number":945,"context_line":"                exception.FlavorDiskTooSmall,"},{"line_number":946,"context_line":"                exception.FlavorMemoryTooSmall,"},{"line_number":947,"context_line":"                exception.InvalidMetadata,"},{"line_number":948,"context_line":"                exception.CinderConnectionFailed,"},{"line_number":949,"context_line":"                exception.InvalidBDMVolume,"},{"line_number":950,"context_line":"                exception.ImageUnacceptable,"},{"line_number":951,"context_line":"                exception.AutoDiskConfigDisabledByImage) as error:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_6abeb8ff","line":948,"range":{"start_line":948,"start_character":26,"end_line":948,"end_character":48},"updated":"2017-11-18 21:28:26.000000000","message":"I don\u0027t think we should handle this here and return 400, it\u0027s an internal error, I\u0027d just let it bubble up as a 500.","commit_id":"7c95c300d7fe39fde2386cc8c3b1ae2cb6376e16"}],"nova/compute/api.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"057067f00f76f677b506a5ab77894e829f541387","unresolved":false,"context_lines":[{"line_number":2888,"context_line":"        # server because the compute doesn\u0027t support that changing the image"},{"line_number":2889,"context_line":"        # in the root disk of a volume-backed server, so we need to just fail"},{"line_number":2890,"context_line":"        # fast."},{"line_number":2891,"context_line":"        if (instance.image_ref !\u003d image_href and"},{"line_number":2892,"context_line":"                compute_utils.is_volume_backed_instance("},{"line_number":2893,"context_line":"                    context, instance, bdms)):"},{"line_number":2894,"context_line":"            msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f485f77_eac3f687","line":2891,"updated":"2017-11-16 17:41:34.000000000","message":"instance.image_ref is actually empty in the case of boot-from-volume, so this will result in disallowing all rebuilds for boot-from-volume instances.  I think we need to look at the metadata on the volume to find the image.","commit_id":"a6c656ddbe7480c435950d4fa41b3e2bb21ecc62"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"35bdb78146febac552ee19383786a6f97b2c6667","unresolved":false,"context_lines":[{"line_number":2852,"context_line":"    def rebuild(self, context, instance, image_href, admin_password,"},{"line_number":2853,"context_line":"                files_to_inject\u003dNone, **kwargs):"},{"line_number":2854,"context_line":"        \"\"\"Rebuild the given instance with the provided attributes.\"\"\""},{"line_number":2855,"context_line":"        orig_image_ref \u003d instance.image_ref or \u0027\u0027"},{"line_number":2856,"context_line":"        files_to_inject \u003d files_to_inject or []"},{"line_number":2857,"context_line":"        metadata \u003d kwargs.get(\u0027metadata\u0027, {})"},{"line_number":2858,"context_line":"        preserve_ephemeral \u003d kwargs.get(\u0027preserve_ephemeral\u0027, False)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f485f77_93bfffa8","line":2855,"updated":"2017-11-17 18:07:13.000000000","message":"To solve bug 1732947 we could use \"orig_image_ref \u003d instance.image_ref or vol_image_ref or \u0027\u0027\" and move it down to somewhere that vol_image_ref is available but before we overwrite instance.image_ref.","commit_id":"bf8133f5402d9dc3fca117d32b1ea35594e0c150"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"35bdb78146febac552ee19383786a6f97b2c6667","unresolved":false,"context_lines":[{"line_number":2948,"context_line":""},{"line_number":2949,"context_line":"        instance.task_state \u003d task_states.REBUILDING"},{"line_number":2950,"context_line":"        if not is_volume_backed:"},{"line_number":2951,"context_line":"            instance.image_ref \u003d image_href"},{"line_number":2952,"context_line":"        instance.kernel_id \u003d kernel_id or \"\""},{"line_number":2953,"context_line":"        instance.ramdisk_id \u003d ramdisk_id or \"\""},{"line_number":2954,"context_line":"        instance.progress \u003d 0"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f485f77_9367ffb7","line":2951,"updated":"2017-11-17 18:07:13.000000000","message":"do we want a comment here explaining that an empty image_ref is an API-visible signal of BFV at the moment?","commit_id":"bf8133f5402d9dc3fca117d32b1ea35594e0c150"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a192b1dd61968ca60772b76c38af08e0409aff4","unresolved":false,"context_lines":[{"line_number":2888,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2889,"context_line":"        # server.  The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For BFV instance.image_ref is empty, so we need to query the"},{"line_number":2894,"context_line":"            # image from the volume."}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_6ae59837","line":2891,"range":{"start_line":2891,"start_character":27,"end_line":2891,"end_character":35},"updated":"2017-11-18 21:28:26.000000000","message":"This can be None.","commit_id":"7c95c300d7fe39fde2386cc8c3b1ae2cb6376e16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a192b1dd61968ca60772b76c38af08e0409aff4","unresolved":false,"context_lines":[{"line_number":2895,"context_line":"            volume_id \u003d root_bdm.get(\u0027volume_id\u0027)"},{"line_number":2896,"context_line":"            try:"},{"line_number":2897,"context_line":"                volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2898,"context_line":"            except exception.CinderConnectionFailed:"},{"line_number":2899,"context_line":"                raise"},{"line_number":2900,"context_line":"            except Exception:"},{"line_number":2901,"context_line":"                raise exception.InvalidBDMVolume(id\u003dvolume_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_2a3a0098","line":2898,"updated":"2017-11-18 21:28:26.000000000","message":"I don\u0027t think we should handle this, just let it 500.","commit_id":"7c95c300d7fe39fde2386cc8c3b1ae2cb6376e16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a192b1dd61968ca60772b76c38af08e0409aff4","unresolved":false,"context_lines":[{"line_number":2897,"context_line":"                volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2898,"context_line":"            except exception.CinderConnectionFailed:"},{"line_number":2899,"context_line":"                raise"},{"line_number":2900,"context_line":"            except Exception:"},{"line_number":2901,"context_line":"                raise exception.InvalidBDMVolume(id\u003dvolume_id)"},{"line_number":2902,"context_line":""},{"line_number":2903,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":2904,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_0a3d048e","line":2901,"range":{"start_line":2900,"start_character":12,"end_line":2901,"end_character":62},"updated":"2017-11-18 21:28:26.000000000","message":"Not sure about this, it\u0027s going to result in a 400 for the user, and they aren\u0027t requesting anything about a volume_id in here, so it seems wrong to tell them they made a BadRequest, it\u0027s really a 500 probably.","commit_id":"7c95c300d7fe39fde2386cc8c3b1ae2cb6376e16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a192b1dd61968ca60772b76c38af08e0409aff4","unresolved":false,"context_lines":[{"line_number":2903,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":2904,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"},{"line_number":2905,"context_line":"            if vol_image_ref \u003d\u003d image_href:"},{"line_number":2906,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2907,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2908,"context_line":"            else:"},{"line_number":2909,"context_line":"                msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_6a5358e3","line":2906,"updated":"2017-11-18 21:28:26.000000000","message":"Yup, this is the fix for bug 1732947. We can rebase on top of https://review.openstack.org/#/c/521200/ and verify the fix.\n\nWe need to decouple this from the part below which raises ImageUnacceptable because we need to backport the fix for bug 1732947.","commit_id":"7c95c300d7fe39fde2386cc8c3b1ae2cb6376e16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a192b1dd61968ca60772b76c38af08e0409aff4","unresolved":false,"context_lines":[{"line_number":2910,"context_line":"                        \u0027volume-backed server.\u0027)"},{"line_number":2911,"context_line":"                raise exception.ImageUnacceptable(image_id\u003dimage_href, reason\u003dmsg)"},{"line_number":2912,"context_line":""},{"line_number":2913,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, image,"},{"line_number":2914,"context_line":"                flavor, metadata, files_to_inject, root_bdm)"},{"line_number":2915,"context_line":""},{"line_number":2916,"context_line":"        kernel_id, ramdisk_id \u003d self._handle_kernel_and_ramdisk("}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_2a6320b4","line":2913,"range":{"start_line":2913,"start_character":13,"end_line":2913,"end_character":43},"updated":"2017-11-18 21:28:26.000000000","message":"We could probably move all of this validation code into this method, which is doing checks/validation for rebuild. All we need is the context, root_bdm and image_id, which we have here.","commit_id":"7c95c300d7fe39fde2386cc8c3b1ae2cb6376e16"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a192b1dd61968ca60772b76c38af08e0409aff4","unresolved":false,"context_lines":[{"line_number":2949,"context_line":"        instance.update(options_from_image)"},{"line_number":2950,"context_line":""},{"line_number":2951,"context_line":"        instance.task_state \u003d task_states.REBUILDING"},{"line_number":2952,"context_line":"        # An empty instance.image_ref is currently used as an indication"},{"line_number":2953,"context_line":"        # of BFV.  Preserve that over a rebuild to not break users."},{"line_number":2954,"context_line":"        if not is_volume_backed:"},{"line_number":2955,"context_line":"            instance.image_ref \u003d image_href"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_ea5868fa","line":2952,"updated":"2017-11-18 21:28:26.000000000","message":"We\u0027ll want to work this assertion into https://review.openstack.org/#/c/521200/.","commit_id":"7c95c300d7fe39fde2386cc8c3b1ae2cb6376e16"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5cd33e19d5ebb86a3ea5cd29cf21c93d3de0d43e","unresolved":false,"context_lines":[{"line_number":2888,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_30aecae7","line":2891,"range":{"start_line":2891,"start_character":36,"end_line":2891,"end_character":47},"updated":"2017-11-20 15:17:59.000000000","message":"is the \"is not None\" part just to make all the unit tests still work, or are there valid \"real\" scenarios where root_bdm would be None?","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"304eaa08d8c844c66f5794a013032a111271f560","unresolved":false,"context_lines":[{"line_number":2888,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_30cfaa80","line":2891,"range":{"start_line":2891,"start_character":36,"end_line":2891,"end_character":47},"in_reply_to":"ff82abbf_30aecae7","updated":"2017-11-20 15:26:38.000000000","message":"There is no root BDM is there are no volumes attached to the instance.","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5f581c1b737146dfb2cc165977e6f65719df9c0f","unresolved":false,"context_lines":[{"line_number":2888,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_72c19654","line":2891,"range":{"start_line":2891,"start_character":36,"end_line":2891,"end_character":47},"in_reply_to":"ff82abbf_30cfaa80","updated":"2017-11-21 16:24:44.000000000","message":"Are you sure?  I just booted an instance from image (no volumes involved) and I see an entry in block_device_mapping with no \"volume_id\" but a boot_index of 0 (which should mean is_root() returns true).\n\n(It\u0027s possible we have a local patch modifying this, but I don\u0027t think so.)","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"607d08159784c46256138f8f9cf33abdd0b112ea","unresolved":false,"context_lines":[{"line_number":2888,"context_line":"        # Check to see if the image is changing and we have a volume-backed"},{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_c076ef70","line":2891,"range":{"start_line":2891,"start_character":36,"end_line":2891,"end_character":47},"in_reply_to":"ff82abbf_72c19654","updated":"2017-11-28 17:49:12.000000000","message":"OK sorry I was basing it on this utility method:\n\nhttps://github.com/openstack/nova/blob/42706270b92dd12456ba385ebfce38b99431940d/nova/compute/utils.py#L211","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8eb4874930838d39146a2e05278621f2030a57e3","unresolved":false,"context_lines":[{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."},{"line_number":2895,"context_line":"            volume_id \u003d root_bdm.volume_id"},{"line_number":2896,"context_line":"            volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2897,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":2898,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"},{"line_number":2899,"context_line":"            if vol_image_ref \u003d\u003d image_href:"},{"line_number":2900,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2901,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2902,"context_line":"            else:"},{"line_number":2903,"context_line":"                # Leave a breadcrumb."},{"line_number":2904,"context_line":"                LOG.debug(\u0027Requested to rebuild instance with a new image %s \u0027"},{"line_number":2905,"context_line":"                          \u0027for a volume-backed server with image %s in its \u0027"},{"line_number":2906,"context_line":"                          \u0027root volume which is not supported.\u0027, image_href,"},{"line_number":2907,"context_line":"                          vol_image_ref, instance\u003dinstance)"},{"line_number":2908,"context_line":"                msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"},{"line_number":2909,"context_line":"                        \u0027volume-backed server.\u0027)"},{"line_number":2910,"context_line":"                raise exception.ImageUnacceptable("},{"line_number":2911,"context_line":"                    image_id\u003dimage_href, reason\u003dmsg)"},{"line_number":2912,"context_line":""},{"line_number":2913,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, image,"},{"line_number":2914,"context_line":"                flavor, metadata, files_to_inject, root_bdm)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_250e98e5","line":2911,"range":{"start_line":2892,"start_character":0,"end_line":2911,"end_character":52},"updated":"2017-11-20 03:23:44.000000000","message":"Why don\u0027t fail directly if is_volume_backed is True?","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"4b9ed7f05d5ee389484f5b625f60a2381f5a513a","unresolved":false,"context_lines":[{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."},{"line_number":2895,"context_line":"            volume_id \u003d root_bdm.volume_id"},{"line_number":2896,"context_line":"            volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2897,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":2898,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"},{"line_number":2899,"context_line":"            if vol_image_ref \u003d\u003d image_href:"},{"line_number":2900,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2901,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2902,"context_line":"            else:"},{"line_number":2903,"context_line":"                # Leave a breadcrumb."},{"line_number":2904,"context_line":"                LOG.debug(\u0027Requested to rebuild instance with a new image %s \u0027"},{"line_number":2905,"context_line":"                          \u0027for a volume-backed server with image %s in its \u0027"},{"line_number":2906,"context_line":"                          \u0027root volume which is not supported.\u0027, image_href,"},{"line_number":2907,"context_line":"                          vol_image_ref, instance\u003dinstance)"},{"line_number":2908,"context_line":"                msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"},{"line_number":2909,"context_line":"                        \u0027volume-backed server.\u0027)"},{"line_number":2910,"context_line":"                raise exception.ImageUnacceptable("},{"line_number":2911,"context_line":"                    image_id\u003dimage_href, reason\u003dmsg)"},{"line_number":2912,"context_line":""},{"line_number":2913,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, image,"},{"line_number":2914,"context_line":"                flavor, metadata, files_to_inject, root_bdm)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_452cfc46","line":2911,"range":{"start_line":2892,"start_character":0,"end_line":2911,"end_character":52},"in_reply_to":"ff82abbf_250e98e5","updated":"2017-11-20 03:27:24.000000000","message":"\u003e Why don\u0027t fail directly if is_volume_backed is True?\n\nAh, I see, we may change the ssh keys.","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"10d031c6752f3f883154ef8699b44b2133d119b2","unresolved":false,"context_lines":[{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."},{"line_number":2895,"context_line":"            volume_id \u003d root_bdm.volume_id"},{"line_number":2896,"context_line":"            volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2897,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":2898,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"},{"line_number":2899,"context_line":"            if vol_image_ref \u003d\u003d image_href:"},{"line_number":2900,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2901,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2902,"context_line":"            else:"},{"line_number":2903,"context_line":"                # Leave a breadcrumb."},{"line_number":2904,"context_line":"                LOG.debug(\u0027Requested to rebuild instance with a new image %s \u0027"},{"line_number":2905,"context_line":"                          \u0027for a volume-backed server with image %s in its \u0027"},{"line_number":2906,"context_line":"                          \u0027root volume which is not supported.\u0027, image_href,"},{"line_number":2907,"context_line":"                          vol_image_ref, instance\u003dinstance)"},{"line_number":2908,"context_line":"                msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"},{"line_number":2909,"context_line":"                        \u0027volume-backed server.\u0027)"},{"line_number":2910,"context_line":"                raise exception.ImageUnacceptable("},{"line_number":2911,"context_line":"                    image_id\u003dimage_href, reason\u003dmsg)"},{"line_number":2912,"context_line":""},{"line_number":2913,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, image,"},{"line_number":2914,"context_line":"                flavor, metadata, files_to_inject, root_bdm)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_d0d67e50","line":2911,"range":{"start_line":2892,"start_character":0,"end_line":2911,"end_character":52},"in_reply_to":"ff82abbf_250e98e5","updated":"2017-11-20 15:19:16.000000000","message":"It\u0027s still valid to rebuild a boot-from-volume instance...it updates/refreshes other things other than just the image.","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ac754f4152cc4fe3d974ba666d80f5061e926f19","unresolved":false,"context_lines":[{"line_number":2889,"context_line":"        # server. The compute doesn\u0027t support changing the image in the"},{"line_number":2890,"context_line":"        # root disk of a volume-backed server, so we need to just fail fast."},{"line_number":2891,"context_line":"        is_volume_backed \u003d root_bdm is not None and root_bdm.is_volume"},{"line_number":2892,"context_line":"        if is_volume_backed:"},{"line_number":2893,"context_line":"            # For boot from volume, instance.image_ref is empty, so we need to"},{"line_number":2894,"context_line":"            # query the image from the volume."},{"line_number":2895,"context_line":"            volume_id \u003d root_bdm.volume_id"},{"line_number":2896,"context_line":"            volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2897,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":2898,"context_line":"            vol_image_ref \u003d volume_image_metadata.get(\u0027image_id\u0027)"},{"line_number":2899,"context_line":"            if vol_image_ref \u003d\u003d image_href:"},{"line_number":2900,"context_line":"                # Store this for later to skip calling the scheduler."},{"line_number":2901,"context_line":"                orig_image_ref \u003d vol_image_ref"},{"line_number":2902,"context_line":"            else:"},{"line_number":2903,"context_line":"                # Leave a breadcrumb."},{"line_number":2904,"context_line":"                LOG.debug(\u0027Requested to rebuild instance with a new image %s \u0027"},{"line_number":2905,"context_line":"                          \u0027for a volume-backed server with image %s in its \u0027"},{"line_number":2906,"context_line":"                          \u0027root volume which is not supported.\u0027, image_href,"},{"line_number":2907,"context_line":"                          vol_image_ref, instance\u003dinstance)"},{"line_number":2908,"context_line":"                msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"},{"line_number":2909,"context_line":"                        \u0027volume-backed server.\u0027)"},{"line_number":2910,"context_line":"                raise exception.ImageUnacceptable("},{"line_number":2911,"context_line":"                    image_id\u003dimage_href, reason\u003dmsg)"},{"line_number":2912,"context_line":""},{"line_number":2913,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, image,"},{"line_number":2914,"context_line":"                flavor, metadata, files_to_inject, root_bdm)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_b393c74f","line":2911,"range":{"start_line":2892,"start_character":0,"end_line":2911,"end_character":52},"in_reply_to":"ff82abbf_452cfc46","updated":"2017-11-20 14:18:33.000000000","message":"No, we don\u0027t save the keypairs until later when instance.save() is called. We only fail for volume-backed instances if the underlying image is not the same as what the user is requesting.","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"382ba1dbc11a662f3b9fdccb3cea5d8a3e5ddb66","unresolved":false,"context_lines":[{"line_number":2951,"context_line":"        instance.task_state \u003d task_states.REBUILDING"},{"line_number":2952,"context_line":"        # An empty instance.image_ref is currently used as an indication"},{"line_number":2953,"context_line":"        # of BFV.  Preserve that over a rebuild to not break users."},{"line_number":2954,"context_line":"        if not is_volume_backed:"},{"line_number":2955,"context_line":"            instance.image_ref \u003d image_href"},{"line_number":2956,"context_line":"        instance.kernel_id \u003d kernel_id or \"\""},{"line_number":2957,"context_line":"        instance.ramdisk_id \u003d ramdisk_id or \"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_53b11be1","line":2954,"updated":"2017-11-20 14:19:57.000000000","message":"We might want to consider pulling this out into it\u0027s own separate patch since it\u0027s arguably a different bug which could be backported separately.","commit_id":"af6d9a3cddd1afda4a74b8654dc916f6365b13f3"}]}
