)]}'
{"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"37961ba2939ba4151e68aea431921af4f038f904","unresolved":false,"context_lines":[{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self.correct_format()"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def create_from_func(self, context, func, cache_name, size,"},{"line_number":544,"context_line":"                         fallback_from_host\u003dNone):"},{"line_number":545,"context_line":"        cache \u003d imagecache.ImageCacheLocalDir.get()"},{"line_number":546,"context_line":"        cache_path \u003d cache.get_func_output_path("}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_852102a2","line":543,"updated":"2016-05-19 19:45:09.000000000","message":"You should add these methods to the base class at first.","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"f36a890ea72240e8f8406c3b9ecb3799d07a1890","unresolved":false,"context_lines":[{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self.correct_format()"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def create_from_func(self, context, func, cache_name, size,"},{"line_number":544,"context_line":"                         fallback_from_host\u003dNone):"},{"line_number":545,"context_line":"        cache \u003d imagecache.ImageCacheLocalDir.get()"},{"line_number":546,"context_line":"        cache_path \u003d cache.get_func_output_path("}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_3d894a27","line":543,"in_reply_to":"bab6814e_852102a2","updated":"2016-05-19 19:56:13.000000000","message":"Yup, just fixing up the doc strings, and will push them in the next pass.","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"37961ba2939ba4151e68aea431921af4f038f904","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        with self._import(size) as target:"},{"line_number":560,"context_line":"            libvirt_utils.copy_image(image_info.path, target)"},{"line_number":561,"context_line":"            if size and size \u003e image_info.virtual_size:"},{"line_number":562,"context_line":"                self.resize_image(size)"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    @contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_659dfe58","line":561,"updated":"2016-05-19 19:45:09.000000000","message":"Are you going to copy these lines to each class? Could we commonize this and the previous functions?","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"0a99353e390f257ac11e52fb06e6d619a2809da5","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        with self._import(size) as target:"},{"line_number":560,"context_line":"            libvirt_utils.copy_image(image_info.path, target)"},{"line_number":561,"context_line":"            if size and size \u003e image_info.virtual_size:"},{"line_number":562,"context_line":"                self.resize_image(size)"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    @contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":5,"id":"9abb7d3a_2d4cc875","line":561,"in_reply_to":"bab6814e_659dfe58","updated":"2016-06-02 19:42:45.000000000","message":"I\u0027ve removed some of the duplication, but the backends are sufficiently different that it would become pretty contorted if I extract more. Here\u0027s a comparison of the various backends so far (minus some helper methods for clarity):\n\nhttp://paste.openstack.org/show/507360/\n\nSome general notes:\n- preallocate only applies to the flat and qcow2 backends\n- resizing should only be done for the create_from_image case (not the create_from_func case too)\n- verify_base_size only applies to create_from_image case (not the create_from_func case too)","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"f36a890ea72240e8f8406c3b9ecb3799d07a1890","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        with self._import(size) as target:"},{"line_number":560,"context_line":"            libvirt_utils.copy_image(image_info.path, target)"},{"line_number":561,"context_line":"            if size and size \u003e image_info.virtual_size:"},{"line_number":562,"context_line":"                self.resize_image(size)"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    @contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_fdc98279","line":561,"in_reply_to":"bab6814e_659dfe58","updated":"2016-05-19 19:56:13.000000000","message":"The duplication is intentional right now. I plan to revisit it once I\u0027m done all 5 backends.","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"37961ba2939ba4151e68aea431921af4f038f904","unresolved":false,"context_lines":[{"line_number":562,"context_line":"                self.resize_image(size)"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    @contextlib.contextmanager"},{"line_number":565,"context_line":"    def _import(self, size):"},{"line_number":566,"context_line":"        with fileutils.remove_path_on_error(self.path):"},{"line_number":567,"context_line":"            yield self.path  # /instances/instance-uuid/some-disk"},{"line_number":568,"context_line":"            if self.preallocate and self._can_fallocate():"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_6beb0fb1","line":565,"updated":"2016-05-19 19:45:09.000000000","message":"The implementation contains nothing related to import.","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"0a99353e390f257ac11e52fb06e6d619a2809da5","unresolved":false,"context_lines":[{"line_number":562,"context_line":"                self.resize_image(size)"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    @contextlib.contextmanager"},{"line_number":565,"context_line":"    def _import(self, size):"},{"line_number":566,"context_line":"        with fileutils.remove_path_on_error(self.path):"},{"line_number":567,"context_line":"            yield self.path  # /instances/instance-uuid/some-disk"},{"line_number":568,"context_line":"            if self.preallocate and self._can_fallocate():"}],"source_content_type":"text/x-python","patch_set":5,"id":"9abb7d3a_2d81684e","line":565,"in_reply_to":"bab6814e_6beb0fb1","updated":"2016-06-02 19:42:45.000000000","message":"I renamed this helper to \u0027_create\u0027 which serves as a home for things that should happen before and after for *both* the create_from func and create_from_image cases.","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"37961ba2939ba4151e68aea431921af4f038f904","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def _import(self, size):"},{"line_number":566,"context_line":"        with fileutils.remove_path_on_error(self.path):"},{"line_number":567,"context_line":"            yield self.path  # /instances/instance-uuid/some-disk"},{"line_number":568,"context_line":"            if self.preallocate and self._can_fallocate():"},{"line_number":569,"context_line":"                self.preallocate_disk(size)"},{"line_number":570,"context_line":"            self.correct_format()"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_4506face","line":568,"updated":"2016-05-19 19:45:09.000000000","message":"Perhaps it is better to move this to a method to reuse it with other classes.","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"0a99353e390f257ac11e52fb06e6d619a2809da5","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    def _import(self, size):"},{"line_number":566,"context_line":"        with fileutils.remove_path_on_error(self.path):"},{"line_number":567,"context_line":"            yield self.path  # /instances/instance-uuid/some-disk"},{"line_number":568,"context_line":"            if self.preallocate and self._can_fallocate():"},{"line_number":569,"context_line":"                self.preallocate_disk(size)"},{"line_number":570,"context_line":"            self.correct_format()"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9abb7d3a_2d7328b6","line":568,"in_reply_to":"bab6814e_4506face","updated":"2016-06-02 19:42:45.000000000","message":"Done. Note that it\u0027s only applicable to the flat \u0026 qcow2 backends.","commit_id":"4992a18c32d295a180f9120c59556329689a7f9c"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b0e1fd4ad1f9446e0f989e53406f9f95093a5bac","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def create_from_func(self, context, func, cache_name, size, fallback\u003dNone):"},{"line_number":533,"context_line":"        with self._create(size) as target:"},{"line_number":534,"context_line":"            # generates the disk in place rather than using the image cache"},{"line_number":535,"context_line":"            func(target)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def create_from_image(self, context, image_id, size, fallback\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_a6429a66","line":534,"updated":"2016-06-15 21:03:55.000000000","message":"Why do you do not want to use cache here?","commit_id":"e5e608c1cf2653ddf7abf7ac9472bfa68c4964fb"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"09e880c2d2bbf0bbfc35fdbdd33cc542781bef3f","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def create_from_func(self, context, func, cache_name, size, fallback\u003dNone):"},{"line_number":533,"context_line":"        with self._create(size) as target:"},{"line_number":534,"context_line":"            # generates the disk in place rather than using the image cache"},{"line_number":535,"context_line":"            func(target)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def create_from_image(self, context, image_id, size, fallback\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_04522ade","line":534,"in_reply_to":"7aa08908_6d84d55c","updated":"2016-06-17 09:47:10.000000000","message":"Thanks. I missed that Flat (former Raw) backend does not use cache for extra ephemerals.\n\nBut if you don\u0027t want to change behavior here, why do you change it in get_func_output_path, which will load cached ephemerals from other host? Perhaps it is better to do nothing additional there, introducing fallback arg to API, though?","commit_id":"e5e608c1cf2653ddf7abf7ac9472bfa68c4964fb"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"60b1600a865650188ebc46060153a5a14dd583cf","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def create_from_func(self, context, func, cache_name, size, fallback\u003dNone):"},{"line_number":533,"context_line":"        with self._create(size) as target:"},{"line_number":534,"context_line":"            # generates the disk in place rather than using the image cache"},{"line_number":535,"context_line":"            func(target)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def create_from_image(self, context, image_id, size, fallback\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_e87c68b7","line":534,"in_reply_to":"7aa08908_a6429a66","updated":"2016-06-15 21:49:31.000000000","message":"Because the old code doesn\u0027t use the cache in this case either (search for the comment \"Generating image in place\" in the existing code).\n\nAnd IIRC because mdbooth thinks that none of the create_from_func cases should use the cache as a rule, and that using the cache is actually a bug in the create_from_func case.\n\nMatt can explain the \"why\" better than me ;)","commit_id":"e5e608c1cf2653ddf7abf7ac9472bfa68c4964fb"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"596ed8123c4c4922444308f492adebf068a29d0d","unresolved":false,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"    def create_from_func(self, context, func, cache_name, size, fallback\u003dNone):"},{"line_number":533,"context_line":"        with self._create(size) as target:"},{"line_number":534,"context_line":"            # generates the disk in place rather than using the image cache"},{"line_number":535,"context_line":"            func(target)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def create_from_image(self, context, image_id, size, fallback\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aa08908_6d84d55c","line":534,"in_reply_to":"7aa08908_e87c68b7","updated":"2016-06-16 17:40:39.000000000","message":"See my comment here in get_func_output_path:\n\nhttps://review.openstack.org/#/c/279669/21/nova/virt/libvirt/imagecache.py\n\nNothing should be caching these, and in my very first version of this series I removed this functionality for all backends. I put it back again to divorce that change from the refactor.\n\nIncidentally, the fact that it\u0027s so hard to see that some backends don\u0027t use the image cache is one of the driving reasons for this refactor.","commit_id":"e5e608c1cf2653ddf7abf7ac9472bfa68c4964fb"}]}
