)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"701c8b8a349474c6a2215eb828a76a8c9dd392e8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f750dca7_c9bad6cf","updated":"2024-07-10 14:50:41.000000000","message":"recheck","commit_id":"0c25f6ea9281cef768620074fe7261e33fa94bc4"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a77d3a7754ba2c7ba9a8ce43e8e438665619e636","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"499845be_75e4d04e","updated":"2024-07-15 18:17:34.000000000","message":"Taking this over after discussing it with Abhishek :)","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1244a0fe6b8aa8b81e998bf19bb9678782e0e536","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9aa83bcd_a39a4b79","updated":"2024-07-12 05:51:21.000000000","message":"This code is as is picked from Nova patch!\nhttps://review.opendev.org/c/openstack/nova/+/923533","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d0b2bf6c6b1c2a40f018a920a789a3c3e131d2b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"fd3a44ab_19c48b6f","updated":"2024-08-08 19:01:20.000000000","message":"Thank you for the inputs!","commit_id":"30bcf74f94fc18da9f0dd1d074da91438d4aebb4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4c12dee30a30a36784544c46c70df6ce619d1592","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"4b59455c_50039784","updated":"2024-07-16 05:55:38.000000000","message":"thank you!","commit_id":"30bcf74f94fc18da9f0dd1d074da91438d4aebb4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9552b20156ffa4de5c0b862c067e7205d05e4fe5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c81ac38c_5b9116ca","updated":"2024-08-09 14:13:23.000000000","message":"Looks right now, just needs test coverage :)","commit_id":"94d41c8318fa1a8884269f16f9c0991faf1d8659"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"54f2e01b55a5d1c9b9fe39e6a30b2a43f8ce02f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"d55f61c9_89d38c44","updated":"2024-08-09 15:10:34.000000000","message":"Thank you for review Dan!\nAdded unit test to cover image conversion is excluded for ISO format .","commit_id":"94d41c8318fa1a8884269f16f9c0991faf1d8659"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2a58c893a4e9f9930bbb5221268e0f1ffcc9354f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c42027e9_a13d36b5","updated":"2024-08-09 07:38:40.000000000","message":"recheck boot failure","commit_id":"94d41c8318fa1a8884269f16f9c0991faf1d8659"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1b04e7510168216bf8e96adb095310206bb0d88b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b2ce799a_3d972f5b","updated":"2024-08-09 05:18:15.000000000","message":"recheck ssh timeout","commit_id":"94d41c8318fa1a8884269f16f9c0991faf1d8659"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"556a0277db102291caae5cf43b9ccebe2e553c86","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"14917ac5_c879b259","updated":"2024-08-09 18:35:31.000000000","message":"Thank you for review and inputs Dan!!","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8d7fdca2a91e14389bf53c371d66cde033df8390","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"5e06b08b_3e3c5805","updated":"2024-08-12 14:33:15.000000000","message":"Thanks for input Dan!","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4d8c8849dd801f03fa4968abf82e2e89e0d04b4c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"e21f93f0_4cefffea","updated":"2024-08-13 17:02:54.000000000","message":"Thank you for inputs!!","commit_id":"0f9b6a8f4aa1a16aa16fcdd1a9d37ac63a320a45"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"76569c138279964d156cddef682788da66e549a7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"6122961c_7bf20532","updated":"2024-08-14 13:34:36.000000000","message":"recheck dep changed","commit_id":"0f9b6a8f4aa1a16aa16fcdd1a9d37ac63a320a45"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"ec0c0f14_7889267c","updated":"2024-08-14 15:52:10.000000000","message":":/","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"7cad63aa_808a5e04","updated":"2024-08-16 06:16:49.000000000","message":"Sorry, may be I misunderstood that everything should fail in format detection only.","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"dd472217527f07adf5f8039570fd910f557f5e85","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"54d2bf0b_30f96d54","updated":"2024-08-14 15:41:25.000000000","message":"This also depends on https://review.opendev.org/c/openstack/nova/+/926215 which will hopefully be merged soon. That\u0027s why the ceph job is failing, unrelated to this. Looks like with the tempest change this passes the import format tests, iso included.","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"05608f1ab008e1a6c733df156c07facdbd236786","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"fb8866e3_4614da24","updated":"2024-08-14 18:37:02.000000000","message":"recheck dep changed","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"53b65c9a38e99f9e777b7d22b575f57d7c5f5318","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"0fd45019_7cb80026","updated":"2024-08-14 18:49:07.000000000","message":"recheck dep changed again","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6abcee09431fe96bad02dbde4ab56615057e30cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"f82a9dc3_c4611da9","updated":"2024-08-15 14:59:37.000000000","message":"recheck we changed dep to just skip iso until after we merge this","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"70594c3fe0aa7e946ba2eba82d88b8533c34072c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"d0fadd2b_75e3ff8c","updated":"2024-08-19 13:57:34.000000000","message":"Looks good now, thanks. One opinion/nit but not critical.","commit_id":"37771a8101b0684dab82443f61ba184e955cde14"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"38a502a4c2f5b29ae766bf397e23589a3e11abb0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"c714d10c_ecb734f4","updated":"2024-08-19 14:07:18.000000000","message":"Will send a new PS in few minutes!","commit_id":"37771a8101b0684dab82443f61ba184e955cde14"}],"glance/async_/flows/plugins/image_conversion.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6bc296b74f8d09d50a4a3beb6508bb431cc9ce0e","unresolved":true,"context_lines":[{"line_number":122,"context_line":"        if source_format \u003d\u003d \u0027iso\u0027:"},{"line_number":123,"context_line":"            # ISO image passed safety check; qemu will treat this as"},{"line_number":124,"context_line":"            # raw from here"},{"line_number":125,"context_line":"            source_format \u003d \u0027raw\u0027"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","}],"source_content_type":"text/x-python","patch_set":4,"id":"2b43f56a_0c2c2bff","line":125,"updated":"2024-08-08 17:25:46.000000000","message":"As discussed on IRC, if my target format is `qcow2` this will cause us to convert an iso directly (considering it a raw) to `qcow2` and change the `disk_format` at the end, which will sort of break it.\n\nI think this needs to basically:\n\n1. Run format_inspector\n2. If `disk_format` claims it is an iso:\n2a. If it *is* an iso according to inspection, then return without conversion or `disk_format` change\n2b. If it is *not* an iso according to inspection, fail\n3. Otherwise proceed as normal","commit_id":"30bcf74f94fc18da9f0dd1d074da91438d4aebb4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d0b2bf6c6b1c2a40f018a920a789a3c3e131d2b2","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        if source_format \u003d\u003d \u0027iso\u0027:"},{"line_number":123,"context_line":"            # ISO image passed safety check; qemu will treat this as"},{"line_number":124,"context_line":"            # raw from here"},{"line_number":125,"context_line":"            source_format \u003d \u0027raw\u0027"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","}],"source_content_type":"text/x-python","patch_set":4,"id":"cb3a245f_2dc85cef","line":125,"in_reply_to":"2b43f56a_0c2c2bff","updated":"2024-08-08 19:01:20.000000000","message":"Done","commit_id":"30bcf74f94fc18da9f0dd1d074da91438d4aebb4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9552b20156ffa4de5c0b862c067e7205d05e4fe5","unresolved":true,"context_lines":[{"line_number":128,"context_line":"            LOG.debug(\"Avoiding conversion of an image %s having\""},{"line_number":129,"context_line":"                      \" `iso` disk format.\", self.image_id)"},{"line_number":130,"context_line":"            return file_path"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","},{"line_number":134,"context_line":"                                           \"-f\", source_format,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa4ccd6a_588eeb69","line":131,"updated":"2024-08-09 14:13:23.000000000","message":"This logic looks right to me, but I think we should have a test for it (it\u0027s totally uncovered in the current set).","commit_id":"94d41c8318fa1a8884269f16f9c0991faf1d8659"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"54f2e01b55a5d1c9b9fe39e6a30b2a43f8ce02f3","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            LOG.debug(\"Avoiding conversion of an image %s having\""},{"line_number":129,"context_line":"                      \" `iso` disk format.\", self.image_id)"},{"line_number":130,"context_line":"            return file_path"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","},{"line_number":134,"context_line":"                                           \"-f\", source_format,"}],"source_content_type":"text/x-python","patch_set":5,"id":"db000357_4a952749","line":131,"in_reply_to":"fa4ccd6a_588eeb69","updated":"2024-08-09 15:10:34.000000000","message":"Done","commit_id":"94d41c8318fa1a8884269f16f9c0991faf1d8659"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"06422ed2016f2348d772b7da6ca389c1273343da","unresolved":true,"context_lines":[{"line_number":127,"context_line":"            # disk_format as `iso` only"},{"line_number":128,"context_line":"            LOG.debug(\"Avoiding conversion of an image %s having\""},{"line_number":129,"context_line":"                      \" `iso` disk format.\", self.image_id)"},{"line_number":130,"context_line":"            return file_path"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","}],"source_content_type":"text/x-python","patch_set":6,"id":"ea825e29_58ce3583","line":130,"updated":"2024-08-09 16:33:29.000000000","message":"So while thinking about the test, I realized that if I upload an iso but tell glance the `disk_format` is `raw` or `qcow2` (or something else) we will fall through this. I think we need test cases for that, as many of the security issues lately have come from telling glance the image is something other than what it is:\n\nhttps://termbin.com/6ixv\n\nMaybe change this logic to:\n```\nif str(inspector) \u003d\u003d \u0027iso\u0027:\n    if source_format \u003d\u003d \u0027iso\u0027:\n        return source_path\n    raise something\n```\n\nThen we\u0027ll never get past this point if we detect an iso, but we\u0027ll allow it to stay if the format matches, but otherwise we\u0027ll abort.","commit_id":"4fa1b27c44e43390fcf6000449749c5ec3b13d34"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"556a0277db102291caae5cf43b9ccebe2e553c86","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            # disk_format as `iso` only"},{"line_number":128,"context_line":"            LOG.debug(\"Avoiding conversion of an image %s having\""},{"line_number":129,"context_line":"                      \" `iso` disk format.\", self.image_id)"},{"line_number":130,"context_line":"            return file_path"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","}],"source_content_type":"text/x-python","patch_set":6,"id":"6a8dbec2_67e889a1","line":130,"in_reply_to":"d4971cda_8d4bf29f","updated":"2024-08-09 18:35:31.000000000","message":"Done","commit_id":"4fa1b27c44e43390fcf6000449749c5ec3b13d34"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c90338af8837f3c54bf040796dec0ac066554e2e","unresolved":true,"context_lines":[{"line_number":127,"context_line":"            # disk_format as `iso` only"},{"line_number":128,"context_line":"            LOG.debug(\"Avoiding conversion of an image %s having\""},{"line_number":129,"context_line":"                      \" `iso` disk format.\", self.image_id)"},{"line_number":130,"context_line":"            return file_path"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","}],"source_content_type":"text/x-python","patch_set":6,"id":"d4971cda_8d4bf29f","line":130,"in_reply_to":"ea825e29_58ce3583","updated":"2024-08-09 16:41:22.000000000","message":"Will that not get caught at line 118?","commit_id":"4fa1b27c44e43390fcf6000449749c5ec3b13d34"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1065c985fef610d3a86ddd0fbac9fe768b3d78a5","unresolved":true,"context_lines":[{"line_number":116,"context_line":"            raise"},{"line_number":117,"context_line":"        except format_inspector.ImageFormatError as e:"},{"line_number":118,"context_line":"            LOG.error(\u0027Image claimed to be %s format failed format \u0027"},{"line_number":119,"context_line":"                      \u0027inspection: %s\u0027, source_format, e)"},{"line_number":120,"context_line":"            raise RuntimeError(\u0027Image format detection failed\u0027)"},{"line_number":121,"context_line":"        except Exception as e:"},{"line_number":122,"context_line":"            LOG.exception(\u0027Unknown error inspecting image format: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"60b037a0_db00c883","line":119,"updated":"2024-08-12 14:05:49.000000000","message":"By changing to detection, you\u0027ve lost the implicit \"is the image what the person said it was\" check. Meaning, if I create an image as `qcow2` but upload a `vmdk` we won\u0027t notice. If the tempest tests were landed, they would have caught this. The way this is now, we could detect the file as `vmdk` but we\u0027ll still pass `qcow2` to `qemu-img info` below on L140 and open the hole back up :/\n\nSo I think you need to move this case down, perhaps to an `elif` on your new `if` below:\n```\nif str(inspector) \u003d\u003d \u0027iso\u0027:\n    ...\nelif str(inspector) !\u003d source_format:\n    raise ...\n```\n\nThen you can also remove L96.","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8d7fdca2a91e14389bf53c371d66cde033df8390","unresolved":true,"context_lines":[{"line_number":116,"context_line":"            raise"},{"line_number":117,"context_line":"        except format_inspector.ImageFormatError as e:"},{"line_number":118,"context_line":"            LOG.error(\u0027Image claimed to be %s format failed format \u0027"},{"line_number":119,"context_line":"                      \u0027inspection: %s\u0027, source_format, e)"},{"line_number":120,"context_line":"            raise RuntimeError(\u0027Image format detection failed\u0027)"},{"line_number":121,"context_line":"        except Exception as e:"},{"line_number":122,"context_line":"            LOG.exception(\u0027Unknown error inspecting image format: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"f6c42dfa_e50927bf","line":119,"in_reply_to":"60b037a0_db00c883","updated":"2024-08-12 14:33:15.000000000","message":"Then new code should be like this\n```\n        if str(inspector) \u003d\u003d \u0027iso\u0027:\n            if source_format \u003d\u003d \u0027iso\u0027:\n                # NOTE(abhishekk): Excluding conversion and preserving image\n                # disk_format as `iso` only\n                LOG.debug(\"Avoiding conversion of an image %s having\"\n                          \" `iso` disk format.\", self.image_id)\n                return file_path\n            # NOTE(abhishekk): Raising error as image detected as ISO but\n            # claimed as different format\n            LOG.error(\u0027Image claimed to be %s format but format \u0027\n                      \u0027inspection found: ISO\u0027, source_format)\n            raise RuntimeError(\"Image has disallowed configuration\")\n        elif str(inspector) !\u003d source_format:\n            LOG.error(\u0027Image claimed to be %s format failed format \u0027\n                      \u0027inspection: %s\u0027, source_format, e)\n            raise RuntimeError(\u0027Image format detection failed\u0027)\n```\n\nAnd remove line 96~102 and also 117~120","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4d8c8849dd801f03fa4968abf82e2e89e0d04b4c","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            raise"},{"line_number":117,"context_line":"        except format_inspector.ImageFormatError as e:"},{"line_number":118,"context_line":"            LOG.error(\u0027Image claimed to be %s format failed format \u0027"},{"line_number":119,"context_line":"                      \u0027inspection: %s\u0027, source_format, e)"},{"line_number":120,"context_line":"            raise RuntimeError(\u0027Image format detection failed\u0027)"},{"line_number":121,"context_line":"        except Exception as e:"},{"line_number":122,"context_line":"            LOG.exception(\u0027Unknown error inspecting image format: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"f4540ad9_f969c49e","line":119,"in_reply_to":"94d2bf70_e9880317","updated":"2024-08-13 17:02:54.000000000","message":"Done","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f87d28cb96529d72485bd955bd6a819d7c98d088","unresolved":true,"context_lines":[{"line_number":116,"context_line":"            raise"},{"line_number":117,"context_line":"        except format_inspector.ImageFormatError as e:"},{"line_number":118,"context_line":"            LOG.error(\u0027Image claimed to be %s format failed format \u0027"},{"line_number":119,"context_line":"                      \u0027inspection: %s\u0027, source_format, e)"},{"line_number":120,"context_line":"            raise RuntimeError(\u0027Image format detection failed\u0027)"},{"line_number":121,"context_line":"        except Exception as e:"},{"line_number":122,"context_line":"            LOG.exception(\u0027Unknown error inspecting image format: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"94d2bf70_e9880317","line":119,"in_reply_to":"f320f6c5_f5f91bea","updated":"2024-08-13 13:47:48.000000000","message":"The format inspector in glance will not detect vmdk-flat, so yes, that\u0027s expected. When we get to the oslo one, it will detect those as vmdk and thus will catch and reject those.","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"6289d2674fea061c1bf66764b0c9bb79841c5ae2","unresolved":true,"context_lines":[{"line_number":116,"context_line":"            raise"},{"line_number":117,"context_line":"        except format_inspector.ImageFormatError as e:"},{"line_number":118,"context_line":"            LOG.error(\u0027Image claimed to be %s format failed format \u0027"},{"line_number":119,"context_line":"                      \u0027inspection: %s\u0027, source_format, e)"},{"line_number":120,"context_line":"            raise RuntimeError(\u0027Image format detection failed\u0027)"},{"line_number":121,"context_line":"        except Exception as e:"},{"line_number":122,"context_line":"            LOG.exception(\u0027Unknown error inspecting image format: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"f320f6c5_f5f91bea","line":119,"in_reply_to":"f6c42dfa_e50927bf","updated":"2024-08-13 06:54:25.000000000","message":"Even after changing to above two scenarios are failing;\n```\n+--------------------------------------+--------------------------------------+--------+\n| ID                                   | Name                                 | Status |\n+--------------------------------------+--------------------------------------+--------+\n| 25b36848-d1b6-4282-8a97-9d5dac6b55bc | bad-iso-with-qcow.iso                | queued |\n| ba7a7783-68b3-43a3-a6e2-657c7d65537a | bad-iso-with-qcow.iso-fakeraw        | queued |\n| 3da5b56e-7f5f-4b1c-a7b9-a3383f0b0162 | bad-qcow-with-backing.qcow2          | queued |\n| 495aaaa4-449f-4f18-8d05-ad9c5f086d06 | bad-qcow-with-backing.qcow2-fakeraw  | queued |\n| 2924bd8e-d39e-4e27-8e42-f714fd21f0a7 | bad-qcow-with-datafile.qcow2         | queued |\n| 06d6ae8c-53c8-4f18-9489-531a0112274a | bad-qcow-with-datafile.qcow2-fakeraw | queued |\n| 331ab812-380d-4133-ba2d-ba392143ce43 | bad-qcow.qcow2-fakeraw               | queued |\n| d9f07e90-6a90-4f1c-a98f-d23e8398dfe4 | bad-qed.qed-fakeraw                  | queued |\n| e52b805a-687f-4b71-a966-a0ec2f5baf3b | bad-sparse-vmdk.vmdk-fakeraw         | queued |\n| b727e1a3-a813-465b-b27c-3b200cab198b | bad-stream-vmdk.vmdk-fakeraw         | queued |\n| 39f5aaf3-c890-4b2f-ac4b-aaed57c35ea3 | bad-vmdk-flat-expose.qcow2           | queued |\n| 52df4f8f-f0cc-4ca4-9a11-d0e0137bc894 | bad-vmdk-flat-expose.qcow2-fakeraw   | active |\n| c462cc0e-a4ee-4b33-8e30-ed5d36ff95ed | bad-vmdk-flat-expose.vmdk            | queued |\n| 233eec45-8333-45e8-a7e6-51fc4531e1ce | bad-vmdk-flat-expose.vmdk-fakeraw    | active |\n| c82df896-0baf-4141-a881-4b5422eb7251 | bad-vmdk-sparse-nbdurl.vmdk          | queued |\n| fad5e3e8-7cf5-400a-8818-4e2a01338392 | bad-vmdk-sparse-nbdurl.vmdk-fakeraw  | queued |\n| b64003c2-0b19-4ee1-9cd6-24f7cc7ae941 | bad.iso-fakeraw                      | queued |\n| 681bec35-c893-41c5-9e6d-5c453881f3ec | good-qcow.qcow2                      | active |\n| 09370c01-ccc2-4af2-b7af-ea8547ee9d3a | good-raw.raw                         | active |\n| d65682fc-8bcc-445d-a0b4-1996dcb46cfb | good-sparse-vmdk.vmdk                | active |\n| bc526bfb-97d3-4851-ae40-2652d84bc238 | good-stream-vmdk.vmdk                | active |\n| 97ef244c-a69d-405a-aa77-679438fd7fe4 | good.iso                             | active |\n+--------------------------------------+--------------------------------------+--------+\n```\n\nbad-vmdk-flat-expose.qcow2-fakeraw\nbad-vmdk-flat-expose.vmdk-fakeraw\n\n\nAre these expected to be active (format insector detect those as raw and it skips the conversion)","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c8555da076407601ea19db248ebe370a45108e96","unresolved":true,"context_lines":[{"line_number":119,"context_line":"                # disk_format as `iso` only"},{"line_number":120,"context_line":"                LOG.debug(\"Avoiding conversion of an image %s having\""},{"line_number":121,"context_line":"                          \" `iso` disk format.\", self.image_id)"},{"line_number":122,"context_line":"                return file_path"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            # NOTE(abhishekk): Raising error as image detected as ISO but"},{"line_number":125,"context_line":"            # claimed as different format"}],"source_content_type":"text/x-python","patch_set":8,"id":"4b20e739_41b42877","line":122,"updated":"2024-08-13 21:28:21.000000000","message":"Okay so I think the test now needs to assert that we either fail (go back to queued) or if active, that disk_format \u003d\u003d iso (i.e. not converted to something else). Actually, just asserting that it stays iso is maybe enough for now, and then we can add \"iso and active\" afterwards.","commit_id":"0f9b6a8f4aa1a16aa16fcdd1a9d37ac63a320a45"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                # disk_format as `iso` only"},{"line_number":120,"context_line":"                LOG.debug(\"Avoiding conversion of an image %s having\""},{"line_number":121,"context_line":"                          \" `iso` disk format.\", self.image_id)"},{"line_number":122,"context_line":"                return file_path"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            # NOTE(abhishekk): Raising error as image detected as ISO but"},{"line_number":125,"context_line":"            # claimed as different format"}],"source_content_type":"text/x-python","patch_set":8,"id":"4f98fa98_cb9938e4","line":122,"in_reply_to":"4b20e739_41b42877","updated":"2024-08-16 06:16:49.000000000","message":"Done","commit_id":"0f9b6a8f4aa1a16aa16fcdd1a9d37ac63a320a45"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"70594c3fe0aa7e946ba2eba82d88b8533c34072c","unresolved":true,"context_lines":[{"line_number":129,"context_line":"        elif str(inspector) !\u003d source_format:"},{"line_number":130,"context_line":"            LOG.error(\u0027Image claimed to be %s format failed format \u0027"},{"line_number":131,"context_line":"                      \u0027inspection\u0027, source_format)"},{"line_number":132,"context_line":"            raise RuntimeError(\u0027Image format detection failed\u0027)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        try:"},{"line_number":135,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","}],"source_content_type":"text/x-python","patch_set":10,"id":"6d405ea2_181bc095","line":132,"updated":"2024-08-19 13:57:34.000000000","message":"I noticed this in the test you added for this... I wonder if this is the right error to raise here. It\u0027s the same as L111, where we failed to detect. Here we did not fail to detect, they just don\u0027t match. In Nova this is something like \"Image format mismatch\" to indicate that the problem is not with detection, but with the disagreement between the stated disk_format and the actual one.\n\nWhat do you think?","commit_id":"37771a8101b0684dab82443f61ba184e955cde14"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"38a502a4c2f5b29ae766bf397e23589a3e11abb0","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        elif str(inspector) !\u003d source_format:"},{"line_number":130,"context_line":"            LOG.error(\u0027Image claimed to be %s format failed format \u0027"},{"line_number":131,"context_line":"                      \u0027inspection\u0027, source_format)"},{"line_number":132,"context_line":"            raise RuntimeError(\u0027Image format detection failed\u0027)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        try:"},{"line_number":135,"context_line":"            stdout, stderr \u003d putils.trycmd(\"qemu-img\", \"info\","}],"source_content_type":"text/x-python","patch_set":10,"id":"6f73b059_787523d6","line":132,"in_reply_to":"6d405ea2_181bc095","updated":"2024-08-19 14:07:18.000000000","message":"Acknowledged","commit_id":"37771a8101b0684dab82443f61ba184e955cde14"}],"glance/common/format_inspector.py":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"73b10567269fad6638d872c11fcfa6321ea281ed","unresolved":true,"context_lines":[{"line_number":871,"context_line":"        if not self.complete:"},{"line_number":872,"context_line":"            return False"},{"line_number":873,"context_line":"        signature \u003d self.region(\u0027header\u0027).data[1:6]"},{"line_number":874,"context_line":"        assert len(signature) \u003d\u003d 5"},{"line_number":875,"context_line":"        return signature in (b\u0027CD001\u0027, b\u0027NSR02\u0027, b\u0027NSR03\u0027)"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"0917f07c_1ddd3d57","line":874,"range":{"start_line":874,"start_character":8,"end_line":874,"end_character":14},"updated":"2024-07-15 14:28:20.000000000","message":"Do we want to raise an AssertionError here? Why not raise a ValueError with an error messagethat would be meaningful for admins?","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4c12dee30a30a36784544c46c70df6ce619d1592","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        if not self.complete:"},{"line_number":872,"context_line":"            return False"},{"line_number":873,"context_line":"        signature \u003d self.region(\u0027header\u0027).data[1:6]"},{"line_number":874,"context_line":"        assert len(signature) \u003d\u003d 5"},{"line_number":875,"context_line":"        return signature in (b\u0027CD001\u0027, b\u0027NSR02\u0027, b\u0027NSR03\u0027)"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"952fc23a_110714e0","line":874,"range":{"start_line":874,"start_character":8,"end_line":874,"end_character":14},"in_reply_to":"0917f07c_1ddd3d57","updated":"2024-07-16 05:55:38.000000000","message":"I think we should revisit this later.","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"73b10567269fad6638d872c11fcfa6321ea281ed","unresolved":true,"context_lines":[{"line_number":872,"context_line":"            return False"},{"line_number":873,"context_line":"        signature \u003d self.region(\u0027header\u0027).data[1:6]"},{"line_number":874,"context_line":"        assert len(signature) \u003d\u003d 5"},{"line_number":875,"context_line":"        return signature in (b\u0027CD001\u0027, b\u0027NSR02\u0027, b\u0027NSR03\u0027)"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    @property"},{"line_number":878,"context_line":"    def virtual_size(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1e32c823_7114d221","line":875,"range":{"start_line":875,"start_character":29,"end_line":875,"end_character":36},"updated":"2024-07-15 14:28:20.000000000","message":"Maybe we can add in the above comment that these are are ISO9660, UDF and UDF identifiers?","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a77d3a7754ba2c7ba9a8ce43e8e438665619e636","unresolved":false,"context_lines":[{"line_number":872,"context_line":"            return False"},{"line_number":873,"context_line":"        signature \u003d self.region(\u0027header\u0027).data[1:6]"},{"line_number":874,"context_line":"        assert len(signature) \u003d\u003d 5"},{"line_number":875,"context_line":"        return signature in (b\u0027CD001\u0027, b\u0027NSR02\u0027, b\u0027NSR03\u0027)"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    @property"},{"line_number":878,"context_line":"    def virtual_size(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"d0c79b3a_ad2d1c79","line":875,"range":{"start_line":875,"start_character":29,"end_line":875,"end_character":36},"in_reply_to":"1e32c823_7114d221","updated":"2024-07-15 18:17:34.000000000","message":"Acknowledged","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"73b10567269fad6638d872c11fcfa6321ea281ed","unresolved":true,"context_lines":[{"line_number":1007,"context_line":"                if (inspector.format_match and inspector.complete and"},{"line_number":1008,"context_line":"                        format !\u003d \u0027raw\u0027):"},{"line_number":1009,"context_line":"                    # record all match (other than raw)"},{"line_number":1010,"context_line":"                    detections.append(inspector)"},{"line_number":1011,"context_line":"                    inspectors.pop(format)"},{"line_number":1012,"context_line":"            if all(i.complete for i in inspectors.values()):"},{"line_number":1013,"context_line":"                # If all the inspectors are sure they are not a match, avoid"}],"source_content_type":"text/x-python","patch_set":3,"id":"bc2591ff_e1a5dedf","line":1010,"range":{"start_line":1010,"start_character":38,"end_line":1010,"end_character":47},"updated":"2024-07-15 14:28:20.000000000","message":"Maybe you can directly add the format here, instead of the inspector:\n\ndetections.append(format)\n\nso that...","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a77d3a7754ba2c7ba9a8ce43e8e438665619e636","unresolved":false,"context_lines":[{"line_number":1007,"context_line":"                if (inspector.format_match and inspector.complete and"},{"line_number":1008,"context_line":"                        format !\u003d \u0027raw\u0027):"},{"line_number":1009,"context_line":"                    # record all match (other than raw)"},{"line_number":1010,"context_line":"                    detections.append(inspector)"},{"line_number":1011,"context_line":"                    inspectors.pop(format)"},{"line_number":1012,"context_line":"            if all(i.complete for i in inspectors.values()):"},{"line_number":1013,"context_line":"                # If all the inspectors are sure they are not a match, avoid"}],"source_content_type":"text/x-python","patch_set":3,"id":"0d72e7f3_1240802a","line":1010,"range":{"start_line":1010,"start_character":38,"end_line":1010,"end_character":47},"in_reply_to":"bc2591ff_e1a5dedf","updated":"2024-07-15 18:17:34.000000000","message":"Acknowledged","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"73b10567269fad6638d872c11fcfa6321ea281ed","unresolved":true,"context_lines":[{"line_number":1015,"context_line":"                break"},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"    if len(detections) \u003e 1:"},{"line_number":1018,"context_line":"        all_formats \u003d [str(inspector) for inspector in detections]"},{"line_number":1019,"context_line":"        raise ImageFormatError("},{"line_number":1020,"context_line":"            \u0027Multiple formats detected: %s\u0027 % \u0027, \u0027.join(all_formats))"},{"line_number":1021,"context_line":"    return inspectors[\u0027raw\u0027] if not detections else detections[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"6b041d71_7e610457","line":1018,"range":{"start_line":1018,"start_character":27,"end_line":1018,"end_character":36},"updated":"2024-07-15 14:28:20.000000000","message":"... this is not need and you can just \u0027\u0027.join(detections). Also that means the instantiated inspector class can be garbage collected if needed.","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a77d3a7754ba2c7ba9a8ce43e8e438665619e636","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"                break"},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"    if len(detections) \u003e 1:"},{"line_number":1018,"context_line":"        all_formats \u003d [str(inspector) for inspector in detections]"},{"line_number":1019,"context_line":"        raise ImageFormatError("},{"line_number":1020,"context_line":"            \u0027Multiple formats detected: %s\u0027 % \u0027, \u0027.join(all_formats))"},{"line_number":1021,"context_line":"    return inspectors[\u0027raw\u0027] if not detections else detections[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"e90f4736_d8803bca","line":1018,"range":{"start_line":1018,"start_character":27,"end_line":1018,"end_character":36},"in_reply_to":"6b041d71_7e610457","updated":"2024-07-15 18:17:34.000000000","message":"Acknowledged","commit_id":"e1f0d80216f20f32e683422a41c8603258f829e4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6bc296b74f8d09d50a4a3beb6508bb431cc9ce0e","unresolved":true,"context_lines":[{"line_number":1018,"context_line":"    if len(detections) \u003e 1:"},{"line_number":1019,"context_line":"        raise ImageFormatError("},{"line_number":1020,"context_line":"            \u0027Multiple formats detected: %s\u0027 % \u0027, \u0027.join(detections))"},{"line_number":1021,"context_line":"    return inspectors[\u0027raw\u0027] if not detections else detections[0]"}],"source_content_type":"text/x-python","patch_set":4,"id":"ad425516_d28c5dea","line":1021,"updated":"2024-08-08 17:25:46.000000000","message":"Glance doesn\u0027t use this code, so it doesn\u0027t technically need to be added, but it\u0027s a good safety net I guess in case we later start using it and expect to have the safety check here.","commit_id":"30bcf74f94fc18da9f0dd1d074da91438d4aebb4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d0b2bf6c6b1c2a40f018a920a789a3c3e131d2b2","unresolved":false,"context_lines":[{"line_number":1018,"context_line":"    if len(detections) \u003e 1:"},{"line_number":1019,"context_line":"        raise ImageFormatError("},{"line_number":1020,"context_line":"            \u0027Multiple formats detected: %s\u0027 % \u0027, \u0027.join(detections))"},{"line_number":1021,"context_line":"    return inspectors[\u0027raw\u0027] if not detections else detections[0]"}],"source_content_type":"text/x-python","patch_set":4,"id":"69614875_00556e1b","line":1021,"in_reply_to":"ad425516_d28c5dea","updated":"2024-08-08 19:01:20.000000000","message":"Acknowledged","commit_id":"30bcf74f94fc18da9f0dd1d074da91438d4aebb4"}],"glance/tests/unit/async_/flows/plugins/test_image_conversion.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1065c985fef610d3a86ddd0fbac9fe768b3d78a5","unresolved":true,"context_lines":[{"line_number":293,"context_line":"        self.assertRaisesRegex(RuntimeError,"},{"line_number":294,"context_line":"                               \u0027Unable to inspect image\u0027,"},{"line_number":295,"context_line":"                               convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _test_image_convert_invalid_vmdk(self):"},{"line_number":298,"context_line":"        data \u003d {\u0027format\u0027: \u0027vmdk\u0027,"},{"line_number":299,"context_line":"                \u0027format-specific\u0027: {"}],"source_content_type":"text/x-python","patch_set":7,"id":"57e72e5b_00a97d20","line":296,"updated":"2024-08-12 14:05:49.000000000","message":"Need a case here for detected format does not equal stated format.","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b530185211ce51dce31f9bf2be7e949e9b7de586","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        self.assertRaisesRegex(RuntimeError,"},{"line_number":294,"context_line":"                               \u0027Unable to inspect image\u0027,"},{"line_number":295,"context_line":"                               convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _test_image_convert_invalid_vmdk(self):"},{"line_number":298,"context_line":"        data \u003d {\u0027format\u0027: \u0027vmdk\u0027,"},{"line_number":299,"context_line":"                \u0027format-specific\u0027: {"}],"source_content_type":"text/x-python","patch_set":7,"id":"f9259179_73362f78","line":296,"in_reply_to":"4c098692_d73f5ea3","updated":"2024-08-13 16:48:26.000000000","message":"I don\u0027t think it does, because it\u0027s testing the case where qemu-img disagrees with the source_format. However, you need a case where qemu and disk_format are the same, but format_inspector detects a different one.","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8d7fdca2a91e14389bf53c371d66cde033df8390","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        self.assertRaisesRegex(RuntimeError,"},{"line_number":294,"context_line":"                               \u0027Unable to inspect image\u0027,"},{"line_number":295,"context_line":"                               convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _test_image_convert_invalid_vmdk(self):"},{"line_number":298,"context_line":"        data \u003d {\u0027format\u0027: \u0027vmdk\u0027,"},{"line_number":299,"context_line":"                \u0027format-specific\u0027: {"}],"source_content_type":"text/x-python","patch_set":7,"id":"d01a927a_b57d521f","line":296,"in_reply_to":"57e72e5b_00a97d20","updated":"2024-08-12 14:33:15.000000000","message":"Acknowledged","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c04a60a7a45f66f9fa4737d6207bec9010868cca","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        self.assertRaisesRegex(RuntimeError,"},{"line_number":294,"context_line":"                               \u0027Unable to inspect image\u0027,"},{"line_number":295,"context_line":"                               convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _test_image_convert_invalid_vmdk(self):"},{"line_number":298,"context_line":"        data \u003d {\u0027format\u0027: \u0027vmdk\u0027,"},{"line_number":299,"context_line":"                \u0027format-specific\u0027: {"}],"source_content_type":"text/x-python","patch_set":7,"id":"4c098692_d73f5ea3","line":296,"in_reply_to":"d01a927a_b57d521f","updated":"2024-08-13 16:45:21.000000000","message":"test_image_convert_fails_source_format covers this case.","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4d8c8849dd801f03fa4968abf82e2e89e0d04b4c","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        self.assertRaisesRegex(RuntimeError,"},{"line_number":294,"context_line":"                               \u0027Unable to inspect image\u0027,"},{"line_number":295,"context_line":"                               convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _test_image_convert_invalid_vmdk(self):"},{"line_number":298,"context_line":"        data \u003d {\u0027format\u0027: \u0027vmdk\u0027,"},{"line_number":299,"context_line":"                \u0027format-specific\u0027: {"}],"source_content_type":"text/x-python","patch_set":7,"id":"8f994ced_d257fcd5","line":296,"in_reply_to":"f9259179_73362f78","updated":"2024-08-13 17:02:54.000000000","message":"Done","commit_id":"fe4b01f965d1a09962f3a729f109a2f39fa1eaf7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":true,"context_lines":[{"line_number":173,"context_line":"    def test_image_convert_inspection_reports_error(self):"},{"line_number":174,"context_line":"        convert \u003d self._setup_image_convert_info_fail()"},{"line_number":175,"context_line":"        with mock.patch.object(processutils, \u0027execute\u0027) as exc_mock:"},{"line_number":176,"context_line":"            exc_mock.return_value \u003d \u0027\u0027, \u0027some error\u0027"},{"line_number":177,"context_line":"            self.assertRaises(RuntimeError,"},{"line_number":178,"context_line":"                              convert.execute, \u0027file:///test/path.raw\u0027)"},{"line_number":179,"context_line":"            exc_mock.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"aa3e4ce9_7d925d34","side":"PARENT","line":176,"updated":"2024-08-14 15:52:10.000000000","message":"The point of this test is to make sure that if `qemu-img info` fails, we handle it properly. You\u0027re removing that failure which doesn\u0027t make sense I think.","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    def test_image_convert_inspection_reports_error(self):"},{"line_number":174,"context_line":"        convert \u003d self._setup_image_convert_info_fail()"},{"line_number":175,"context_line":"        with mock.patch.object(processutils, \u0027execute\u0027) as exc_mock:"},{"line_number":176,"context_line":"            exc_mock.return_value \u003d \u0027\u0027, \u0027some error\u0027"},{"line_number":177,"context_line":"            self.assertRaises(RuntimeError,"},{"line_number":178,"context_line":"                              convert.execute, \u0027file:///test/path.raw\u0027)"},{"line_number":179,"context_line":"            exc_mock.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"04e8f116_2471ade2","side":"PARENT","line":176,"in_reply_to":"aa3e4ce9_7d925d34","updated":"2024-08-16 06:16:49.000000000","message":"Acknowledged","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":true,"context_lines":[{"line_number":196,"context_line":"            exc_mock.return_value \u003d json.dumps(data), \u0027\u0027"},{"line_number":197,"context_line":"            e \u003d self.assertRaises(RuntimeError,"},{"line_number":198,"context_line":"                                  convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":199,"context_line":"            self.assertEqual(\u0027QCOW images with backing files are not allowed\u0027,"},{"line_number":200,"context_line":"                             str(e))"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def test_image_convert_invalid_qcow_data_file(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"cb016c39_e302f1a0","side":"PARENT","line":199,"updated":"2024-08-14 15:52:10.000000000","message":"This is how it should fail if the safety check fails. The fact that you need to change this to a detection fail makes me think something is wrong and that we\u0027re either not running (or not failing, as expected) the safety check. Possibly because you\u0027re not mocking the detect to return an actual qcow2 inspector with data indicating a backing file? Either way, this test intends to test where qemu-img returns a backing file, so you probably need to mock the inspector to return a qcow2 inspector so it makes it past the format check and actually runs the info command with L191\u0027s return value.","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            exc_mock.return_value \u003d json.dumps(data), \u0027\u0027"},{"line_number":197,"context_line":"            e \u003d self.assertRaises(RuntimeError,"},{"line_number":198,"context_line":"                                  convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":199,"context_line":"            self.assertEqual(\u0027QCOW images with backing files are not allowed\u0027,"},{"line_number":200,"context_line":"                             str(e))"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def test_image_convert_invalid_qcow_data_file(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fb184738_f4447f66","side":"PARENT","line":199,"in_reply_to":"cb016c39_e302f1a0","updated":"2024-08-16 06:16:49.000000000","message":"Done","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":true,"context_lines":[{"line_number":213,"context_line":"            e \u003d self.assertRaises(RuntimeError,"},{"line_number":214,"context_line":"                                  convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":215,"context_line":"            self.assertEqual(\u0027QCOW images with data-file set are not allowed\u0027,"},{"line_number":216,"context_line":"                             str(e))"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def test_image_convert_no_inspector_match(self):"},{"line_number":219,"context_line":"        convert \u003d self._setup_image_convert_info_fail()"}],"source_content_type":"text/x-python","patch_set":9,"id":"5926da62_a5264f47","side":"PARENT","line":216,"updated":"2024-08-14 15:52:10.000000000","message":"Same here.","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            e \u003d self.assertRaises(RuntimeError,"},{"line_number":214,"context_line":"                                  convert.execute, \u0027file:///test/path.qcow\u0027)"},{"line_number":215,"context_line":"            self.assertEqual(\u0027QCOW images with data-file set are not allowed\u0027,"},{"line_number":216,"context_line":"                             str(e))"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def test_image_convert_no_inspector_match(self):"},{"line_number":219,"context_line":"        convert \u003d self._setup_image_convert_info_fail()"}],"source_content_type":"text/x-python","patch_set":9,"id":"482db4a6_60b6c035","side":"PARENT","line":216,"in_reply_to":"5926da62_a5264f47","updated":"2024-08-16 06:16:49.000000000","message":"Done","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":true,"context_lines":[{"line_number":260,"context_line":"    def test_image_convert_invalid_vmdk(self):"},{"line_number":261,"context_line":"        e \u003d self.assertRaises(RuntimeError,"},{"line_number":262,"context_line":"                              self._test_image_convert_invalid_vmdk)"},{"line_number":263,"context_line":"        self.assertEqual(\u0027Invalid VMDK create-type specified\u0027, str(e))"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_image_convert_valid_vmdk_no_types(self):"},{"line_number":266,"context_line":"        with mock.patch.object(CONF.image_format, \u0027vmdk_allowed_types\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"6461ead5_8928b78b","side":"PARENT","line":263,"updated":"2024-08-14 15:52:10.000000000","message":"Same issue here as the qcow2 one - you\u0027re making this not catch the actual issue because you\u0027re not mocking the detection well enough.","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    def test_image_convert_invalid_vmdk(self):"},{"line_number":261,"context_line":"        e \u003d self.assertRaises(RuntimeError,"},{"line_number":262,"context_line":"                              self._test_image_convert_invalid_vmdk)"},{"line_number":263,"context_line":"        self.assertEqual(\u0027Invalid VMDK create-type specified\u0027, str(e))"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_image_convert_valid_vmdk_no_types(self):"},{"line_number":266,"context_line":"        with mock.patch.object(CONF.image_format, \u0027vmdk_allowed_types\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f387ac9_85622e40","side":"PARENT","line":263,"in_reply_to":"6461ead5_8928b78b","updated":"2024-08-16 06:16:49.000000000","message":"Done","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":true,"context_lines":[{"line_number":270,"context_line":"            e \u003d self.assertRaises(RuntimeError,"},{"line_number":271,"context_line":"                                  self._test_image_convert_invalid_vmdk)"},{"line_number":272,"context_line":"            self.assertEqual(\u0027Image is a VMDK, but no VMDK createType is \u0027"},{"line_number":273,"context_line":"                             \u0027specified\u0027, str(e))"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_image_convert_valid_vmdk(self):"},{"line_number":276,"context_line":"        with mock.patch.object(CONF.image_format, \u0027vmdk_allowed_types\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"141aa94d_5a12748a","side":"PARENT","line":273,"updated":"2024-08-14 15:52:10.000000000","message":"Same.","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            e \u003d self.assertRaises(RuntimeError,"},{"line_number":271,"context_line":"                                  self._test_image_convert_invalid_vmdk)"},{"line_number":272,"context_line":"            self.assertEqual(\u0027Image is a VMDK, but no VMDK createType is \u0027"},{"line_number":273,"context_line":"                             \u0027specified\u0027, str(e))"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_image_convert_valid_vmdk(self):"},{"line_number":276,"context_line":"        with mock.patch.object(CONF.image_format, \u0027vmdk_allowed_types\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"c8570392_7040314c","side":"PARENT","line":273,"in_reply_to":"141aa94d_5a12748a","updated":"2024-08-16 06:16:49.000000000","message":"Done","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":true,"context_lines":[{"line_number":305,"context_line":"        convert \u003d self._setup_image_convert_info_fail(disk_format\u003d\u0027raw\u0027)"},{"line_number":306,"context_line":"        with mock.patch.object(processutils, \u0027execute\u0027) as exc_mock:"},{"line_number":307,"context_line":"            exc_mock.side_effect \u003d [(\u0027{\"format\":\"raw\"}\u0027, \u0027\u0027),"},{"line_number":308,"context_line":"                                    (\u0027\u0027, \u0027some error\u0027)]"},{"line_number":309,"context_line":"            self.assertRaises(RuntimeError,"},{"line_number":310,"context_line":"                              convert.execute, \u0027file:///test/path.raw\u0027)"},{"line_number":311,"context_line":"            exc_mock.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":9,"id":"718f3738_3a0021be","side":"PARENT","line":308,"updated":"2024-08-14 15:52:10.000000000","message":"This is the same as the qemu-info de-mocking above.","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        convert \u003d self._setup_image_convert_info_fail(disk_format\u003d\u0027raw\u0027)"},{"line_number":306,"context_line":"        with mock.patch.object(processutils, \u0027execute\u0027) as exc_mock:"},{"line_number":307,"context_line":"            exc_mock.side_effect \u003d [(\u0027{\"format\":\"raw\"}\u0027, \u0027\u0027),"},{"line_number":308,"context_line":"                                    (\u0027\u0027, \u0027some error\u0027)]"},{"line_number":309,"context_line":"            self.assertRaises(RuntimeError,"},{"line_number":310,"context_line":"                              convert.execute, \u0027file:///test/path.raw\u0027)"},{"line_number":311,"context_line":"            exc_mock.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":9,"id":"e3d19b00_1dda52a7","side":"PARENT","line":308,"in_reply_to":"718f3738_3a0021be","updated":"2024-08-16 06:16:49.000000000","message":"Done","commit_id":"695fcb67c9cd558db7c96d51290e69259a268ecb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb1aa6ada1945124f49bde51d54c4ec7ed5cc8f3","unresolved":true,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_image_convert_no_inspector_match(self):"},{"line_number":265,"context_line":"        convert \u003d self._setup_image_convert_info_fail()"},{"line_number":266,"context_line":"        self.inspector_mock.return_value \u003d None"},{"line_number":267,"context_line":"        self.assertRaisesRegex(RuntimeError,"},{"line_number":268,"context_line":"                               \u0027Image format detection failed\u0027,"},{"line_number":269,"context_line":"                               convert.execute, \u0027file:///test/path.hpfs\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"6f7f3083_6d611d48","line":266,"updated":"2024-08-14 15:52:10.000000000","message":"This is no longer valid - it should return a raw inspector if it doesn\u0027t detect it as anything else.","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5e7ff7b6c8d51bc1be5bab28043a28372a0f003d","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_image_convert_no_inspector_match(self):"},{"line_number":265,"context_line":"        convert \u003d self._setup_image_convert_info_fail()"},{"line_number":266,"context_line":"        self.inspector_mock.return_value \u003d None"},{"line_number":267,"context_line":"        self.assertRaisesRegex(RuntimeError,"},{"line_number":268,"context_line":"                               \u0027Image format detection failed\u0027,"},{"line_number":269,"context_line":"                               convert.execute, \u0027file:///test/path.hpfs\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1239f768_a0f95484","line":266,"in_reply_to":"6f7f3083_6d611d48","updated":"2024-08-16 06:16:49.000000000","message":"Acknowledged","commit_id":"0098e642d5e779949fe031f060d594d00ab3261f"}]}
