)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"92bbf39a9b8fdda97d99e4b7ef2c2b46c7812f40","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     suichangyin \u003csuichangyin@126.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-12-04 03:57:47 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"When the image\u0027s size is greater than 2GB, download error."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I6263a5221fda0509fbd0b6195c079e5e22800a1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_805b8221","line":7,"updated":"2018-12-04 10:54:43.000000000","message":"Could you please elaborate? Also could you please create a story in storyboard and link to it?","commit_id":"5634b4c7021b527664cb06c2deabb214a7ab1266"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"f32b26cbb16b97fdc5228dda5f940d6449bffbb2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"error\\n\u0027: ProcessExecutionError: Unexpected error while running command."},{"line_number":17,"context_line":"Command: /usr/bin/python2 -m oslo_concurrency.prlimit --as\u003d1073741824 -- "},{"line_number":18,"context_line":"qemu-img convert -O raw /var/lib/ironic/master_images/tmpoZVFzm/"},{"line_number":19,"context_line":"my-windowsxp.qcow2.paages/tmpoZVFzm/my-windowsxp.qcow2.converted"},{"line_number":20,"context_line":"Exit code: 1"},{"line_number":21,"context_line":"Stdout: u\u0027\u0027"},{"line_number":22,"context_line":"Stderr: u\u0027qemu-img: error while reading sector 17501568: Input/output error\\n\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_07445275","line":19,"range":{"start_line":19,"start_character":54,"end_line":19,"end_character":64},"updated":"2018-12-05 03:28:14.000000000","message":"We can only see this on codes of master branch, are you running devstack or something similar?\nthe issue seems like a size limit on file system, but I am not sure why we can go to qemu-img convert when something wrong with image download, could you provide some fs information on the machine, like df and lsblk?\n\nPlease also create a story at [1] and put information that may help for identifying the issue, like environment, ironic version, logs, etc. A briefing in the commit message would be enough.\n\nFrom my past experience, the image size of Windows 7/2008/2012 is around 7G~8G, but I have never seen the issue described here.\n\n[1] https://storyboard.openstack.org/#!/project/openstack/ironic","commit_id":"9f81115e88c805abaa2b0c0d48127ddaf7047913"}],"ironic/common/image_service.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"92bbf39a9b8fdda97d99e4b7ef2c2b46c7812f40","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                filesize \u003d os.path.getsize(source_image_path)"},{"line_number":214,"context_line":"                offset \u003d 0"},{"line_number":215,"context_line":"                with open(source_image_path, \u0027rb\u0027) as input_img:"},{"line_number":216,"context_line":"                    while(offset \u003c filesize):"},{"line_number":217,"context_line":"                        send_size \u003d sendfile.sendfile(image_file.fileno(), input_img.fileno(),"},{"line_number":218,"context_line":"                                                      offset, filesize)"},{"line_number":219,"context_line":"                        offset +\u003d send_size"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a056bef8","line":216,"updated":"2018-12-04 10:54:43.000000000","message":"the brackets are redundant here","commit_id":"5634b4c7021b527664cb06c2deabb214a7ab1266"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"f32b26cbb16b97fdc5228dda5f940d6449bffbb2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        }"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"class FileImageService(BaseImageService):"},{"line_number":174,"context_line":"    \"\"\"Provides retrieval of disk images available locally on the conductor.\"\"\""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def validate_href(self, image_href):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_072f7257","line":173,"range":{"start_line":173,"start_character":6,"end_line":173,"end_character":22},"updated":"2018-12-05 03:28:14.000000000","message":"normally we use glance service or http image service in a regular deployment, this one is not used, so I am wondering if you have changed code somewhere in the downstream?","commit_id":"9f81115e88c805abaa2b0c0d48127ddaf7047913"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"f32b26cbb16b97fdc5228dda5f940d6449bffbb2","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                offset \u003d 0"},{"line_number":215,"context_line":"                with open(source_image_path, \u0027rb\u0027) as input_img:"},{"line_number":216,"context_line":"                    while offset \u003c filesize:"},{"line_number":217,"context_line":"                        send_size \u003d sendfile.sendfile(image_file.fileno(), input_img.fileno(),"},{"line_number":218,"context_line":"                                                      offset, filesize)"},{"line_number":219,"context_line":"                        offset +\u003d send_size"},{"line_number":220,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_c7197a76","line":217,"range":{"start_line":217,"start_character":75,"end_line":217,"end_character":94},"updated":"2018-12-05 03:28:14.000000000","message":"please wrap this line within 79 chars.","commit_id":"9f81115e88c805abaa2b0c0d48127ddaf7047913"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"f32b26cbb16b97fdc5228dda5f940d6449bffbb2","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                with open(source_image_path, \u0027rb\u0027) as input_img:"},{"line_number":216,"context_line":"                    while offset \u003c filesize:"},{"line_number":217,"context_line":"                        send_size \u003d sendfile.sendfile(image_file.fileno(), input_img.fileno(),"},{"line_number":218,"context_line":"                                                      offset, filesize)"},{"line_number":219,"context_line":"                        offset +\u003d send_size"},{"line_number":220,"context_line":"        except Exception as e:"},{"line_number":221,"context_line":"            raise exception.ImageDownloadFailed(image_href\u003dimage_href,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_27238eab","line":218,"range":{"start_line":218,"start_character":62,"end_line":218,"end_character":70},"updated":"2018-12-05 03:28:14.000000000","message":"this doesn\u0027t seem logical, the offset is changed in every loop (if we couldn\u0027t read filesize in one call), but we are still reading the whole size here.\nFrom the description, the downloaded image size is limited to 2G, I am not clear on how this change can help?","commit_id":"9f81115e88c805abaa2b0c0d48127ddaf7047913"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2a12612dcf5f0c57a437ef1dfc985b0ebeb2891f","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                        nbytes_out \u003d sendfile.sendfile(image_file.fileno(),"},{"line_number":224,"context_line":"                                                       input_img.fileno(),"},{"line_number":225,"context_line":"                                                       offset,"},{"line_number":226,"context_line":"                                                       SENDFILE_CHUNK_SIZE)"},{"line_number":227,"context_line":"                        offset +\u003d nbytes_out"},{"line_number":228,"context_line":"        except Exception as e:"},{"line_number":229,"context_line":"            raise exception.ImageDownloadFailed(image_href\u003dimage_href,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_482a1a7f","line":226,"updated":"2019-03-27 11:03:09.000000000","message":"should we use something like\n\n min(SENDFILE_CHUNK_SIZE, filesize - offset)\n\nhere?","commit_id":"a33e0fa7f589a6d000d4fc92084f16a896267cf5"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"996ff2b4d2d7adea9e40d5c3158e0618875397d1","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                        nbytes_out \u003d sendfile.sendfile(image_file.fileno(),"},{"line_number":224,"context_line":"                                                       input_img.fileno(),"},{"line_number":225,"context_line":"                                                       offset,"},{"line_number":226,"context_line":"                                                       SENDFILE_CHUNK_SIZE)"},{"line_number":227,"context_line":"                        offset +\u003d nbytes_out"},{"line_number":228,"context_line":"        except Exception as e:"},{"line_number":229,"context_line":"            raise exception.ImageDownloadFailed(image_href\u003dimage_href,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_91e34105","line":226,"in_reply_to":"5fc1f717_482a1a7f","updated":"2019-03-28 02:17:48.000000000","message":"both works, return value is the actual bytes written, when EOF is reached, it can be less than specified size.","commit_id":"a33e0fa7f589a6d000d4fc92084f16a896267cf5"}]}
