)]}'
{"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1939a22c319004d22258d780036037a7708a505e","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        if generating:"},{"line_number":576,"context_line":"            if not self.exists():"},{"line_number":577,"context_line":"                # Generating image in place"},{"line_number":578,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":579,"context_line":"        elif CONF.image_cache.disable_cache_of_images_not_used_for_backing:"},{"line_number":580,"context_line":"            if not self.exists():"},{"line_number":581,"context_line":"                # Prepare (e.g. fetch) image in place"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_eb2ce49a","line":578,"range":{"start_line":578,"start_character":14,"end_line":578,"end_character":67},"updated":"2020-05-12 16:22:42.000000000","message":"1# so this is common actoss the first two brances","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        if generating:"},{"line_number":576,"context_line":"            if not self.exists():"},{"line_number":577,"context_line":"                # Generating image in place"},{"line_number":578,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":579,"context_line":"        elif CONF.image_cache.disable_cache_of_images_not_used_for_backing:"},{"line_number":580,"context_line":"            if not self.exists():"},{"line_number":581,"context_line":"                # Prepare (e.g. fetch) image in place"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_cc49288c","line":578,"range":{"start_line":578,"start_character":14,"end_line":578,"end_character":67},"in_reply_to":"ff570b3c_eb2ce49a","updated":"2020-05-13 08:28:41.000000000","message":"generating means that an empty disk is being created instead of using an image from glance.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1939a22c319004d22258d780036037a7708a505e","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        elif CONF.image_cache.disable_cache_of_images_not_used_for_backing:"},{"line_number":580,"context_line":"            if not self.exists():"},{"line_number":581,"context_line":"                # Prepare (e.g. fetch) image in place"},{"line_number":582,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"                # Resize the image"},{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_6b3d74ba","line":582,"range":{"start_line":582,"start_character":10,"end_line":582,"end_character":67},"updated":"2020-05-12 16:22:42.000000000","message":"#3 so here we prepare teh image at the target location","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        elif CONF.image_cache.disable_cache_of_images_not_used_for_backing:"},{"line_number":580,"context_line":"            if not self.exists():"},{"line_number":581,"context_line":"                # Prepare (e.g. fetch) image in place"},{"line_number":582,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"                # Resize the image"},{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_6c2f3ca1","line":582,"range":{"start_line":582,"start_character":10,"end_line":582,"end_character":67},"in_reply_to":"ff570b3c_6b3d74ba","updated":"2020-05-13 08:28:41.000000000","message":"So here we have a glance image (generating is False) and we download it from glance but not into the \"base\" directory (i.e. the cache), as in #2, but directly into the instance directory (self.path).","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1939a22c319004d22258d780036037a7708a505e","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"                # Resize the image"},{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"},{"line_number":586,"context_line":"                image \u003d imgmodel.LocalFileImage(self.path, self.driver_format)"},{"line_number":587,"context_line":"                disk.extend(image, size)"},{"line_number":588,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_0b3798b2","line":585,"range":{"start_line":585,"start_character":14,"end_line":585,"end_character":54},"updated":"2020-05-12 16:22:42.000000000","message":"this checks if the size  of the flavor root disk is  less tehn the the image and reaises an excetion.\ni feel like we should be doing this before now.\nidealy before we do the image download\n\nthis is the defintion from 302 above\n\ndef verify_base_size(self, base, size, base_size\u003d0):\n        \"\"\"Check that the base image is not larger than size.\n           Since images can\u0027t be generally shrunk, enforce this\n           constraint taking account of virtual image size.\n        \"\"\"\n\n        # Note(pbrady): The size and min_disk parameters of a glance\n        #  image are checked against the instance size before the image\n        #  is even downloaded from glance, but currently min_disk is\n        #  adjustable and doesn\u0027t currently account for virtual disk size,\n        #  so we need this extra check here.\n        # NOTE(cfb): Having a flavor that sets the root size to 0 and having\n        #  nova effectively ignore that size and use the size of the\n        #  image is considered a feature at this time, not a bug.\n\n        if size is None:\n            return\n\n        if size and not base_size:\n            base_size \u003d self.get_disk_size(base)\n\n        if size \u003c base_size:\n            LOG.error(\u0027%(base)s virtual size %(base_size)s \u0027\n                      \u0027larger than flavor root disk size %(size)s\u0027,\n                      {\u0027base\u0027: base,\n                       \u0027base_size\u0027: base_size,\n                       \u0027size\u0027: size})\n            raise exception.FlavorDiskSmallerThanImage(\n                flavor_size\u003dsize, image_size\u003dbase_size)","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"                # Resize the image"},{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"},{"line_number":586,"context_line":"                image \u003d imgmodel.LocalFileImage(self.path, self.driver_format)"},{"line_number":587,"context_line":"                disk.extend(image, size)"},{"line_number":588,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_1f13445e","line":585,"range":{"start_line":585,"start_character":14,"end_line":585,"end_character":54},"in_reply_to":"ff570b3c_0b3798b2","updated":"2020-05-13 08:28:41.000000000","message":"OK, moving it before the download make sense to avoid unncessary download. In the #2 we do it after the download as the download still creates a valid cache entry even if the instance boot fails do to this check.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4fc38fe6eccc1732bf067c76ad371753d34d3b22","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"                # Resize the image"},{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"},{"line_number":586,"context_line":"                image \u003d imgmodel.LocalFileImage(self.path, self.driver_format)"},{"line_number":587,"context_line":"                disk.extend(image, size)"},{"line_number":588,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_f045da44","line":585,"range":{"start_line":585,"start_character":14,"end_line":585,"end_character":54},"in_reply_to":"ff570b3c_1f13445e","updated":"2020-05-13 16:49:23.000000000","message":"I have to retract. The verify_base_size() gets the size of the base image with qemu-img info, so it needs to have that image downloaded first.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1939a22c319004d22258d780036037a7708a505e","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":"                # Resize the image"},{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"},{"line_number":586,"context_line":"                image \u003d imgmodel.LocalFileImage(self.path, self.driver_format)"},{"line_number":587,"context_line":"                disk.extend(image, size)"},{"line_number":588,"context_line":"        else:"},{"line_number":589,"context_line":"            if not os.path.exists(base):"},{"line_number":590,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_4ba51004","line":587,"range":{"start_line":586,"start_character":14,"end_line":587,"end_character":40},"updated":"2020-05-12 16:22:42.000000000","message":"this is the  resize_image function on line 602 below.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":583,"context_line":""},{"line_number":584,"context_line":"                # Resize the image"},{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"},{"line_number":586,"context_line":"                image \u003d imgmodel.LocalFileImage(self.path, self.driver_format)"},{"line_number":587,"context_line":"                disk.extend(image, size)"},{"line_number":588,"context_line":"        else:"},{"line_number":589,"context_line":"            if not os.path.exists(base):"},{"line_number":590,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_9f28f486","line":587,"range":{"start_line":586,"start_character":14,"end_line":587,"end_character":40},"in_reply_to":"ff570b3c_4ba51004","updated":"2020-05-13 08:28:41.000000000","message":"Yepp, we need to make sure that the instance disk size is according to the flavor not according to the glance image size.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1939a22c319004d22258d780036037a7708a505e","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"},{"line_number":586,"context_line":"                image \u003d imgmodel.LocalFileImage(self.path, self.driver_format)"},{"line_number":587,"context_line":"                disk.extend(image, size)"},{"line_number":588,"context_line":"        else:"},{"line_number":589,"context_line":"            if not os.path.exists(base):"},{"line_number":590,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"            # NOTE(mikal): Update the mtime of the base file so the image"},{"line_number":593,"context_line":"            # cache manager knows it is in use."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_0b4dd871","line":590,"range":{"start_line":588,"start_character":5,"end_line":590,"end_character":62},"updated":"2020-05-12 16:22:42.000000000","message":"#2 but for the else branch we use the base paremater instead of self.path for the target.\n\nso this is where we fall back to the cached backing disk right.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":585,"context_line":"                self.verify_base_size(self.path, size)"},{"line_number":586,"context_line":"                image \u003d imgmodel.LocalFileImage(self.path, self.driver_format)"},{"line_number":587,"context_line":"                disk.extend(image, size)"},{"line_number":588,"context_line":"        else:"},{"line_number":589,"context_line":"            if not os.path.exists(base):"},{"line_number":590,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"            # NOTE(mikal): Update the mtime of the base file so the image"},{"line_number":593,"context_line":"            # cache manager knows it is in use."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_bf25f8ad","line":590,"range":{"start_line":588,"start_character":5,"end_line":590,"end_character":62},"in_reply_to":"ff570b3c_0b4dd871","updated":"2020-05-13 08:28:41.000000000","message":"This it the original case when glance image is downloaded into the cache and then copy_raw_image() call below makes a copy of it from the cache to the instance directory.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1c55369816f02041b86db753db83f6bc37196307","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                image \u003d imgmodel.LocalFileImage(target, imgmodel.FORMAT_QCOW2)"},{"line_number":642,"context_line":"                disk.extend(image, size)"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # Download the unmodified base image unless we already have a copy."},{"line_number":645,"context_line":"        if not os.path.exists(base):"},{"line_number":646,"context_line":"            prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"        # NOTE(ankit): Update the mtime of the base file so the image"},{"line_number":649,"context_line":"        # cache manager knows it is in use."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_eb7d04e8","line":646,"range":{"start_line":644,"start_character":4,"end_line":646,"end_character":58},"updated":"2020-05-12 16:48:58.000000000","message":"we would also need to modify the qcow2 backend here to not cache the image if that config option is set and basically do an early return.\n\nso something like this\n\nif CONF.image_cache.disable_cache_of_images_not_used_for_backing:\n\n    ...\n    return\nelif not os.path.exists(base):\n\n...\n\nrest of function.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4fc38fe6eccc1732bf067c76ad371753d34d3b22","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                image \u003d imgmodel.LocalFileImage(target, imgmodel.FORMAT_QCOW2)"},{"line_number":642,"context_line":"                disk.extend(image, size)"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # Download the unmodified base image unless we already have a copy."},{"line_number":645,"context_line":"        if not os.path.exists(base):"},{"line_number":646,"context_line":"            prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"        # NOTE(ankit): Update the mtime of the base file so the image"},{"line_number":649,"context_line":"        # cache manager knows it is in use."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_732f17a1","line":646,"range":{"start_line":644,"start_character":4,"end_line":646,"end_character":58},"in_reply_to":"ff570b3c_1f4b442b","updated":"2020-05-13 16:49:23.000000000","message":"We cannot just return. This code downloads the image from glance (to the cache) and at L681 it creates a instance disk in the instance directory pointing to this image in the cache as a backing store. \n\nSo instead we have to download the image directly to the instance directory.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                image \u003d imgmodel.LocalFileImage(target, imgmodel.FORMAT_QCOW2)"},{"line_number":642,"context_line":"                disk.extend(image, size)"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # Download the unmodified base image unless we already have a copy."},{"line_number":645,"context_line":"        if not os.path.exists(base):"},{"line_number":646,"context_line":"            prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"        # NOTE(ankit): Update the mtime of the base file so the image"},{"line_number":649,"context_line":"        # cache manager knows it is in use."}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_1f4b442b","line":646,"range":{"start_line":644,"start_character":4,"end_line":646,"end_character":58},"in_reply_to":"ff570b3c_eb7d04e8","updated":"2020-05-13 08:28:41.000000000","message":"I will play with this in devstack.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4fc38fe6eccc1732bf067c76ad371753d34d3b22","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        # Determine whether an existing qcow2 disk uses a legacy backing by"},{"line_number":657,"context_line":"        # actually looking at the image itself and parsing the output of the"},{"line_number":658,"context_line":"        # backing file it expects to be using."},{"line_number":659,"context_line":"        if os.path.exists(self.path):"},{"line_number":660,"context_line":"            backing_path \u003d libvirt_utils.get_disk_backing_file(self.path)"},{"line_number":661,"context_line":"            if backing_path is not None:"},{"line_number":662,"context_line":"                backing_file \u003d os.path.basename(backing_path)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_13721be4","line":659,"range":{"start_line":659,"start_character":11,"end_line":659,"end_character":36},"updated":"2020-05-13 16:49:23.000000000","message":"I think we never hit this during a new server boot as so far the disk in the instance directory was not created above. So I will ignore this \"legacy\" path in the current fix.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1c55369816f02041b86db753db83f6bc37196307","unresolved":false,"context_lines":[{"line_number":798,"context_line":"                raise exception.InternalError("},{"line_number":799,"context_line":"                    _(\"Instance disk to be encrypted but no context provided\"))"},{"line_number":800,"context_line":"        # Generate images with specified size right on volume"},{"line_number":801,"context_line":"        if generated and size:"},{"line_number":802,"context_line":"            lvm.create_volume(self.vg, self.lv,"},{"line_number":803,"context_line":"                                         size, sparse\u003dself.sparse)"},{"line_number":804,"context_line":"            with self.remove_volume_on_error(self.path):"},{"line_number":805,"context_line":"                if self.ephemeral_key_uuid is not None:"},{"line_number":806,"context_line":"                    encrypt_lvm_image()"},{"line_number":807,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":808,"context_line":"        else:"},{"line_number":809,"context_line":"            if not os.path.exists(base):"},{"line_number":810,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_4e287e33","line":807,"range":{"start_line":801,"start_character":3,"end_line":807,"end_character":67},"updated":"2020-05-12 16:48:58.000000000","message":"and here.\nisn\u0027t it greate that we have 3 different impmentation of the same thing in the same file.\n\nand ya i know they are subtely different but they are also pretty similar too.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":798,"context_line":"                raise exception.InternalError("},{"line_number":799,"context_line":"                    _(\"Instance disk to be encrypted but no context provided\"))"},{"line_number":800,"context_line":"        # Generate images with specified size right on volume"},{"line_number":801,"context_line":"        if generated and size:"},{"line_number":802,"context_line":"            lvm.create_volume(self.vg, self.lv,"},{"line_number":803,"context_line":"                                         size, sparse\u003dself.sparse)"},{"line_number":804,"context_line":"            with self.remove_volume_on_error(self.path):"},{"line_number":805,"context_line":"                if self.ephemeral_key_uuid is not None:"},{"line_number":806,"context_line":"                    encrypt_lvm_image()"},{"line_number":807,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":808,"context_line":"        else:"},{"line_number":809,"context_line":"            if not os.path.exists(base):"},{"line_number":810,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_ffd7704e","line":807,"range":{"start_line":801,"start_character":3,"end_line":807,"end_character":67},"in_reply_to":"ff570b3c_4e287e33","updated":"2020-05-13 08:28:41.000000000","message":"This is using self path as the target so I think this does not use the cache (base). The else branch is more interesting below.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":807,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":808,"context_line":"        else:"},{"line_number":809,"context_line":"            if not os.path.exists(base):"},{"line_number":810,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":811,"context_line":"            with self.remove_volume_on_error(self.path):"},{"line_number":812,"context_line":"                create_lvm_image(base, size)"},{"line_number":813,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_3fe28830","line":810,"updated":"2020-05-13 08:28:41.000000000","message":"This could be more relevant as this potentially download things to the cache (base).\n\nIs there a way to set up devstack with lvm image backend to test this out?","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1c55369816f02041b86db753db83f6bc37196307","unresolved":false,"context_lines":[{"line_number":942,"context_line":"                LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":943,"context_line":"                            \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    def create_image(self, prepare_template, base, size, *args, **kwargs):"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"        if not self.exists():"},{"line_number":948,"context_line":"            self._remove_non_raw_cache_image(base)"},{"line_number":949,"context_line":"            prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        # prepare_template() may have cloned the image into a new rbd"},{"line_number":952,"context_line":"        # image already instead of downloading it locally"},{"line_number":953,"context_line":"        if not self.exists():"},{"line_number":954,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":955,"context_line":"        self.verify_base_size(base, size)"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"        if size and size \u003e self.get_disk_size(self.rbd_name):"},{"line_number":958,"context_line":"            self.driver.resize(self.rbd_name, size)"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def resize_image(self, size):"},{"line_number":961,"context_line":"        self.driver.resize(self.rbd_name, size)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_cef00ecd","line":958,"range":{"start_line":945,"start_character":4,"end_line":958,"end_character":51},"updated":"2020-05-12 16:48:58.000000000","message":"the rbd dirver is intresting be cause ideally we should be using ceph to cache in most cases using its abilty to do cow clones at the pool level.\n\nbut we do actully cache stilll for the case where the image is comming form a differnt ceph pool.\n\nso that is a 4th implementation","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":942,"context_line":"                LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":943,"context_line":"                            \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    def create_image(self, prepare_template, base, size, *args, **kwargs):"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"        if not self.exists():"},{"line_number":948,"context_line":"            self._remove_non_raw_cache_image(base)"},{"line_number":949,"context_line":"            prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        # prepare_template() may have cloned the image into a new rbd"},{"line_number":952,"context_line":"        # image already instead of downloading it locally"},{"line_number":953,"context_line":"        if not self.exists():"},{"line_number":954,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":955,"context_line":"        self.verify_base_size(base, size)"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"        if size and size \u003e self.get_disk_size(self.rbd_name):"},{"line_number":958,"context_line":"            self.driver.resize(self.rbd_name, size)"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def resize_image(self, size):"},{"line_number":961,"context_line":"        self.driver.resize(self.rbd_name, size)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_9f847460","line":958,"range":{"start_line":945,"start_character":4,"end_line":958,"end_character":51},"in_reply_to":"ff570b3c_cef00ecd","updated":"2020-05-13 08:28:41.000000000","message":"I\u0027m not sure how ceph and rbd works. Is there a way to test this code in devstack?","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1c55369816f02041b86db753db83f6bc37196307","unresolved":false,"context_lines":[{"line_number":1158,"context_line":"        generating \u003d \u0027image_id\u0027 not in kwargs"},{"line_number":1159,"context_line":"        remove_func \u003d functools.partial(fileutils.delete_if_exists,"},{"line_number":1160,"context_line":"                                        remove\u003dshutil.rmtree)"},{"line_number":1161,"context_line":"        if generating:"},{"line_number":1162,"context_line":"            if os.path.exists(self.path):"},{"line_number":1163,"context_line":"                return"},{"line_number":1164,"context_line":"            with fileutils.remove_path_on_error(self.path, remove\u003dremove_func):"},{"line_number":1165,"context_line":"                prepare_template(target\u003dself.path, *args, **kwargs)"},{"line_number":1166,"context_line":"        else:"},{"line_number":1167,"context_line":"            # Create ploop disk from glance image"},{"line_number":1168,"context_line":"            if not os.path.exists(base):"},{"line_number":1169,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_0ebcc6da","line":1166,"range":{"start_line":1161,"start_character":7,"end_line":1166,"end_character":13},"updated":"2020-05-12 16:48:58.000000000","message":"and this is the 5th.\ni think its close to the flat one however.","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"191c1b80828ca5186226b56fed3e57694753b3eb","unresolved":false,"context_lines":[{"line_number":1166,"context_line":"        else:"},{"line_number":1167,"context_line":"            # Create ploop disk from glance image"},{"line_number":1168,"context_line":"            if not os.path.exists(base):"},{"line_number":1169,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":1170,"context_line":"            else:"},{"line_number":1171,"context_line":"                # Disk already exists in cache, just update time"},{"line_number":1172,"context_line":"                _update_utime_ignore_eacces(base)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_ffc0107f","line":1169,"updated":"2020-05-13 08:28:41.000000000","message":"I think this is the relevant code path instead of L1165. This is what potentially download a glance image to the cache (base).\n\nIs there a way to set up this backend in devstack to test it out?","commit_id":"a76946354b3dd51ac0464674ea5b342d9660adc9"}]}
