)]}'
{"glance_store/_drivers/cinder.py":[{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"4bf5b55636bfe00880b8c5ca21d06daf6ca143b6","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":435,"context_line":"        bytes_written \u003d 0"},{"line_number":436,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":437,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":438,"context_line":"            size_gb \u003d 1"},{"line_number":439,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":440,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_8754ce54","side":"PARENT","line":437,"updated":"2016-06-21 22:57:29.000000000","message":"using ceil is fine with me\n\nBut you need to retain this, image_size can be 0 when doing chunked uploads (e.g nova snapshots). In such cases, you need to create a volume of 1G to begin with.","commit_id":"a678c26dee267c38d98cfc3c24f40d9c74182f9d"},{"author":{"_account_id":12382,"name":"YaoZheng","email":"zheng.yao1@zte.com.cn","username":"YaoZheng"},"change_message_id":"eeee9b8a3c4868091456a9d62c52158bf3c7f21e","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":435,"context_line":"        bytes_written \u003d 0"},{"line_number":436,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":437,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":438,"context_line":"            size_gb \u003d 1"},{"line_number":439,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":440,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_b4ef6baf","side":"PARENT","line":437,"in_reply_to":"3aaa91ec_8754ce54","updated":"2016-06-22 02:28:41.000000000","message":"@Sabari Thank you for your review. When nova snapshots, if the VM boot from image, the snapshot image_size will be not 0; if the VM boot from volume, the snapshot image_size is 0, but it needn\u0027t write data to cinder. Its process is the first nova registry a image, the image status is queued. Then the secord, wait for the vm snapshot ok, update the image status is active directly. So, there may not be a case for image_size 0.","commit_id":"a678c26dee267c38d98cfc3c24f40d9c74182f9d"},{"author":{"_account_id":12382,"name":"YaoZheng","email":"zheng.yao1@zte.com.cn","username":"YaoZheng"},"change_message_id":"209508dcd01b8eab5d2bc57021364339f8d68caa","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":435,"context_line":"        bytes_written \u003d 0"},{"line_number":436,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":437,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":438,"context_line":"            size_gb \u003d 1"},{"line_number":439,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":440,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_ccc82025","side":"PARENT","line":437,"in_reply_to":"3aaa91ec_91910ff4","updated":"2016-06-24 09:35:41.000000000","message":"@Tomoki\nThank you for your review! I will fix it.","commit_id":"a678c26dee267c38d98cfc3c24f40d9c74182f9d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"cf6ea8df26b2d986b4f706358ce18837523abe4b","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":435,"context_line":"        bytes_written \u003d 0"},{"line_number":436,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":437,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":438,"context_line":"            size_gb \u003d 1"},{"line_number":439,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":440,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_76ff8baa","side":"PARENT","line":437,"in_reply_to":"3aaa91ec_b4ef6baf","updated":"2016-06-25 00:19:09.000000000","message":"Hey Yao, the snapshot image will eventually have a size but when the image is created the image_size will be zero","commit_id":"a678c26dee267c38d98cfc3c24f40d9c74182f9d"},{"author":{"_account_id":9176,"name":"Tomoki Sekiyama","email":"tomoki.sekiyama@gmail.com","username":"tsekiyama"},"change_message_id":"8871972538d3b2136269422302bfd6392460715d","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":435,"context_line":"        bytes_written \u003d 0"},{"line_number":436,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":437,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":438,"context_line":"            size_gb \u003d 1"},{"line_number":439,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":440,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_91910ff4","side":"PARENT","line":437,"in_reply_to":"3aaa91ec_b4ef6baf","updated":"2016-06-24 09:16:18.000000000","message":"When the Image API v2 is used, image_size can be 0, that means image size is not estimated yet. In that case, it should be set to 1 at first and if it overflows, the volume should be extended by 1GiB.\n\nSo this shouldn\u0027t be removed.","commit_id":"a678c26dee267c38d98cfc3c24f40d9c74182f9d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"cf6ea8df26b2d986b4f706358ce18837523abe4b","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        checksum \u003d hashlib.md5()"},{"line_number":435,"context_line":"        bytes_written \u003d 0"},{"line_number":436,"context_line":"        size_gb \u003d int((image_size + units.Gi - 1) / units.Gi)"},{"line_number":437,"context_line":"        if size_gb \u003d\u003d 0:"},{"line_number":438,"context_line":"            size_gb \u003d 1"},{"line_number":439,"context_line":"        name \u003d \"image-%s\" % image_id"},{"line_number":440,"context_line":"        owner \u003d context.tenant"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_f5b8182c","side":"PARENT","line":437,"in_reply_to":"3aaa91ec_ccc82025","updated":"2016-06-25 00:19:09.000000000","message":"I was talking about the same case as Tomoki and it is leveraged in some nova virt drivers even if not booted from volume. In this case, the image size is eventually  updated but not at the beginning. Sorry about the delay in getting back.","commit_id":"a678c26dee267c38d98cfc3c24f40d9c74182f9d"}]}
