)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6a2cd5b7cf31049402438ea7579d1e7224aa2f34","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Raise error when force_raw_images and images_type are incompatible"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Set \u0027force_raw_images\u0027 to \u0027False\u0027."},{"line_number":10,"context_line":"Set \u0027images_type\u0027 to \u0027rbd\u0027."},{"line_number":11,"context_line":"Use \u0027qcow2\u0027 image format."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"If the image format is qcow2, then the temp image file in _base"},{"line_number":14,"context_line":"folder will be qcow2 format. So using command \u0027rbd import\u0027 to import"},{"line_number":15,"context_line":"image file into rbd volume is just to use qcow2 format image."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"When using a qcow2 as root disk, the instance is spawned but fails to"},{"line_number":18,"context_line":"boot because data is accessed as raw."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"So that the value of force_raw_images and images_type here"},{"line_number":21,"context_line":"are incampatible."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Just raise an error and refuse to start nova-compute service."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I1aa471e8df69fbb6f5d9aeb35651bd32c7123d78"},{"line_number":26,"context_line":"Closes-Bug: 1816686"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fdfeff1_0a2fe188","line":23,"range":{"start_line":9,"start_character":0,"end_line":23,"end_character":61},"updated":"2019-03-04 07:34:02.000000000","message":"these seems too complicated for a commit mesasge, and should be in the bug report as you already have, please put something more directly ilustrating what you are doing in this patch","commit_id":"268926e54fd4e8fdb0616466c4d1594ddcdbdb89"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea00ee8c5c173f7dd42198f98c3a92cd83691fe0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhu.boxiang \u003czhu.boxiang@99cloud.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-14 21:26:18 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Raise error when force_raw_images and images_type are incompatible"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add notice of related options both for force_raw_images and"},{"line_number":10,"context_line":"images_type."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"dfbec78f_657d6b6d","line":7,"updated":"2019-05-04 17:24:45.000000000","message":"This commit message says what the patch is doing, but explain explain why at all. Can\u0027t that be summarized from the bug report?","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"bfdad8c075a1817674f5e10903789dc1ebadc0a7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhu.boxiang \u003czhu.boxiang@99cloud.net\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-14 21:26:18 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Raise error when force_raw_images and images_type are incompatible"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add notice of related options both for force_raw_images and"},{"line_number":10,"context_line":"images_type."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"dfbec78f_aeb7bf86","line":7,"in_reply_to":"dfbec78f_657d6b6d","updated":"2019-05-05 03:35:03.000000000","message":"Done","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"}],"nova/conf/compute.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9799957c3bb443dd719b21929a5150f7ca8b3a37","unresolved":false,"context_lines":[{"line_number":232,"context_line":"Related options:"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``compute_driver``: Only the libvirt driver uses this option."},{"line_number":235,"context_line":"* ``[libvirt]images_type``: If images_type is rbd, setting this option to "},{"line_number":236,"context_line":"  False is not recommended. See the bug "},{"line_number":237,"context_line":"  https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":238,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_162148b6","line":235,"range":{"start_line":235,"start_character":73,"end_line":235,"end_character":74},"updated":"2019-03-04 11:22:36.000000000","message":"pep8 (trailing whitespace)","commit_id":"fde7996f86245c94cb1e20d84a274dbce0cf852d"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9799957c3bb443dd719b21929a5150f7ca8b3a37","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``compute_driver``: Only the libvirt driver uses this option."},{"line_number":235,"context_line":"* ``[libvirt]images_type``: If images_type is rbd, setting this option to "},{"line_number":236,"context_line":"  False is not recommended. See the bug "},{"line_number":237,"context_line":"  https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":238,"context_line":"\"\"\"),"},{"line_number":239,"context_line":"# NOTE(yamahata): ListOpt won\u0027t work because the command may include a comma."}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_aa2330a7","line":236,"range":{"start_line":236,"start_character":15,"end_line":236,"end_character":26},"updated":"2019-03-04 11:22:36.000000000","message":"is not *compatible*. We\u0027re going to refuse to start the nova compute service, so \u0027recommended\u0027 isn\u0027t strong enough here.","commit_id":"fde7996f86245c94cb1e20d84a274dbce0cf852d"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9799957c3bb443dd719b21929a5150f7ca8b3a37","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``compute_driver``: Only the libvirt driver uses this option."},{"line_number":235,"context_line":"* ``[libvirt]images_type``: If images_type is rbd, setting this option to "},{"line_number":236,"context_line":"  False is not recommended. See the bug "},{"line_number":237,"context_line":"  https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":238,"context_line":"\"\"\"),"},{"line_number":239,"context_line":"# NOTE(yamahata): ListOpt won\u0027t work because the command may include a comma."}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_d62ae08f","line":236,"range":{"start_line":236,"start_character":39,"end_line":236,"end_character":40},"updated":"2019-03-04 11:22:36.000000000","message":"pep8 (trailing whitespace)","commit_id":"fde7996f86245c94cb1e20d84a274dbce0cf852d"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"caeafdbfe72faacdea6a60b62c3339076731d3b8","unresolved":false,"context_lines":[{"line_number":232,"context_line":"Related options:"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``compute_driver``: Only the libvirt driver uses this option."},{"line_number":235,"context_line":"* ``[libvirt]/images_type``: If images_type is rbd, setting this option"},{"line_number":236,"context_line":"  to False is not compatible. See the bug"},{"line_number":237,"context_line":"  https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":238,"context_line":"\"\"\"),"},{"line_number":239,"context_line":"# NOTE(yamahata): ListOpt won\u0027t work because the command may include a comma."},{"line_number":240,"context_line":"# For example:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_33a8071e","line":237,"range":{"start_line":235,"start_character":0,"end_line":237,"end_character":64},"updated":"2019-03-07 08:00:59.000000000","message":"Note the relation between force_raw_images and the images_type. Here the patch only notices the rbd imagebackend, so that, remove the lvm images_type.","commit_id":"430e37ad0dd8a8180f10888cf708a82e32ab48ae"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dfde6ba0c7b4f3499fd56dfb1bc262e20f677714","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``compute_driver``: Only the libvirt driver uses this option."},{"line_number":235,"context_line":"* ``[libvirt]/images_type``: If images_type is rbd, setting this option"},{"line_number":236,"context_line":"  to False is not compatible. See the bug"},{"line_number":237,"context_line":"  https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":238,"context_line":"\"\"\"),"},{"line_number":239,"context_line":"# NOTE(yamahata): ListOpt won\u0027t work because the command may include a comma."}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_8be83ce2","line":236,"range":{"start_line":236,"start_character":18,"end_line":236,"end_character":28},"updated":"2019-03-12 19:11:45.000000000","message":"allowed","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``compute_driver``: Only the libvirt driver uses this option."},{"line_number":235,"context_line":"* ``[libvirt]/images_type``: If images_type is rbd, setting this option"},{"line_number":236,"context_line":"  to False is not compatible. See the bug"},{"line_number":237,"context_line":"  https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":238,"context_line":"\"\"\"),"},{"line_number":239,"context_line":"# NOTE(yamahata): ListOpt won\u0027t work because the command may include a comma."}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_74d4b520","line":236,"range":{"start_line":236,"start_character":18,"end_line":236,"end_character":28},"in_reply_to":"5fc1f717_8be83ce2","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"}],"nova/conf/libvirt.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":852,"context_line":"* virt.use_cow_images"},{"line_number":853,"context_line":"* images_volume_group"},{"line_number":854,"context_line":"* [workarounds]/ensure_libvirt_rbd_instance_dir_cleanup"},{"line_number":855,"context_line":"* virt.force_raw_images"},{"line_number":856,"context_line":"\"\"\"),"},{"line_number":857,"context_line":"    cfg.StrOpt(\u0027images_volume_group\u0027,"},{"line_number":858,"context_line":"               help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_9c688cb9","line":855,"range":{"start_line":855,"start_character":2,"end_line":855,"end_character":6},"updated":"2019-03-12 19:07:03.000000000","message":"compute?\n\nThis should be fixed up to make L852-5 correct and consistent (possibly in a separate patch).","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":852,"context_line":"* virt.use_cow_images"},{"line_number":853,"context_line":"* images_volume_group"},{"line_number":854,"context_line":"* [workarounds]/ensure_libvirt_rbd_instance_dir_cleanup"},{"line_number":855,"context_line":"* virt.force_raw_images"},{"line_number":856,"context_line":"\"\"\"),"},{"line_number":857,"context_line":"    cfg.StrOpt(\u0027images_volume_group\u0027,"},{"line_number":858,"context_line":"               help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_cf5dd015","line":855,"range":{"start_line":855,"start_character":2,"end_line":855,"end_character":6},"in_reply_to":"5fc1f717_9c688cb9","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"}],"nova/exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea00ee8c5c173f7dd42198f98c3a92cd83691fe0","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"class InvalidConfiguration(Invalid):"},{"line_number":191,"context_line":"    msg_fmt \u003d _(\"Configuration is Invalid.\")"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"class InvalidBDM(Invalid):"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_25977393","line":191,"range":{"start_line":191,"start_character":34,"end_line":191,"end_character":35},"updated":"2019-05-04 17:24:45.000000000","message":"i","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"462e6d38c4f4ad47d591c67d2207a1a0fe73ac0c","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"class InvalidConfiguration(Invalid):"},{"line_number":191,"context_line":"    msg_fmt \u003d _(\"Configuration is Invalid.\")"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"class InvalidBDM(Invalid):"}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_b470c909","line":191,"range":{"start_line":191,"start_character":34,"end_line":191,"end_character":35},"updated":"2019-05-15 20:23:19.000000000","message":"i (mentioned by mriedem in ps19 too)","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7f06defa069c838f1a14bcce0a32bc1bf789c07a","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"class InvalidConfiguration(Invalid):"},{"line_number":191,"context_line":"    msg_fmt \u003d _(\"Configuration is Invalid.\")"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"class InvalidBDM(Invalid):"}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_55986673","line":191,"range":{"start_line":191,"start_character":34,"end_line":191,"end_character":35},"in_reply_to":"dfbec78f_b470c909","updated":"2019-05-16 02:22:47.000000000","message":"Done","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"}],"nova/test.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb236d29a0c866e04f8c2f2f1c7b4084b0549c54","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        compute.stop()"},{"line_number":427,"context_line":"        compute.manager.rt \u003d resource_tracker.ResourceTracker(host, driver)"},{"line_number":428,"context_line":"        with utils.nested_contexts("},{"line_number":429,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027),"},{"line_number":430,"context_line":"        ) as (mock_backend,):"},{"line_number":431,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"},{"line_number":432,"context_line":"            compute.start()"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_fa1331b7","line":429,"updated":"2019-05-05 13:37:45.000000000","message":"This feels really invasive. Do we need to mock this at every compute service restart in every test?","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1b88723a2e988a8999a90fa0b596252f17b65fd0","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        compute.stop()"},{"line_number":427,"context_line":"        compute.manager.rt \u003d resource_tracker.ResourceTracker(host, driver)"},{"line_number":428,"context_line":"        with utils.nested_contexts("},{"line_number":429,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027),"},{"line_number":430,"context_line":"        ) as (mock_backend,):"},{"line_number":431,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"},{"line_number":432,"context_line":"            compute.start()"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_040267b5","line":429,"in_reply_to":"dfbec78f_fa1331b7","updated":"2019-05-06 06:57:38.000000000","message":"Done","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"}],"nova/tests/fixtures.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb236d29a0c866e04f8c2f2f1c7b4084b0549c54","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        with utils.nested_contexts("},{"line_number":100,"context_line":"            mock.patch(\u0027nova.context.get_admin_context\u0027,"},{"line_number":101,"context_line":"                       return_value\u003dself.ctxt),"},{"line_number":102,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027)"},{"line_number":103,"context_line":"        ) as (_, mock_backend):"},{"line_number":104,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"},{"line_number":105,"context_line":"            self.service \u003d service.Service.create(**self.kwargs)"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_ba0db991","line":102,"updated":"2019-05-05 13:37:45.000000000","message":"This feel really invasive. Do we really need to set this for every Service create in every test?","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1b88723a2e988a8999a90fa0b596252f17b65fd0","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        with utils.nested_contexts("},{"line_number":100,"context_line":"            mock.patch(\u0027nova.context.get_admin_context\u0027,"},{"line_number":101,"context_line":"                       return_value\u003dself.ctxt),"},{"line_number":102,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027)"},{"line_number":103,"context_line":"        ) as (_, mock_backend):"},{"line_number":104,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"},{"line_number":105,"context_line":"            self.service \u003d service.Service.create(**self.kwargs)"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_24ff6bab","line":102,"in_reply_to":"dfbec78f_ba0db991","updated":"2019-05-06 06:57:38.000000000","message":"Done","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"}],"nova/tests/unit/virt/libvirt/test_imagebackend.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"97b1249e114671a7fbb7165776f315a8dd2836de","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"                       return_value\u003dimageutils.QemuImgInfo())"},{"line_number":1420,"context_line":"    @mock.patch.object(imagebackend.Rbd, \u0027exists\u0027)"},{"line_number":1421,"context_line":"    def test_create_image_qcow2_cache_image(self, mock_exists, mock_qemu,"},{"line_number":1422,"context_line":"                                              mock_remove):"},{"line_number":1423,"context_line":"        fn \u003d mock.MagicMock()"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"        rbd_utils.rbd.RBD_FEATURE_LAYERING \u003d 1"}],"source_content_type":"text/x-python","patch_set":22,"id":"dfbec78f_72383ced","line":1422,"range":{"start_line":1422,"start_character":44,"end_line":1422,"end_character":46},"updated":"2019-05-14 15:14:21.000000000","message":"alignment","commit_id":"1551def128e90e7068db0d25adebf2260e5db712"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb46daa4bb04c528614a378b2362c6d6c2f560d9","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"                       return_value\u003dimageutils.QemuImgInfo())"},{"line_number":1420,"context_line":"    @mock.patch.object(imagebackend.Rbd, \u0027exists\u0027)"},{"line_number":1421,"context_line":"    def test_create_image_qcow2_cache_image(self, mock_exists, mock_qemu,"},{"line_number":1422,"context_line":"                                              mock_remove):"},{"line_number":1423,"context_line":"        fn \u003d mock.MagicMock()"},{"line_number":1424,"context_line":""},{"line_number":1425,"context_line":"        rbd_utils.rbd.RBD_FEATURE_LAYERING \u003d 1"}],"source_content_type":"text/x-python","patch_set":22,"id":"dfbec78f_11d1b523","line":1422,"range":{"start_line":1422,"start_character":44,"end_line":1422,"end_character":46},"in_reply_to":"dfbec78f_72383ced","updated":"2019-05-15 01:59:14.000000000","message":"Done","commit_id":"1551def128e90e7068db0d25adebf2260e5db712"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"97b1249e114671a7fbb7165776f315a8dd2836de","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"        self.assertEqual(fake_processutils.fake_execute_get_log(),"},{"line_number":1441,"context_line":"                         [\u0027 \u0027.join(cmd)])"},{"line_number":1442,"context_line":"        mock_exists.assert_has_calls([mock.call(), mock.call()])"},{"line_number":1443,"context_line":"        self.assertEqual(2, fn.call_count)"},{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"    @mock.patch.object(images, \u0027qemu_img_info\u0027,"},{"line_number":1446,"context_line":"                       return_value\u003dimageutils.QemuImgInfo())"}],"source_content_type":"text/x-python","patch_set":22,"id":"dfbec78f_72111c5d","line":1443,"updated":"2019-05-14 15:14:21.000000000","message":"You need to assert that remove was called with the expected path, as well as assert that qemu_img_info was called.","commit_id":"1551def128e90e7068db0d25adebf2260e5db712"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb46daa4bb04c528614a378b2362c6d6c2f560d9","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"        self.assertEqual(fake_processutils.fake_execute_get_log(),"},{"line_number":1441,"context_line":"                         [\u0027 \u0027.join(cmd)])"},{"line_number":1442,"context_line":"        mock_exists.assert_has_calls([mock.call(), mock.call()])"},{"line_number":1443,"context_line":"        self.assertEqual(2, fn.call_count)"},{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"    @mock.patch.object(images, \u0027qemu_img_info\u0027,"},{"line_number":1446,"context_line":"                       return_value\u003dimageutils.QemuImgInfo())"}],"source_content_type":"text/x-python","patch_set":22,"id":"dfbec78f_71b831e4","line":1443,"in_reply_to":"dfbec78f_72111c5d","updated":"2019-05-15 01:59:14.000000000","message":"Done","commit_id":"1551def128e90e7068db0d25adebf2260e5db712"}],"nova/tests/unit/virt/test_virt_drivers.py":[{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"caeafdbfe72faacdea6a60b62c3339076731d3b8","unresolved":false,"context_lines":[{"line_number":908,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"},{"line_number":909,"context_line":"            self.connection.init_host(\u0027myhostname\u0027)"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    def test_init_host_raise_invalid_configuration(self):"},{"line_number":912,"context_line":"        CONF.set_override(\u0027force_raw_images\u0027, False)"},{"line_number":913,"context_line":"        with test.nested("},{"line_number":914,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027),"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_f367df24","line":911,"range":{"start_line":911,"start_character":8,"end_line":911,"end_character":50},"updated":"2019-03-07 08:00:59.000000000","message":"Add unit test for init_host when the force_raw_images is False and REQUIRES_RAW_IMPORT of rbd imagebackend is True, catch the raise of it.","commit_id":"430e37ad0dd8a8180f10888cf708a82e32ab48ae"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":902,"context_line":"        self.stub_out(\u0027os_vif.unplug\u0027, lambda a, kw: None)"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"    def test_init_host(self):"},{"line_number":905,"context_line":"        with test.nested("},{"line_number":906,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027),"},{"line_number":907,"context_line":"        ) as (mock_backend,):"},{"line_number":908,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_1c8b3c6e","line":905,"range":{"start_line":905,"start_character":7,"end_line":905,"end_character":25},"updated":"2019-03-12 19:07:03.000000000","message":"test.nested isn\u0027t necessary when only one patch is being used.\n\nFor that matter, you could just use @mock.patch.object as a decorator in this case.","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":902,"context_line":"        self.stub_out(\u0027os_vif.unplug\u0027, lambda a, kw: None)"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"    def test_init_host(self):"},{"line_number":905,"context_line":"        with test.nested("},{"line_number":906,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027),"},{"line_number":907,"context_line":"        ) as (mock_backend,):"},{"line_number":908,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_801c92c1","line":905,"range":{"start_line":905,"start_character":7,"end_line":905,"end_character":25},"in_reply_to":"5fc1f717_1c8b3c6e","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    def test_init_host_raise_invalid_configuration(self):"},{"line_number":912,"context_line":"        CONF.set_override(\u0027force_raw_images\u0027, False)"},{"line_number":913,"context_line":"        with test.nested("},{"line_number":914,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027),"},{"line_number":915,"context_line":"        ) as (mock_backend,):"},{"line_number":916,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_bc7b0879","line":913,"range":{"start_line":913,"start_character":13,"end_line":913,"end_character":24},"updated":"2019-03-12 19:07:03.000000000","message":"ditto","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    def test_init_host_raise_invalid_configuration(self):"},{"line_number":912,"context_line":"        CONF.set_override(\u0027force_raw_images\u0027, False)"},{"line_number":913,"context_line":"        with test.nested("},{"line_number":914,"context_line":"            mock.patch.object(imagebackend.Backend, \u0027backend\u0027),"},{"line_number":915,"context_line":"        ) as (mock_backend,):"},{"line_number":916,"context_line":"            mock_backend.return_value.REQUIRES_RAW_IMPORT \u003d True"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_207b5ef5","line":913,"range":{"start_line":913,"start_character":13,"end_line":913,"end_character":24},"in_reply_to":"5fc1f717_bc7b0879","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb564e8c6115f81da41d0cc10b2a8209affcf105","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        mock_walk.return_value \u003d [(None, None, [\u0027mock_file\u0027])]"},{"line_number":933,"context_line":"        mock_qemu.return_value.file_format \u003d \u0027qcow2\u0027"},{"line_number":934,"context_line":"        self.connection._check_and_remove_non_raw_cache_image_files()"},{"line_number":935,"context_line":"        self.assertEqual(1, mock_remove.call_count)"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    @mock.patch.object(images, \u0027qemu_img_info\u0027,"},{"line_number":938,"context_line":"                       return_value\u003dimageutils.QemuImgInfo())"}],"source_content_type":"text/x-python","patch_set":19,"id":"5fc1f717_5b7513f9","line":935,"updated":"2019-03-14 19:56:45.000000000","message":"✔","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb564e8c6115f81da41d0cc10b2a8209affcf105","unresolved":false,"context_lines":[{"line_number":943,"context_line":"        mock_walk.return_value \u003d [(None, None, [\u0027mock_file\u0027])]"},{"line_number":944,"context_line":"        mock_qemu.return_value.file_format \u003d \u0027raw\u0027"},{"line_number":945,"context_line":"        self.connection._check_and_remove_non_raw_cache_image_files()"},{"line_number":946,"context_line":"        self.assertEqual(0, mock_remove.call_count)"},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"    def test_force_hard_reboot(self):"},{"line_number":949,"context_line":"        self.flags(wait_soft_reboot_seconds\u003d0, group\u003d\u0027libvirt\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5fc1f717_7b700f09","line":946,"updated":"2019-03-14 19:56:45.000000000","message":"✔","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"}],"nova/virt/images.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"544975229fae7867a55c9df42b3dcc75f50aff3e","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    _convert_image(source, dest, in_format, out_format, run_as_root)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"def convert_image_unsafe(source, dest, out_format, run_as_root\u003dFalse):"},{"line_number":107,"context_line":"    \"\"\"Convert image to other format, doing unsafe automatic input format"},{"line_number":108,"context_line":"    detection. Do not call this function."},{"line_number":109,"context_line":"    \"\"\""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    # NOTE: there is only 1 caller of this function:"},{"line_number":112,"context_line":"    # imagebackend.Lvm.create_image. It is not easy to fix that without a"},{"line_number":113,"context_line":"    # larger refactor, so for the moment it has been manually audited and"},{"line_number":114,"context_line":"    # allowed to continue. Remove this function when Lvm.create_image has"},{"line_number":115,"context_line":"    # been fixed."},{"line_number":116,"context_line":"    _convert_image(source, dest, None, out_format, run_as_root)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def _convert_image(source, dest, in_format, out_format, run_as_root):"},{"line_number":120,"context_line":"    try:"},{"line_number":121,"context_line":"        with compute_utils.disk_ops_semaphore:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_20baea6d","side":"PARENT","line":118,"range":{"start_line":106,"start_character":0,"end_line":118,"end_character":0},"updated":"2019-03-05 09:52:25.000000000","message":"Nice :)","commit_id":"727b942a88a812afb7368b4d7d3c314a4f8554ed"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"27ccb793010529a0a43a377c6f2f65b9bc371c47","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":570,"context_line":"            self._recreate_assigned_mediated_devices()"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        # Remove the code once the bug has been fixed by other ways."},{"line_number":573,"context_line":"        # https://bugs.launchpad.net/nova/+bug/1816686"},{"line_number":574,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \u0027rbd\u0027 and not CONF.force_raw_images:"},{"line_number":575,"context_line":"            msg \u003d _(\"Setting \u0027images_type\u0027 of libvirt to \u0027rbd\u0027 and \""},{"line_number":576,"context_line":"                    \"\u0027force_raw_images\u0027 to \u0027False\u0027 at the same \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_560a7079","line":573,"range":{"start_line":572,"start_character":0,"end_line":573,"end_character":54},"updated":"2019-03-04 11:13:35.000000000","message":"Definitely reference the bug here, but please also include a brief outline of the actual problem in this comment. Something like:\n\nSome imagebackends are only able to import raw disk images, and will fail if given any other format.","commit_id":"268926e54fd4e8fdb0616466c4d1594ddcdbdb89"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"27ccb793010529a0a43a377c6f2f65b9bc371c47","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        # Remove the code once the bug has been fixed by other ways."},{"line_number":573,"context_line":"        # https://bugs.launchpad.net/nova/+bug/1816686"},{"line_number":574,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \u0027rbd\u0027 and not CONF.force_raw_images:"},{"line_number":575,"context_line":"            msg \u003d _(\"Setting \u0027images_type\u0027 of libvirt to \u0027rbd\u0027 and \""},{"line_number":576,"context_line":"                    \"\u0027force_raw_images\u0027 to \u0027False\u0027 at the same \""},{"line_number":577,"context_line":"                    \"time is incompatible. Instances will fail to \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_9b86c116","line":574,"updated":"2019-03-04 11:13:35.000000000","message":"This is a restriction of the imagebackend, and it\u0027s not specific to Rbd. It would be nicer to move this metadata into the imagebackends themselves. Something like:\n\nnova/virt/libvirt/imagebackend.py\n\n  class Image(object):\n    REQUIRES_RAW_IMPORT \u003d False\n\n  class Rbd(Image):\n    REQUIRES_RAW_IMPORT \u003d True\n\nThen here:\n\n  if not CONF.force_raw_images and self.image_backend.backend().REQUIRES_RAW_IMPORT:\n    ... refuse to start ...\n\nThis makes it more directly obvious to the future maintainer where the restriction comes from. We also don\u0027t need to change this code if/when we update the LVM imagebackend.","commit_id":"268926e54fd4e8fdb0616466c4d1594ddcdbdb89"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6a2cd5b7cf31049402438ea7579d1e7224aa2f34","unresolved":false,"context_lines":[{"line_number":575,"context_line":"            msg \u003d _(\"Setting \u0027images_type\u0027 of libvirt to \u0027rbd\u0027 and \""},{"line_number":576,"context_line":"                    \"\u0027force_raw_images\u0027 to \u0027False\u0027 at the same \""},{"line_number":577,"context_line":"                    \"time is incompatible. Instances will fail to \""},{"line_number":578,"context_line":"                    \"boot with non booted_from_volume.\")"},{"line_number":579,"context_line":"            raise exception.Invalid(msg)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_eab4dd38","line":578,"range":{"start_line":578,"start_character":35,"end_line":578,"end_character":53},"updated":"2019-03-04 07:34:02.000000000","message":"don\u0027t know whether this is a valid thing.","commit_id":"268926e54fd4e8fdb0616466c4d1594ddcdbdb89"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"a18d7672ab5f10953e0b828d29839b2d1f5be0ca","unresolved":false,"context_lines":[{"line_number":575,"context_line":"            msg \u003d _(\"Setting \u0027images_type\u0027 of libvirt to \u0027rbd\u0027 and \""},{"line_number":576,"context_line":"                    \"\u0027force_raw_images\u0027 to \u0027False\u0027 at the same \""},{"line_number":577,"context_line":"                    \"time is incompatible. Instances will fail to \""},{"line_number":578,"context_line":"                    \"boot with non booted_from_volume.\")"},{"line_number":579,"context_line":"            raise exception.Invalid(msg)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_3bca3546","line":578,"range":{"start_line":578,"start_character":35,"end_line":578,"end_character":53},"in_reply_to":"9fdfeff1_eab4dd38","updated":"2019-03-04 10:25:42.000000000","message":"If instance is booted from volume, so the image will be injected by \u0027cinder\u0027 and convert to \u0027raw\u0027 if using \u0027rbd\u0027.\nHere in nova project, https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L3418\nwill judge whether the volume is bootable.\nWhen using rbd nackend, if the image(downloading from glance and cache it into local storage) does not convert from like \u0027qcow2\u0027 to \u0027raw\u0027, the instance will fail to boot.\nhttp://docs.ceph.com/docs/master/rbd/rbd-openstack/","commit_id":"268926e54fd4e8fdb0616466c4d1594ddcdbdb89"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"27ccb793010529a0a43a377c6f2f65b9bc371c47","unresolved":false,"context_lines":[{"line_number":575,"context_line":"            msg \u003d _(\"Setting \u0027images_type\u0027 of libvirt to \u0027rbd\u0027 and \""},{"line_number":576,"context_line":"                    \"\u0027force_raw_images\u0027 to \u0027False\u0027 at the same \""},{"line_number":577,"context_line":"                    \"time is incompatible. Instances will fail to \""},{"line_number":578,"context_line":"                    \"boot with non booted_from_volume.\")"},{"line_number":579,"context_line":"            raise exception.Invalid(msg)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_3677ac3e","line":578,"range":{"start_line":578,"start_character":35,"end_line":578,"end_character":53},"in_reply_to":"9fdfeff1_eab4dd38","updated":"2019-03-04 11:13:35.000000000","message":"Yeah, boot from volume isn\u0027t involved here. This message is confusing. I\u0027d go with something simple like:\n\n\u0027[libvirt]/images_type \u003d %(images_type)s\u0027 is not compatible with \u0027[DEFAULT]/force_raw_images \u003d False\u0027.\n\nWe\u0027ll want to handle more than just rbd here.","commit_id":"268926e54fd4e8fdb0616466c4d1594ddcdbdb89"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"27ccb793010529a0a43a377c6f2f65b9bc371c47","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                    \"\u0027force_raw_images\u0027 to \u0027False\u0027 at the same \""},{"line_number":577,"context_line":"                    \"time is incompatible. Instances will fail to \""},{"line_number":578,"context_line":"                    \"boot with non booted_from_volume.\")"},{"line_number":579,"context_line":"            raise exception.Invalid(msg)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    @staticmethod"},{"line_number":582,"context_line":"    def _is_existing_mdev(uuid):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_f6be04ad","line":579,"range":{"start_line":579,"start_character":28,"end_line":579,"end_character":35},"updated":"2019-03-04 11:13:35.000000000","message":"This isn\u0027t the right exception to raise here. I went looking for an existing exception that we raise either for invalid configuration, or which we use to refuse to start a service, but either we don\u0027t have one or my grep-fu was failing me. I suggest we should create a new slightly generic exception called something like InvalidConfiguration in nova/exception.py and raise that.\n\nYou might want to get a second opinion on that, though. What do we normally do when we\u0027re refusing to start a service?","commit_id":"268926e54fd4e8fdb0616466c4d1594ddcdbdb89"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"caeafdbfe72faacdea6a60b62c3339076731d3b8","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            # We should check and remove the non-raw cache image files."},{"line_number":585,"context_line":"            # If we don\u0027t do it, the instance will fail to boot."},{"line_number":586,"context_line":"            else:"},{"line_number":587,"context_line":"                self._check_and_remove_non_raw_cache_image_files()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    @staticmethod"},{"line_number":590,"context_line":"    def _is_existing_mdev(uuid):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_d3198388","line":587,"range":{"start_line":587,"start_character":21,"end_line":587,"end_character":64},"updated":"2019-03-07 08:00:59.000000000","message":"Fetch all the cache image files under ${instance_path}/${image_cache_subdirectory_name}. Check the format of it. If the format is not raw, just remove it to prevent that instances will fail to boot with the images(non-raw).","commit_id":"430e37ad0dd8a8180f10888cf708a82e32ab48ae"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dfde6ba0c7b4f3499fd56dfb1bc262e20f677714","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        if self.image_backend.backend().REQUIRES_RAW_IMPORT:"},{"line_number":576,"context_line":"            if not CONF.force_raw_images:"},{"line_number":577,"context_line":"                msg \u003d _(\"\u0027[DEFAULT]/force_raw_images \u003d False\u0027 is not \""},{"line_number":578,"context_line":"                        \"compatible with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":579,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":580,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":581,"context_line":"                        \"force_raw_images to True. At last, you need to \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_0b91ac47","line":578,"range":{"start_line":578,"start_character":25,"end_line":578,"end_character":35},"updated":"2019-03-12 19:11:45.000000000","message":"allowed","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        if self.image_backend.backend().REQUIRES_RAW_IMPORT:"},{"line_number":576,"context_line":"            if not CONF.force_raw_images:"},{"line_number":577,"context_line":"                msg \u003d _(\"\u0027[DEFAULT]/force_raw_images \u003d False\u0027 is not \""},{"line_number":578,"context_line":"                        \"compatible with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":579,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":580,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":581,"context_line":"                        \"force_raw_images to True. At last, you need to \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_60fba646","line":578,"range":{"start_line":578,"start_character":25,"end_line":578,"end_character":35},"in_reply_to":"5fc1f717_0b91ac47","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        \"compatible with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":579,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":580,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":581,"context_line":"                        \"force_raw_images to True. At last, you need to \""},{"line_number":582,"context_line":"                        \"restart your nova-compute service.\")"},{"line_number":583,"context_line":"                raise exception.InvalidConfiguration(msg)"},{"line_number":584,"context_line":"            # We should check and remove the non-raw cache image files."},{"line_number":585,"context_line":"            # If we don\u0027t do it, the instance will fail to boot."}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_fc38b0a0","line":582,"range":{"start_line":581,"start_character":50,"end_line":582,"end_character":59},"updated":"2019-03-12 19:07:03.000000000","message":"This is unnecessary.","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        \"compatible with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":579,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":580,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":581,"context_line":"                        \"force_raw_images to True. At last, you need to \""},{"line_number":582,"context_line":"                        \"restart your nova-compute service.\")"},{"line_number":583,"context_line":"                raise exception.InvalidConfiguration(msg)"},{"line_number":584,"context_line":"            # We should check and remove the non-raw cache image files."},{"line_number":585,"context_line":"            # If we don\u0027t do it, the instance will fail to boot."}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_80f81249","line":582,"range":{"start_line":581,"start_character":50,"end_line":582,"end_character":59},"in_reply_to":"5fc1f717_fc38b0a0","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":583,"context_line":"                raise exception.InvalidConfiguration(msg)"},{"line_number":584,"context_line":"            # We should check and remove the non-raw cache image files."},{"line_number":585,"context_line":"            # If we don\u0027t do it, the instance will fail to boot."},{"line_number":586,"context_line":"            else:"},{"line_number":587,"context_line":"                self._check_and_remove_non_raw_cache_image_files()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_dcb854e6","line":586,"range":{"start_line":586,"start_character":12,"end_line":586,"end_character":16},"updated":"2019-03-12 19:07:03.000000000","message":"nit: redundant","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":583,"context_line":"                raise exception.InvalidConfiguration(msg)"},{"line_number":584,"context_line":"            # We should check and remove the non-raw cache image files."},{"line_number":585,"context_line":"            # If we don\u0027t do it, the instance will fail to boot."},{"line_number":586,"context_line":"            else:"},{"line_number":587,"context_line":"                self._check_and_remove_non_raw_cache_image_files()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_2097deee","line":586,"range":{"start_line":586,"start_character":12,"end_line":586,"end_character":16},"in_reply_to":"5fc1f717_dcb854e6","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dfde6ba0c7b4f3499fd56dfb1bc262e20f677714","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            # We should check and remove the non-raw cache image files."},{"line_number":585,"context_line":"            # If we don\u0027t do it, the instance will fail to boot."},{"line_number":586,"context_line":"            else:"},{"line_number":587,"context_line":"                self._check_and_remove_non_raw_cache_image_files()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    @staticmethod"},{"line_number":590,"context_line":"    def _is_existing_mdev(uuid):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_cb96443f","line":587,"range":{"start_line":587,"start_character":16,"end_line":587,"end_character":66},"updated":"2019-03-12 19:11:45.000000000","message":"need test for this code path...","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":584,"context_line":"            # We should check and remove the non-raw cache image files."},{"line_number":585,"context_line":"            # If we don\u0027t do it, the instance will fail to boot."},{"line_number":586,"context_line":"            else:"},{"line_number":587,"context_line":"                self._check_and_remove_non_raw_cache_image_files()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    @staticmethod"},{"line_number":590,"context_line":"    def _is_existing_mdev(uuid):"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_ad8d02d4","line":587,"range":{"start_line":587,"start_character":16,"end_line":587,"end_character":66},"in_reply_to":"5fc1f717_cb96443f","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dfde6ba0c7b4f3499fd56dfb1bc262e20f677714","unresolved":false,"context_lines":[{"line_number":596,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":597,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":600,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":601,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":602,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_aba17896","line":599,"range":{"start_line":599,"start_character":8,"end_line":599,"end_character":51},"updated":"2019-03-12 19:11:45.000000000","message":"...and this method.","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":596,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":597,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":600,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":601,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":602,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_0db6968b","line":599,"range":{"start_line":599,"start_character":8,"end_line":599,"end_character":51},"in_reply_to":"5fc1f717_aba17896","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        clean up the non-raw cache image files to prevent that the instances"},{"line_number":603,"context_line":"        fail to boot."},{"line_number":604,"context_line":"        \"\"\""},{"line_number":605,"context_line":"        image_cache_path \u003d CONF.instances_path + \u0027/\u0027 + \\"},{"line_number":606,"context_line":"            CONF.image_cache_subdirectory_name"},{"line_number":607,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                path \u003d image_cache_path + \u0027/\u0027 + image_file"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_1cda5c4b","line":606,"range":{"start_line":605,"start_character":27,"end_line":606,"end_character":46},"updated":"2019-03-12 19:07:03.000000000","message":"os.path.join\n\n[unrelated] should consider making this a helper method on image_backend","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        clean up the non-raw cache image files to prevent that the instances"},{"line_number":603,"context_line":"        fail to boot."},{"line_number":604,"context_line":"        \"\"\""},{"line_number":605,"context_line":"        image_cache_path \u003d CONF.instances_path + \u0027/\u0027 + \\"},{"line_number":606,"context_line":"            CONF.image_cache_subdirectory_name"},{"line_number":607,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                path \u003d image_cache_path + \u0027/\u0027 + image_file"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_17a30902","line":606,"range":{"start_line":605,"start_character":27,"end_line":606,"end_character":46},"in_reply_to":"5fc1f717_1cda5c4b","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":606,"context_line":"            CONF.image_cache_subdirectory_name"},{"line_number":607,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                path \u003d image_cache_path + \u0027/\u0027 + image_file"},{"line_number":610,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":611,"context_line":"                if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":612,"context_line":"                    processutils.execute(\"rm\", \"-f\", path)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_9ce5ec0b","line":609,"range":{"start_line":609,"start_character":23,"end_line":609,"end_character":58},"updated":"2019-03-12 19:07:03.000000000","message":"ditto","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":606,"context_line":"            CONF.image_cache_subdirectory_name"},{"line_number":607,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                path \u003d image_cache_path + \u0027/\u0027 + image_file"},{"line_number":610,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":611,"context_line":"                if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":612,"context_line":"                    processutils.execute(\"rm\", \"-f\", path)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5fc1f717_77a28dff","line":609,"range":{"start_line":609,"start_character":23,"end_line":609,"end_character":58},"in_reply_to":"5fc1f717_9ce5ec0b","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e75911ca26c7f7539d5d9acafc06bc39c8d4d7d0","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        \"\"\""},{"line_number":603,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":604,"context_line":"                                        CONF.image_cache_subdirectory_name)"},{"line_number":605,"context_line":"        print(\"\u003d\u003d\")"},{"line_number":606,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":607,"context_line":"            print(\"--\")"},{"line_number":608,"context_line":"            for image_file in files:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_92f050ff","line":605,"range":{"start_line":605,"start_character":8,"end_line":605,"end_character":19},"updated":"2019-03-14 06:43:03.000000000","message":"Remove it.","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"019f1bfaa25cd9cf78b00ddbb0aa416f1b22bd6f","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        \"\"\""},{"line_number":603,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":604,"context_line":"                                        CONF.image_cache_subdirectory_name)"},{"line_number":605,"context_line":"        print(\"\u003d\u003d\")"},{"line_number":606,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":607,"context_line":"            print(\"--\")"},{"line_number":608,"context_line":"            for image_file in files:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_55fad2bc","line":605,"range":{"start_line":605,"start_character":8,"end_line":605,"end_character":19},"in_reply_to":"5fc1f717_92f050ff","updated":"2019-03-14 08:17:52.000000000","message":"Done","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e75911ca26c7f7539d5d9acafc06bc39c8d4d7d0","unresolved":false,"context_lines":[{"line_number":604,"context_line":"                                        CONF.image_cache_subdirectory_name)"},{"line_number":605,"context_line":"        print(\"\u003d\u003d\")"},{"line_number":606,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":607,"context_line":"            print(\"--\")"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                print(\"__\")"},{"line_number":610,"context_line":"                path \u003d os.path.join(image_cache_path, image_file)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_b2f54cef","line":607,"range":{"start_line":607,"start_character":12,"end_line":607,"end_character":23},"updated":"2019-03-14 06:43:03.000000000","message":"ditto","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"019f1bfaa25cd9cf78b00ddbb0aa416f1b22bd6f","unresolved":false,"context_lines":[{"line_number":604,"context_line":"                                        CONF.image_cache_subdirectory_name)"},{"line_number":605,"context_line":"        print(\"\u003d\u003d\")"},{"line_number":606,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":607,"context_line":"            print(\"--\")"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                print(\"__\")"},{"line_number":610,"context_line":"                path \u003d os.path.join(image_cache_path, image_file)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_75f7ced4","line":607,"range":{"start_line":607,"start_character":12,"end_line":607,"end_character":23},"in_reply_to":"5fc1f717_b2f54cef","updated":"2019-03-14 08:17:52.000000000","message":"Done","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e75911ca26c7f7539d5d9acafc06bc39c8d4d7d0","unresolved":false,"context_lines":[{"line_number":606,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":607,"context_line":"            print(\"--\")"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                print(\"__\")"},{"line_number":610,"context_line":"                path \u003d os.path.join(image_cache_path, image_file)"},{"line_number":611,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":612,"context_line":"                print(image_format)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_52de686d","line":609,"range":{"start_line":609,"start_character":16,"end_line":609,"end_character":27},"updated":"2019-03-14 06:43:03.000000000","message":"ditto","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"019f1bfaa25cd9cf78b00ddbb0aa416f1b22bd6f","unresolved":false,"context_lines":[{"line_number":606,"context_line":"        for root, dirs, files in os.walk(image_cache_path):"},{"line_number":607,"context_line":"            print(\"--\")"},{"line_number":608,"context_line":"            for image_file in files:"},{"line_number":609,"context_line":"                print(\"__\")"},{"line_number":610,"context_line":"                path \u003d os.path.join(image_cache_path, image_file)"},{"line_number":611,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":612,"context_line":"                print(image_format)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_1500caaa","line":609,"range":{"start_line":609,"start_character":16,"end_line":609,"end_character":27},"in_reply_to":"5fc1f717_52de686d","updated":"2019-03-14 08:17:52.000000000","message":"Done","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e75911ca26c7f7539d5d9acafc06bc39c8d4d7d0","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                print(\"__\")"},{"line_number":610,"context_line":"                path \u003d os.path.join(image_cache_path, image_file)"},{"line_number":611,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":612,"context_line":"                print(image_format)"},{"line_number":613,"context_line":"                if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":614,"context_line":"                    processutils.execute(\"rm\", \"-f\", path)"},{"line_number":615,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_72db647b","line":612,"range":{"start_line":612,"start_character":16,"end_line":612,"end_character":35},"updated":"2019-03-14 06:43:03.000000000","message":"ditto","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"019f1bfaa25cd9cf78b00ddbb0aa416f1b22bd6f","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                print(\"__\")"},{"line_number":610,"context_line":"                path \u003d os.path.join(image_cache_path, image_file)"},{"line_number":611,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":612,"context_line":"                print(image_format)"},{"line_number":613,"context_line":"                if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":614,"context_line":"                    processutils.execute(\"rm\", \"-f\", path)"},{"line_number":615,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_35fdc6b0","line":612,"range":{"start_line":612,"start_character":16,"end_line":612,"end_character":35},"in_reply_to":"5fc1f717_72db647b","updated":"2019-03-14 08:17:52.000000000","message":"Done","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e75911ca26c7f7539d5d9acafc06bc39c8d4d7d0","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":612,"context_line":"                print(image_format)"},{"line_number":613,"context_line":"                if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":614,"context_line":"                    processutils.execute(\"rm\", \"-f\", path)"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"    def _recreate_assigned_mediated_devices(self):"},{"line_number":617,"context_line":"        \"\"\"Recreate assigned mdevs that could have disappeared if we reboot"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_d2d3385f","line":614,"range":{"start_line":614,"start_character":20,"end_line":614,"end_character":58},"updated":"2019-03-14 06:43:03.000000000","message":"os.remove?","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"019f1bfaa25cd9cf78b00ddbb0aa416f1b22bd6f","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                image_format \u003d images.qemu_img_info(path)"},{"line_number":612,"context_line":"                print(image_format)"},{"line_number":613,"context_line":"                if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":614,"context_line":"                    processutils.execute(\"rm\", \"-f\", path)"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"    def _recreate_assigned_mediated_devices(self):"},{"line_number":617,"context_line":"        \"\"\"Recreate assigned mdevs that could have disappeared if we reboot"}],"source_content_type":"text/x-python","patch_set":17,"id":"5fc1f717_d52fa23c","line":614,"range":{"start_line":614,"start_character":20,"end_line":614,"end_character":58},"in_reply_to":"5fc1f717_d2d3385f","updated":"2019-03-14 08:17:52.000000000","message":"Done. Great :)","commit_id":"170b6b13288533baeb39870f08926ee5f8c6f44e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea00ee8c5c173f7dd42198f98c3a92cd83691fe0","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":595,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":598,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":599,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":600,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_05e34f35","line":597,"updated":"2019-05-04 17:24:45.000000000","message":"Is this going to be around forever or can this be removed at some point in the future? Let\u0027s say you\u0027re a new deployment and you have images_type\u003drbd and force_raw_images\u003dTrue, would this ever do anything? In other words, is this just a cleanup during an upgrade while people clean up their configuration?","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"bfdad8c075a1817674f5e10903789dc1ebadc0a7","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":595,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":598,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":599,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":600,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_aed01fcb","line":597,"in_reply_to":"dfbec78f_05e34f35","updated":"2019-05-05 03:35:03.000000000","message":"\u003e Is this going to be around forever or can this be removed at some point in the future?\n\nNo, we can\u0027t move this if this patch is merged. Because doing upgrade from old version to this version needs this check.\n\n \u003e Let\u0027s say you\u0027re a new deployment and you have\n \u003e images_type\u003drbd and force_raw_images\u003dTrue, would this ever do anything?\n\nIf you deploy a new env, the code will never do something in fact.\n\n \u003e In other words, is this just a cleanup during an upgrade\n \u003e while people clean up their configuration?\n\nYeah, it\u0027s just a cleanup during an upgrade.","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4a7a1ff21064ce0e565a39b8114238f4cb060201","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":595,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":598,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":599,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":600,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_dce3bf04","line":597,"in_reply_to":"dfbec78f_3306ce88","updated":"2019-05-06 17:03:40.000000000","message":"Yeah this is a bit nasty to do on every startup when configured for rbd - best case is there are some instances that are not raw and we cleanup the cache, but worst case is everything is already raw and we\u0027re making startup slower by needing call qemu-img to get metadata about the path.\n\nCould we instead do this closer to the point of failure by trying to detect the failure case and then remedy it there? And then drop that code later at some point?","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74a8bda00cc3488dee60c8008eca0412d3aa665a","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":595,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":598,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":599,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":600,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_aee1fa00","line":597,"in_reply_to":"dfbec78f_aed01fcb","updated":"2019-05-05 15:50:06.000000000","message":"\u003e No, we can\u0027t move this if this patch is merged. Because doing upgrade from old version to this version needs this check.\n\nSure, but at some point we should be able to remove this code right? Like not in Train but in the U release once someone has upgraded to Train, restarted computes to clean this up, and then when they get to U they don\u0027t need this anymore.","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"793752dca21299f7f439c04d5ca66196fa1dcff1","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":595,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":598,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":599,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":600,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":19,"id":"dfbec78f_3306ce88","line":597,"in_reply_to":"dfbec78f_aee1fa00","updated":"2019-05-06 14:01:55.000000000","message":"Actually, with my series, this isn\u0027t strictly required, IMHO. It won\u0027t be on by default in Train, but can in U, and I think we can/should avoid doing this on every single startup, of every single image, when configured for rbd.","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb564e8c6115f81da41d0cc10b2a8209affcf105","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":610,"context_line":"                    try:"},{"line_number":611,"context_line":"                        os.remove(path)"},{"line_number":612,"context_line":"                    except OSError:"},{"line_number":613,"context_line":"                        pass"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def _recreate_assigned_mediated_devices(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"5fc1f717_feb70df4","line":612,"range":{"start_line":612,"start_character":27,"end_line":612,"end_character":34},"updated":"2019-03-14 19:56:45.000000000","message":"perhaps pass on ENOENT (because it\u0027s already gone) but at least warn on other errors.","commit_id":"f5b9240eb7279cbbc2b7a13a1315f79833bceffb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb236d29a0c866e04f8c2f2f1c7b4084b0549c54","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":595,"context_line":"            self._recreate_assigned_mediated_devices()"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"        # Some imagebackends are only able to import raw disk images,"},{"line_number":598,"context_line":"        # and will fail if given any other format. See the bug"},{"line_number":599,"context_line":"        # https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":600,"context_line":"        if self.image_backend.backend().REQUIRES_RAW_IMPORT:"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_5a459db2","line":597,"updated":"2019-05-05 13:37:45.000000000","message":"Move this whole check before the _recreate_assigned_mediated_devices block as it is a waste to recretate the mdevs if we fail on the rdb image type check.","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1b88723a2e988a8999a90fa0b596252f17b65fd0","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        if self._host.has_min_version(MIN_LIBVIRT_MDEV_SUPPORT):"},{"line_number":595,"context_line":"            self._recreate_assigned_mediated_devices()"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"        # Some imagebackends are only able to import raw disk images,"},{"line_number":598,"context_line":"        # and will fail if given any other format. See the bug"},{"line_number":599,"context_line":"        # https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":600,"context_line":"        if self.image_backend.backend().REQUIRES_RAW_IMPORT:"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_c42d2f47","line":597,"in_reply_to":"dfbec78f_5a459db2","updated":"2019-05-06 06:57:38.000000000","message":"Done","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb236d29a0c866e04f8c2f2f1c7b4084b0549c54","unresolved":false,"context_lines":[{"line_number":599,"context_line":"        # https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":600,"context_line":"        if self.image_backend.backend().REQUIRES_RAW_IMPORT:"},{"line_number":601,"context_line":"            if not CONF.force_raw_images:"},{"line_number":602,"context_line":"                msg \u003d _(\"\u0027[DEFAULT]/force_raw_images \u003d False\u0027 is not \""},{"line_number":603,"context_line":"                        \"allowed with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":604,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":605,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":606,"context_line":"                        \"force_raw_images to True.\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_da042d7e","line":603,"range":{"start_line":602,"start_character":26,"end_line":603,"end_character":68},"updated":"2019-05-05 13:37:45.000000000","message":"If it is what is not allowed then why don\u0027t we just check the two config options?","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1b88723a2e988a8999a90fa0b596252f17b65fd0","unresolved":false,"context_lines":[{"line_number":599,"context_line":"        # https://bugs.launchpad.net/nova/+bug/1816686 for more details."},{"line_number":600,"context_line":"        if self.image_backend.backend().REQUIRES_RAW_IMPORT:"},{"line_number":601,"context_line":"            if not CONF.force_raw_images:"},{"line_number":602,"context_line":"                msg \u003d _(\"\u0027[DEFAULT]/force_raw_images \u003d False\u0027 is not \""},{"line_number":603,"context_line":"                        \"allowed with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":604,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":605,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":606,"context_line":"                        \"force_raw_images to True.\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_84273765","line":603,"range":{"start_line":602,"start_character":26,"end_line":603,"end_character":68},"in_reply_to":"dfbec78f_da042d7e","updated":"2019-05-06 06:57:38.000000000","message":"\u003e If it is what is not allowed then why don\u0027t we just check the two\n \u003e config options?\n\n@gibi, not only rbd, but also lvm[1]. I will remove the REQUIRES_RAW_IMPORT, just check the images_type and force_raw_images here now.\n\n[1] https://review.opendev.org/#/c/642667/","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb236d29a0c866e04f8c2f2f1c7b4084b0549c54","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":620,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":624,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":625,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_fa2a51e5","line":622,"range":{"start_line":622,"start_character":8,"end_line":622,"end_character":19},"updated":"2019-05-05 13:37:45.000000000","message":"I think this is enough to be called _remove_non_raw_cached_images()","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1b88723a2e988a8999a90fa0b596252f17b65fd0","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        # See https://bugzilla.redhat.com/show_bug.cgi?id\u003d1376907 for ref."},{"line_number":620,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":624,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":625,"context_line":"        clean up the non-raw cache image files to prevent that the instances"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_44213f4d","line":622,"range":{"start_line":622,"start_character":8,"end_line":622,"end_character":19},"in_reply_to":"dfbec78f_fa2a51e5","updated":"2019-05-06 06:57:38.000000000","message":"Done","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb236d29a0c866e04f8c2f2f1c7b4084b0549c54","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":624,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":625,"context_line":"        clean up the non-raw cache image files to prevent that the instances"},{"line_number":626,"context_line":"        fail to boot."},{"line_number":627,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_ba34d94b","line":624,"range":{"start_line":623,"start_character":43,"end_line":624,"end_character":63},"updated":"2019-05-05 13:37:45.000000000","message":"This condition is not checked by the function. This function simple removes every non raw image from the cache.","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1b88723a2e988a8999a90fa0b596252f17b65fd0","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        return os.path.exists(\u0027/sys/bus/mdev/devices/{0}\u0027.format(uuid))"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _check_and_remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Check the cache image files and if \u0027force_raw_images\u0027 is \u0027True\u0027"},{"line_number":624,"context_line":"        and \u0027REQUIRES_RAW_IMPORT\u0027 of imagebackend is \u0027True\u0027 too, so try to"},{"line_number":625,"context_line":"        clean up the non-raw cache image files to prevent that the instances"},{"line_number":626,"context_line":"        fail to boot."},{"line_number":627,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_641ec30d","line":624,"range":{"start_line":623,"start_character":43,"end_line":624,"end_character":63},"in_reply_to":"dfbec78f_ba34d94b","updated":"2019-05-06 06:57:38.000000000","message":"Done","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bb236d29a0c866e04f8c2f2f1c7b4084b0549c54","unresolved":false,"context_lines":[{"line_number":635,"context_line":"                    try:"},{"line_number":636,"context_line":"                        os.remove(path)"},{"line_number":637,"context_line":"                    except OSError:"},{"line_number":638,"context_line":"                        pass"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"    def _recreate_assigned_mediated_devices(self):"},{"line_number":641,"context_line":"        \"\"\"Recreate assigned mdevs that could have disappeared if we reboot"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_9a3b1537","line":638,"updated":"2019-05-05 13:37:45.000000000","message":"I think we should at least log here as if we cannot remove a cached non raw file an instance boot might fail later.","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"1b88723a2e988a8999a90fa0b596252f17b65fd0","unresolved":false,"context_lines":[{"line_number":635,"context_line":"                    try:"},{"line_number":636,"context_line":"                        os.remove(path)"},{"line_number":637,"context_line":"                    except OSError:"},{"line_number":638,"context_line":"                        pass"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"    def _recreate_assigned_mediated_devices(self):"},{"line_number":641,"context_line":"        \"\"\"Recreate assigned mdevs that could have disappeared if we reboot"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_c4d20f35","line":638,"in_reply_to":"dfbec78f_9a3b1537","updated":"2019-05-06 06:57:38.000000000","message":"Done","commit_id":"542993b23c100d88de61ea0edef6bae4c14b08a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"793752dca21299f7f439c04d5ca66196fa1dcff1","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        if CONF.libvirt.images_type in (\u0027rbd\u0027,):"},{"line_number":596,"context_line":"            if not CONF.force_raw_images:"},{"line_number":597,"context_line":"                msg \u003d _(\"\u0027[DEFAULT]/force_raw_images \u003d False\u0027 is not \""},{"line_number":598,"context_line":"                        \"allowed with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":599,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":600,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":601,"context_line":"                        \"force_raw_images to True.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_93745a37","line":598,"range":{"start_line":598,"start_character":60,"end_line":598,"end_character":63},"updated":"2019-05-06 14:01:55.000000000","message":"Femtonit, remove the spaces around this operator just to make reading this as a single unit easier (i.e. so it\u0027s not likely to wrap on a console or log dump) and to match how our docs look.","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"6e38330a2a35e526b8db644084c4746d6981db6b","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        if CONF.libvirt.images_type in (\u0027rbd\u0027,):"},{"line_number":596,"context_line":"            if not CONF.force_raw_images:"},{"line_number":597,"context_line":"                msg \u003d _(\"\u0027[DEFAULT]/force_raw_images \u003d False\u0027 is not \""},{"line_number":598,"context_line":"                        \"allowed with \u0027[libvirt]/images_type \u003d rbd\u0027. \""},{"line_number":599,"context_line":"                        \"Please check the two configs and if you really \""},{"line_number":600,"context_line":"                        \"do want to use rbd as images_type, set \""},{"line_number":601,"context_line":"                        \"force_raw_images to True.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_50c56b3b","line":598,"range":{"start_line":598,"start_character":60,"end_line":598,"end_character":63},"in_reply_to":"dfbec78f_93745a37","updated":"2019-05-07 08:58:41.000000000","message":"I will try to remove the spaces with later patch. :)","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"793752dca21299f7f439c04d5ca66196fa1dcff1","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_b3cb9e51","line":624,"updated":"2019-05-06 14:01:55.000000000","message":"I\u0027m not sure how I feel about this. We will run through every single file in the cache and exec qemu-img on it on every boot when using rbd, not just across the edge where it is changed.\n\nWhat if we just refuse to upload a non-raw file to ceph and cause a failure, indicating to the admin that stale qcow files are in the cache? That way we\u0027re just O(1) instead of O(n).\n\nFurther, with my image format scheduling series, changing the config will cause the scheduler to stop sending requests to boot qcow images to computes that don\u0027t support it, and the cache manager will age out the old qcow files over time.\n\nhttps://review.opendev.org/#/c/656413","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"f456634725064084e996dc812b1da3ed326519e0","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_77174053","line":624,"in_reply_to":"dfbec78f_01bec364","updated":"2019-05-07 15:04:19.000000000","message":"\u003e \u003e I think we can not do that to refuse to upload a non-raw file to\n \u003e ceph. The only failure way is to create an instance not using bfv.\n \u003e \n \u003e I don\u0027t understand, I thought the entire point of this was to not\n \u003e support non-raw files when using the rbd image backend? Or do you\n \u003e mean something besides the root disk?\n\nYeah, I mean the root disk here and nothing else.\nOne way, the root disk may be created by cinder. Cinder downloaded image from glance, converted images into \u0027raw\u0027 with rbd backend and injected it into the volume which means boot-from-volume.\nBut another way is to boot instances directly into ceph(rbd) with ephemeral backend for Nova[1]. In this way, now nova does not do anything for the images which are downloaded from glance. So that if image is qcow2, the instance will succeed to be created but fail to boot.\n\n[1] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L3635","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"6e38330a2a35e526b8db644084c4746d6981db6b","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_50ac8b8b","line":624,"in_reply_to":"dfbec78f_3cbc5bdb","updated":"2019-05-07 08:58:41.000000000","message":"\u003e I would definitely prefer to cleanup at the point of failure or\n \u003e just have existing cruft fail somehow and be noted to the operator\n\nRemove the clean function and check the import image whether it is raw or not. If not, raise exception[1] and tell the admin to remove it manually. How do you think so?\n\nAnd after removing the stale non-raw cache image, and we check the config when we start the compute service, we will get the raw cache images later.\n\n[1] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/storage/rbd_utils.py#L313-L328\n\n \u003e that they need to cleanup the image cache on this host, rather than\n \u003e exec qemu-img on every startup which would slow things down if you\n \u003e have a lot of instances on any given rbd-configured compute host.","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1c3b13d3f804b0779181b66c1a0e0522c418c604","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_9c9b0771","line":624,"in_reply_to":"dfbec78f_3cbc5bdb","updated":"2019-05-06 17:07:14.000000000","message":"Yep, easiest thing is just fail if we were about to upload a qcow2 to ceph. We can delete the base image there from the cache if we want, but if my feature isn\u0027t turned on, we would just download and then fail again if the same thing happened to land on the same compute.","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"b7bbd81673c5d0a326c1ba7d7ca1e483b199e17d","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_7f286a33","line":624,"in_reply_to":"dfbec78f_6546a67f","updated":"2019-05-08 06:17:13.000000000","message":"\u003e I\u0027m not sure I understand any of this. When we would go to upload\n \u003e the image to rbd, just check the format *there* and if it\u0027s not\n \u003e raw, raise some exception that will stop the image boot with a\n \u003e reasonable message. Meaning, check it at the time we would go to do\n \u003e the bad thing, instead of at every service startup.\n\nIt\u0027s my fault. I think I understand both you and matt : )\nMaybe steps are as followed:\n1. Check the image format which will be uploaded to rbd. If not raw, raise some exception that will stop the image boot with a reasonable message. Maybe code is here[1].\n2. Is it necessary? After raising exception, clean up the non-raw cache image[2], and re-do download the image from glance and at this time, it will convert to raw. Becasue if we use rbd as backend, the force_raw_images will be True.[3]\n\n[1] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/storage/rbd_utils.py#L313\n[2] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/imagebackend.py#L925\n[3] https://github.com/openstack/nova/blob/master/nova/virt/images.py#L170","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"d0e0a6aae7312ab74974b2e358e59e02390bf69a","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_ad8f3ccb","line":624,"in_reply_to":"dfbec78f_6546a67f","updated":"2019-05-14 07:39:06.000000000","message":"Remove the function here. Do not remove all non-raw cache image files when start the nova-compute service.","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1fc93152dd2ab8f75806dd9d7ff0b41ef08d19c9","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_01bec364","line":624,"in_reply_to":"dfbec78f_708e6f79","updated":"2019-05-07 12:38:13.000000000","message":"\u003e I think we can not do that to refuse to upload a non-raw file to ceph. The only failure way is to create an instance not using bfv.\n\nI don\u0027t understand, I thought the entire point of this was to not support non-raw files when using the rbd image backend? Or do you mean something besides the root disk?","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3a48321f1395d6278d0801b7501383c8b2cce635","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_6546a67f","line":624,"in_reply_to":"dfbec78f_77174053","updated":"2019-05-07 16:27:18.000000000","message":"I\u0027m not sure I understand any of this. When we would go to upload the image to rbd, just check the format *there* and if it\u0027s not raw, raise some exception that will stop the image boot with a reasonable message. Meaning, check it at the time we would go to do the bad thing, instead of at every service startup.","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"6e38330a2a35e526b8db644084c4746d6981db6b","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_708e6f79","line":624,"in_reply_to":"dfbec78f_b3cb9e51","updated":"2019-05-07 08:58:41.000000000","message":"\u003e I\u0027m not sure how I feel about this. We will run through every\n \u003e single file in the cache and exec qemu-img on it on every boot when\n \u003e using rbd, not just across the edge where it is changed.\n \u003e \n \u003e What if we just refuse to upload a non-raw file to ceph and cause a\n\nI think we can not do that to refuse to upload a non-raw file to ceph. The only failure way is to create an instance not using bfv.\n\n \u003e failure, indicating to the admin that stale qcow files are in the\n \u003e cache? That way we\u0027re just O(1) instead of O(n).\n \u003e \n \u003e Further, with my image format scheduling series, changing the\n \u003e config will cause the scheduler to stop sending requests to boot\n \u003e qcow images to computes that don\u0027t support it, and the cache\n \u003e manager will age out the old qcow files over time.\n \u003e \n \u003e https://review.opendev.org/#/c/656413","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4a7a1ff21064ce0e565a39b8114238f4cb060201","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def _remove_non_raw_cache_image_files(self):"},{"line_number":623,"context_line":"        \"\"\"Try to clean up the non-raw cache image files to prevent that the"},{"line_number":624,"context_line":"        instances fail to boot."},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        image_cache_path \u003d os.path.join(CONF.instances_path,"},{"line_number":627,"context_line":"                                        CONF.image_cache_subdirectory_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_3cbc5bdb","line":624,"in_reply_to":"dfbec78f_b3cb9e51","updated":"2019-05-06 17:03:40.000000000","message":"I would definitely prefer to cleanup at the point of failure or just have existing cruft fail somehow and be noted to the operator that they need to cleanup the image cache on this host, rather than exec qemu-img on every startup which would slow things down if you have a lot of instances on any given rbd-configured compute host.","commit_id":"3d1ff3739f1da63a379718f1752f5d036133b4fe"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"544975229fae7867a55c9df42b3dcc75f50aff3e","unresolved":false,"context_lines":[{"line_number":719,"context_line":"                                         size, sparse\u003dself.sparse)"},{"line_number":720,"context_line":"            if self.ephemeral_key_uuid is not None:"},{"line_number":721,"context_line":"                encrypt_lvm_image()"},{"line_number":722,"context_line":"            # NOTE: by calling convert_image_unsafe here we\u0027re"},{"line_number":723,"context_line":"            # telling qemu-img convert to do format detection on the input,"},{"line_number":724,"context_line":"            # because we don\u0027t know what the format is. For example,"},{"line_number":725,"context_line":"            # we might have downloaded a qcow2 image, or created an"},{"line_number":726,"context_line":"            # ephemeral filesystem locally, we just don\u0027t know here. Having"},{"line_number":727,"context_line":"            # audited this, all current sources have been sanity checked,"},{"line_number":728,"context_line":"            # either because they\u0027re locally generated, or because they have"},{"line_number":729,"context_line":"            # come from images.fetch_to_raw. However, this is major code smell."},{"line_number":730,"context_line":"            images.convert_image_unsafe(base, self.path, self.driver_format,"},{"line_number":731,"context_line":"                                        run_as_root\u003dTrue)"},{"line_number":732,"context_line":"            if resize:"},{"line_number":733,"context_line":"                disk.resize2fs(self.path, run_as_root\u003dTrue)"},{"line_number":734,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_e02142fe","side":"PARENT","line":731,"range":{"start_line":722,"start_character":0,"end_line":731,"end_character":57},"updated":"2019-03-05 09:52:25.000000000","message":"I\u0027m very much in favour of removing this! I suggest it might be easier to split it into a separate follow-up patch, though, as this is the change that will require a release note.\n\nIf you want to leave it here, though, I\u0027m ok with that. We can see if we get any push-back from core reviewers to split it out.","commit_id":"727b942a88a812afb7368b4d7d3c314a4f8554ed"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"caeafdbfe72faacdea6a60b62c3339076731d3b8","unresolved":false,"context_lines":[{"line_number":651,"context_line":"                                       imgmodel.FORMAT_QCOW2)"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"class Lvm(Image):"},{"line_number":655,"context_line":"    @staticmethod"},{"line_number":656,"context_line":"    def escape(filename):"},{"line_number":657,"context_line":"        return filename.replace(\u0027_\u0027, \u0027__\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_13594b59","line":654,"range":{"start_line":654,"start_character":0,"end_line":654,"end_character":17},"updated":"2019-03-07 08:00:59.000000000","message":"matt, I remove the REQUIRES_RAW_IMPORT here, and after the patch will be merged, I will add it into another patch for the LVM changing. Also will remove the unsafe convert.","commit_id":"430e37ad0dd8a8180f10888cf708a82e32ab48ae"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"d0e0a6aae7312ab74974b2e358e59e02390bf69a","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            # check the format of cache image. If format is not raw,"},{"line_number":928,"context_line":"            # remove it and re-prepare template again. We will get"},{"line_number":929,"context_line":"            # the new cache image and this time the format must be raw."},{"line_number":930,"context_line":"            image_format \u003d images.qemu_img_info(base)"},{"line_number":931,"context_line":"            if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":932,"context_line":"                try:"},{"line_number":933,"context_line":"                    os.remove(base)"},{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"dfbec78f_2db58c7e","line":937,"range":{"start_line":930,"start_character":12,"end_line":937,"end_character":62},"updated":"2019-05-14 07:39:06.000000000","message":"Here to check and remove non-raw cache image files. And re-prepre template. Now we will get the raw cache image file to import into the rbd.","commit_id":"1551def128e90e7068db0d25adebf2260e5db712"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"97b1249e114671a7fbb7165776f315a8dd2836de","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            # check the format of cache image. If format is not raw,"},{"line_number":928,"context_line":"            # remove it and re-prepare template again. We will get"},{"line_number":929,"context_line":"            # the new cache image and this time the format must be raw."},{"line_number":930,"context_line":"            image_format \u003d images.qemu_img_info(base)"},{"line_number":931,"context_line":"            if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":932,"context_line":"                try:"},{"line_number":933,"context_line":"                    os.remove(base)"},{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"dfbec78f_9285b0d1","line":937,"range":{"start_line":930,"start_character":12,"end_line":937,"end_character":62},"in_reply_to":"dfbec78f_2db58c7e","updated":"2019-05-14 15:14:21.000000000","message":"Why would prepare_template() do anything differently from last time? Are you doing this in case force_raw_images is now True but was False before?","commit_id":"1551def128e90e7068db0d25adebf2260e5db712"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"eb46daa4bb04c528614a378b2362c6d6c2f560d9","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            # check the format of cache image. If format is not raw,"},{"line_number":928,"context_line":"            # remove it and re-prepare template again. We will get"},{"line_number":929,"context_line":"            # the new cache image and this time the format must be raw."},{"line_number":930,"context_line":"            image_format \u003d images.qemu_img_info(base)"},{"line_number":931,"context_line":"            if image_format.file_format !\u003d \u0027raw\u0027:"},{"line_number":932,"context_line":"                try:"},{"line_number":933,"context_line":"                    os.remove(base)"},{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"dfbec78f_11a455a5","line":937,"range":{"start_line":930,"start_character":12,"end_line":937,"end_character":62},"in_reply_to":"dfbec78f_9285b0d1","updated":"2019-05-15 01:59:14.000000000","message":"\u003e Why would prepare_template() do anything differently from last\n \u003e time? Are you doing this in case force_raw_images is now True but\n \u003e was False before?\n\nYeah. You\u0027re right. Before using this patch, we may set force_raw_images to False. At this moment, you may get non-raw cache image. But at once the patch is merged/used, when you use rbd imagebackend, you must set force_raw_images to True. We will remove the non-raw cache image first and then get raw cache image at this image.","commit_id":"1551def128e90e7068db0d25adebf2260e5db712"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"4ccf246449550952af3dd8ed8e61507d4e9301d9","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_aa4dcb3e","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":62},"updated":"2019-05-15 08:56:05.000000000","message":"It looks confusing that calling the func second time without changing any params produce new results (raw image). Possibly some cache involved, maybe some comments?","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"7f06defa069c838f1a14bcce0a32bc1bf789c07a","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_d5ac56a0","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":62},"in_reply_to":"dfbec78f_14e9957e","updated":"2019-05-16 02:22:47.000000000","message":"Done. Add some explain.","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"53bc8057fbc77c960397f1dc1e87c41b1393735c","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_35094095","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":62},"in_reply_to":"dfbec78f_1580bc45","updated":"2019-05-15 09:53:56.000000000","message":"\u003e So this assumes image had been created earlier with\n \u003e force_raw_images \u003d False and now it\u0027s changed.\n\nYeah, that\u0027s all.","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"462e6d38c4f4ad47d591c67d2207a1a0fe73ac0c","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_14e9957e","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":62},"in_reply_to":"dfbec78f_35094095","updated":"2019-05-15 20:23:19.000000000","message":"This was brought up by Dan in PS22 as well. This is obviously confusing enough to warrant a code comment explaining it.","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"e1442772448418b73368487a5d30e927a0826ec2","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_1580bc45","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":62},"in_reply_to":"dfbec78f_6ac4b340","updated":"2019-05-15 09:32:05.000000000","message":"So this assumes image had been created earlier with force_raw_images \u003d False and now it\u0027s changed.","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"f6ccb02ee95500759f2f8c5457ecb52190dbd63f","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                except OSError as e:"},{"line_number":935,"context_line":"                    LOG.warning(\"Ignoring failure to remove %(path)s: \""},{"line_number":936,"context_line":"                                \"%(error)s\", {\u0027path\u0027: base, \u0027error\u0027: e})"},{"line_number":937,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":938,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":939,"context_line":"        self.verify_base_size(base, size)"},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"dfbec78f_6ac4b340","line":937,"range":{"start_line":937,"start_character":16,"end_line":937,"end_character":62},"in_reply_to":"dfbec78f_aa4dcb3e","updated":"2019-05-15 09:06:23.000000000","message":"\u003e It looks confusing that calling the func second time without\n \u003e changing any params produce new results (raw image). Possibly some\n \u003e cache involved, maybe some comments?\n\nThis patch will limit that when we use rbd imagebackend, we must set force_raw_images to True. So that we must get raw cache image this time.","commit_id":"c117b45fffc90fdb3f4258b708ae08050b78b458"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"65eed186b782c1712249940f79a8ae8eb3e52321","unresolved":false,"context_lines":[{"line_number":938,"context_line":"                # must set force_raw_images to True. So we will cache non-raw"},{"line_number":939,"context_line":"                # images. Now we have limit it. So we call prepare_template"},{"line_number":940,"context_line":"                # again here, it will convert all non-raw images to raw format."},{"line_number":941,"context_line":"                prepare_template(target\u003dbase, *args, **kwargs)"},{"line_number":942,"context_line":"            self.driver.import_image(base, self.rbd_name)"},{"line_number":943,"context_line":"        self.verify_base_size(base, size)"},{"line_number":944,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"dfbec78f_ddd230d1","line":941,"updated":"2019-05-16 15:28:59.000000000","message":"Looking at this again, why don\u0027t we just put the check/os.remove() above the prepare_template call on L920? If we didn\u0027t have it locally before, L920 would have done the conversion for us and we are good. If we already have it local in qcow2 format, we could have removed it before L920 and then caused it to fetch/convert it right then, correct?","commit_id":"cc7bb49afcc848550e434cab7212dd2707814cb2"}],"releasenotes/notes/bug-1816686-77060eb8f8bd4092.yaml":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dd502d4796b7235784bf737a34ce0c56760ab928","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - The ``[DEFAULT]/force_raw_images \u003d False`` is not compatible"},{"line_number":4,"context_line":"    with ``[libvirt]/images_type \u003d rbd or lvm``. Please check the"},{"line_number":5,"context_line":"    two configs and if you really do want to use rbd or lvm as"},{"line_number":6,"context_line":"    images_type, set force_raw_images to True. At last, you need"},{"line_number":7,"context_line":"    to restart your nova-compute service."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9fdfeff1_c394488f","line":7,"range":{"start_line":3,"start_character":0,"end_line":7,"end_character":41},"updated":"2019-03-05 10:09:32.000000000","message":"I think this needs to clearly and specifically call out the thing which used to work but no longer does. Something like:\n\nThe libvirt driver\u0027s LVM imagebackend no longer supports setting force_raw_images to False. Setting force_raw_images \u003d False and images_type \u003d lvm in nova.conf will cause the nova compute service to refuse to start. To fix this, set force_raw_images \u003d True. This change was required to improve the security of the LVM imagebackend.","commit_id":"904f6a72c17303302febf389d964bc4285a52a71"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ac49402e4c1a90bc2e2503c5036c63793d05610a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - The libvirt driver\u0027s RBD imagebackend no longer supports setting"},{"line_number":4,"context_line":"    force_raw_images to False. Setting force_raw_images \u003d False and"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5fc1f717_ab265814","line":1,"updated":"2019-03-12 19:16:38.000000000","message":"Should this reno mention that we\u0027ll now delete non-raw images if you set force_raw_images\u003dTrue ?","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - The libvirt driver\u0027s RBD imagebackend no longer supports setting"},{"line_number":4,"context_line":"    force_raw_images to False. Setting force_raw_images \u003d False and"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5fc1f717_adf8a248","line":1,"in_reply_to":"5fc1f717_ab265814","updated":"2019-03-14 02:46:17.000000000","message":"Done. Add notice of reno.","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"310dc46f09a125b03b52f36daa1c1ba878e2b789","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    force_raw_images to False. Setting force_raw_images \u003d False and"},{"line_number":5,"context_line":"    images_type \u003d rbd in nova.conf will cause the nova compute service"},{"line_number":6,"context_line":"    to refuse to start. To fix this, set force_raw_images \u003d True. This"},{"line_number":7,"context_line":"    change was required to fix the bug(1816686)."}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5fc1f717_bcaf887b","line":7,"range":{"start_line":7,"start_character":35,"end_line":7,"end_character":47},"updated":"2019-03-12 19:07:03.000000000","message":"link this","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"},{"author":{"_account_id":28706,"name":"Boxiang Zhu","email":"bxzhu_5355@163.com","username":"ZhuBoxiang"},"change_message_id":"72c4e909271d0054f73324806cc2be0e0e6211dc","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    force_raw_images to False. Setting force_raw_images \u003d False and"},{"line_number":5,"context_line":"    images_type \u003d rbd in nova.conf will cause the nova compute service"},{"line_number":6,"context_line":"    to refuse to start. To fix this, set force_raw_images \u003d True. This"},{"line_number":7,"context_line":"    change was required to fix the bug(1816686)."}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5fc1f717_6d9cfa0e","line":7,"range":{"start_line":7,"start_character":35,"end_line":7,"end_character":47},"in_reply_to":"5fc1f717_bcaf887b","updated":"2019-03-14 02:46:17.000000000","message":"Done","commit_id":"605b0f50e33102ab85e701ebe2e4ccb10cee7672"}]}
