)]}'
{"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2313cecf18abfe9eb304dc15d4fce2ee8fa97d11","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"def get_virtual_size(context, image_service, image_id):"},{"line_number":1213,"context_line":"    meta \u003d image_service.show(context, image_id)"},{"line_number":1214,"context_line":"    if meta.get(\u0027container_format\u0027) \u003d\u003d \u0027ovf\u0027:"},{"line_number":1215,"context_line":"        return raw_tgz_get_size(context, image_service, image_id)"},{"line_number":1216,"context_line":"    return int(meta[\u0027size\u0027])"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAARn%2F%2FvxU%3D","line":1215,"updated":"2013-08-22 11:41:37.000000000","message":"Maybe I am confused, but I think this is wrong. Maybe you want to check for raw and ovf? Even then I don\u0027t think this is what you want to do.\n\nThe virtual size is the \u0027logical\u0027 size of the disk partition, what you are getting here is the physical size, which could be much smaller than the virtual size in the case of VHDs","commit_id":"5075bff47ac68ec44c6bbac34bc0b9537f47d9cc"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"cb40ae4de9866e292f8049859dd2a441cc7fb6d7","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"def get_virtual_size(context, image_service, image_id):"},{"line_number":1213,"context_line":"    meta \u003d image_service.show(context, image_id)"},{"line_number":1214,"context_line":"    if meta.get(\u0027container_format\u0027) \u003d\u003d \u0027ovf\u0027:"},{"line_number":1215,"context_line":"        return raw_tgz_get_size(context, image_service, image_id)"},{"line_number":1216,"context_line":"    return int(meta[\u0027size\u0027])"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASX%2F%2F%2F%2Bg%3D","line":1215,"in_reply_to":"AAAARn%2F%2FulY%3D","updated":"2013-08-22 18:21:01.000000000","message":"Glance will store the compressed size (the size of the targz file)","commit_id":"5075bff47ac68ec44c6bbac34bc0b9537f47d9cc"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c2d68b3a5385d3c7b4c28f2b0f6f80e525762b34","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"def get_virtual_size(context, image_service, image_id):"},{"line_number":1213,"context_line":"    meta \u003d image_service.show(context, image_id)"},{"line_number":1214,"context_line":"    if meta.get(\u0027container_format\u0027) \u003d\u003d \u0027ovf\u0027:"},{"line_number":1215,"context_line":"        return raw_tgz_get_size(context, image_service, image_id)"},{"line_number":1216,"context_line":"    return int(meta[\u0027size\u0027])"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAARn%2F%2FulY%3D","line":1215,"in_reply_to":"AAAARn%2F%2FvwQ%3D","updated":"2013-08-22 16:36:30.000000000","message":"Just wondering why you need this? Would not int(meta[\u0027size\u0027]) report the correct size? I guess it does no halm being more accurate.","commit_id":"5075bff47ac68ec44c6bbac34bc0b9537f47d9cc"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"5c6cac4378d302db8451fa5308303af9b6fe867a","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"def get_virtual_size(context, image_service, image_id):"},{"line_number":1213,"context_line":"    meta \u003d image_service.show(context, image_id)"},{"line_number":1214,"context_line":"    if meta.get(\u0027container_format\u0027) \u003d\u003d \u0027ovf\u0027:"},{"line_number":1215,"context_line":"        return raw_tgz_get_size(context, image_service, image_id)"},{"line_number":1216,"context_line":"    return int(meta[\u0027size\u0027])"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAARn%2F%2FvwQ%3D","line":1215,"in_reply_to":"AAAARn%2F%2FvxU%3D","updated":"2013-08-22 11:54:01.000000000","message":"The image is a raw disk image. So it\u0027s physical size equals to its virtual size. VHD files will never go down this route, as they are served by plugins. But I see your point, just because it\u0027s ovf, it\u0027s not raw. So what I will put in here, is an extra check for the disk format. Good spot.","commit_id":"5075bff47ac68ec44c6bbac34bc0b9537f47d9cc"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0349f635aa8889f7f2b415488748a2d3c2cc1b90","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"    meta \u003d image_service.show(context, image_id)"},{"line_number":1221,"context_line":"    if is_raw_tgz_image(meta):"},{"line_number":1222,"context_line":"        return raw_tgz_get_size(context, image_service, image_id)"},{"line_number":1223,"context_line":"    return int(meta[\u0027size\u0027])"},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"def raw_tgz_get_size(context, image_service, image_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASX%2F%2F8fE%3D","line":1223,"updated":"2013-08-23 12:00:11.000000000","message":"Maybe this should only be used when the format is raw (or kernel or ramdisk), and the container is none? In the other cases, you throw some sort of unsupportedimage exception.\n\nThats more of a bug fix though, maybe that another change?","commit_id":"692f5c6fbccfc0cb44316f1f5de6e17567df0f77"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c4622c8b1009d344035d0d3d166cee7154eb9bde","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"    meta \u003d image_service.show(context, image_id)"},{"line_number":1221,"context_line":"    if is_raw_tgz_image(meta):"},{"line_number":1222,"context_line":"        return raw_tgz_get_size(context, image_service, image_id)"},{"line_number":1223,"context_line":"    return int(meta[\u0027size\u0027])"},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"def raw_tgz_get_size(context, image_service, image_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASX%2F%2F8JA%3D","line":1223,"in_reply_to":"AAAASX%2F%2F8ZU%3D","updated":"2013-08-23 13:28:11.000000000","message":"OK, assuming we have a bug for this, then cool.","commit_id":"692f5c6fbccfc0cb44316f1f5de6e17567df0f77"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"6001ac56dc5fbada735cc69417895a006e1aa268","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"    meta \u003d image_service.show(context, image_id)"},{"line_number":1221,"context_line":"    if is_raw_tgz_image(meta):"},{"line_number":1222,"context_line":"        return raw_tgz_get_size(context, image_service, image_id)"},{"line_number":1223,"context_line":"    return int(meta[\u0027size\u0027])"},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"def raw_tgz_get_size(context, image_service, image_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASX%2F%2F8ZU%3D","line":1223,"in_reply_to":"AAAASX%2F%2F8fE%3D","updated":"2013-08-23 12:25:54.000000000","message":"This is the original behavior, I think it\u0027s more like a bug fix, but not really related to this change I guess","commit_id":"692f5c6fbccfc0cb44316f1f5de6e17567df0f77"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a2f395b71c4533fea31c6bb7c9c0ca19ae6b3f10","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"            self.image_service.download(self.context, self.image_id))"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"    def as_tarfile(self):"},{"line_number":1260,"context_line":"        return tarfile.open(mode\u003d\u0027r|gz\u0027, fileobj\u003dself.as_file())"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def get_size(self):"},{"line_number":1263,"context_line":"        tarfile \u003d self.as_tarfile()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASX%2F%2F7dM%3D","line":1260,"updated":"2013-08-23 15:59:20.000000000","message":"Just thinking, don\u0027t we need to close this somehow?","commit_id":"692f5c6fbccfc0cb44316f1f5de6e17567df0f77"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"24d8619b70c44e7d2ca82b9e21be268c1cbcf9f1","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"            self.image_service.download(self.context, self.image_id))"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"    def as_tarfile(self):"},{"line_number":1260,"context_line":"        return tarfile.open(mode\u003d\u0027r|gz\u0027, fileobj\u003dself.as_file())"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def get_size(self):"},{"line_number":1263,"context_line":"        tarfile \u003d self.as_tarfile()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2F8s4%3D","line":1260,"in_reply_to":"AAAASX%2F%2F7aY%3D","updated":"2013-08-27 16:48:39.000000000","message":"I looked it, and the connection will be garbage collected, that\u0027s how the file descriptor related to the connection to glance will be closed.","commit_id":"692f5c6fbccfc0cb44316f1f5de6e17567df0f77"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"b09f191d3875065285a7dc5b6efbaeacb3c2b323","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"            self.image_service.download(self.context, self.image_id))"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"    def as_tarfile(self):"},{"line_number":1260,"context_line":"        return tarfile.open(mode\u003d\u0027r|gz\u0027, fileobj\u003dself.as_file())"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def get_size(self):"},{"line_number":1263,"context_line":"        tarfile \u003d self.as_tarfile()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASX%2F%2F7aY%3D","line":1260,"in_reply_to":"AAAASX%2F%2F7dM%3D","updated":"2013-08-23 16:09:17.000000000","message":"download will call data() on client:\n\n  https://github.com/openstack/nova/blob/master/nova/image/glance.py#L336\n\nAnd it\u0027s implemented here, returning an iterable:\n\n   https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v1/images.py#L118\n\nMaybe the thing returned from glance cilent has a close() ?\n\nAnyhow, I need to look into it.\n\nThanks.","commit_id":"692f5c6fbccfc0cb44316f1f5de6e17567df0f77"}]}
