)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"05fd0d58b49521dd2d94ea368fb1f3172df0a0a9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add the iscsi device check and exception processing."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Before downloading the image and executing the command \"qemu-img convert\","},{"line_number":10,"context_line":"check if the iSCSI device is still available via the command \"hdparm -t \u003cdev\u003e\"."},{"line_number":11,"context_line":"This command will output something like \"Timing buffered disk reads: 34 MB"},{"line_number":12,"context_line":"in 3.10 seconds \u003d 10.95 MB/sec\", indicating the device read speed. Otherwise,"},{"line_number":13,"context_line":"the output will give \"Timing buffered disk reads: read() failed: Input/output"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAPX%2F%2F0yI%3D","line":10,"updated":"2013-06-08 14:57:32.000000000","message":"Should probably update your commit message here with the change from hdparm to dd.","commit_id":"87fc29f942107e6fcd3c02e83db479728e4b549d"}],"cinder/exception.py":[{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"05fd0d58b49521dd2d94ea368fb1f3172df0a0a9","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"class DeviceUnavailable(Invalid):"},{"line_number":198,"context_line":"    message \u003d _(\"The device in the path %(path)s is unavailable: %(reason)s\")"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"class InvalidUUID(Invalid):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAPX%2F%2F0yM%3D","line":198,"updated":"2013-06-08 14:57:32.000000000","message":":)","commit_id":"87fc29f942107e6fcd3c02e83db479728e4b549d"}],"cinder/volume/driver.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"84a9be5af24bf6cddb9b79318eafe5e197f14ff0","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        pass"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _check_valid_device(self, path):"},{"line_number":361,"context_line":"        cmd \u003d (\u0027hdparm\u0027, \u0027-t\u0027, path)"},{"line_number":362,"context_line":"        out \u003d None"},{"line_number":363,"context_line":"        err \u003d None"},{"line_number":364,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2F5ho%3D","line":361,"updated":"2013-06-06 14:22:50.000000000","message":"I don\u0027t think we should use hdparm for this.  If the goal is to try to read from it, maybe just use dd?  (hdparm -t is a speed test...) Otherwise verify that the device node exists?","commit_id":"338b2005961fafee42ebf5804c1443e56580534f"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"2b3500e46b794f8d4bedd1b704c02c8a40372ea6","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        pass"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _check_valid_device(self, path):"},{"line_number":361,"context_line":"        cmd \u003d (\u0027hdparm\u0027, \u0027-t\u0027, path)"},{"line_number":362,"context_line":"        out \u003d None"},{"line_number":363,"context_line":"        err \u003d None"},{"line_number":364,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2F2Vo%3D","line":361,"in_reply_to":"AAAAPX%2F%2F2ho%3D","updated":"2013-06-07 16:27:41.000000000","message":"I\u0027d agree with Eric on this I think.  Hdparm seems a  bit heavy-weight to do a connectivity check.\n\nroot@jdg-workstation:/home/jdg/loopbacks# time hdparm -t /dev/mapper/test--vg-test--vol \n\n/dev/mapper/test--vg-test--vol:\n Timing buffered disk reads: 4096 MB in  1.79 seconds \u003d 2289.57 MB/sec\n\nreal\t0m5.170s\nuser\t0m0.040s\nsys\t0m2.076s\n\nroot@jdg-workstation:/home/jdg/loopbacks# time dd if\u003d/dev/mapper/test--vg-test--vol of\u003d/dev/null count\u003d1\n1+0 records in\n1+0 records out\n512 bytes (512 B) copied, 0.000607904 s, 842 kB/s\n\nreal\t0m0.002s\nuser\t0m0.000s\nsys\t0m0.000s\nroot@jdg-workstation:/home/jdg/loopbacks#","commit_id":"338b2005961fafee42ebf5804c1443e56580534f"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"e1b4d8e783d1f6abb8293da192c7d1d0c79aa81d","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        pass"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _check_valid_device(self, path):"},{"line_number":361,"context_line":"        cmd \u003d (\u0027hdparm\u0027, \u0027-t\u0027, path)"},{"line_number":362,"context_line":"        out \u003d None"},{"line_number":363,"context_line":"        err \u003d None"},{"line_number":364,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2F2ho%3D","line":361,"in_reply_to":"AAAAPX%2F%2F3uw%3D","updated":"2013-06-07 15:09:20.000000000","message":"I think using \"dd if\u003dpath of\u003d/dev/null count\u003d1\" should be able to do the same thing, checking for non-zero return.","commit_id":"338b2005961fafee42ebf5804c1443e56580534f"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"49eee9aacd8bac0a2be69050fcda3dfa417619e2","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        pass"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _check_valid_device(self, path):"},{"line_number":361,"context_line":"        cmd \u003d (\u0027hdparm\u0027, \u0027-t\u0027, path)"},{"line_number":362,"context_line":"        out \u003d None"},{"line_number":363,"context_line":"        err \u003d None"},{"line_number":364,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2F3uw%3D","line":361,"in_reply_to":"AAAAPX%2F%2F5ho%3D","updated":"2013-06-07 00:47:07.000000000","message":"Verifying the existence of the device node is not enough. It is possible that the cinder-volume node is OK,  but the backend storage connecting to it has lost its network connection. In this case, the device path still exists, but it is unable to read. My purpose is to check whether it is readable, and decide whether to download and copy(dd) the image or not.","commit_id":"338b2005961fafee42ebf5804c1443e56580534f"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"84a9be5af24bf6cddb9b79318eafe5e197f14ff0","unresolved":false,"context_lines":[{"line_number":452,"context_line":""},{"line_number":453,"context_line":"        stripped_portal \u003d iscsi_properties[\u0027target_portal\u0027].split(\",\")[0]"},{"line_number":454,"context_line":"        if len(portals) \u003d\u003d 0 or len([s for s in portals"},{"line_number":455,"context_line":"                                     if stripped_portal \u003d\u003d"},{"line_number":456,"context_line":"                                     s[\u0027portal\u0027].split(\",\")[0]"},{"line_number":457,"context_line":"                                     and"},{"line_number":458,"context_line":"                                     s[\u0027iqn\u0027] \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2F5hM%3D","line":455,"updated":"2013-06-06 14:22:50.000000000","message":"This indentation seems rather odd...","commit_id":"338b2005961fafee42ebf5804c1443e56580534f"}],"etc/cinder/rootwrap.d/volume.filters":[{"author":{"_account_id":4355,"name":"Avishay Traeger","email":"avishay@stratoscale.com","username":"avishay-il"},"change_message_id":"8660a6b4a8f09d290197021d7266342ef9ff2983","unresolved":false,"context_lines":[{"line_number":39,"context_line":"dmsetup: CommandFilter, dmsetup, root"},{"line_number":40,"context_line":"ln: CommandFilter, ln, root"},{"line_number":41,"context_line":"qemu-img: CommandFilter, qemu-img, root"},{"line_number":42,"context_line":"env: CommandFilter, env, root"},{"line_number":43,"context_line":"hdparm: CommandFilter, hdparm, root"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# cinder/volume/driver.py: utils.read_file_as_root()"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2F0Tg%3D","line":42,"updated":"2013-06-09 08:05:18.000000000","message":"No longer need this.","commit_id":"e86e4f9e4f7e5d6778b01b8715371ced26ba50d4"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"fb2bb04875fdae89759ed7bc49f88bcab7363d68","unresolved":false,"context_lines":[{"line_number":39,"context_line":"dmsetup: CommandFilter, dmsetup, root"},{"line_number":40,"context_line":"ln: CommandFilter, ln, root"},{"line_number":41,"context_line":"qemu-img: CommandFilter, qemu-img, root"},{"line_number":42,"context_line":"env: CommandFilter, env, root"},{"line_number":43,"context_line":"hdparm: CommandFilter, hdparm, root"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# cinder/volume/driver.py: utils.read_file_as_root()"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2F0TE%3D","line":42,"in_reply_to":"AAAAPX%2F%2F0Tg%3D","updated":"2013-06-09 08:16:55.000000000","message":"Done bingo","commit_id":"e86e4f9e4f7e5d6778b01b8715371ced26ba50d4"}]}
