)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"99218fbc1218e205d8bde049937ef4f277e28c85","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Support volume backup of qcow2 format volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add support to qcow2 format disk for cinder-backup."},{"line_number":10,"context_line":"It will make drivers which use qcow2 as volume,"},{"line_number":11,"context_line":"such as glusterfs etc,work together with cinder-backup,"},{"line_number":12,"context_line":"and can also make nfs driver use qcow2 as volume be possible."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a016987_0d574ecf","line":10,"updated":"2015-05-18 07:34:19.000000000","message":"which use qcow2 as volume format (please mention \"format\")","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c977edec427ac170eb155e99206bba4c9a89c137","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Support volume backup of qcow2 format volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add support to qcow2 format disk for cinder-backup."},{"line_number":10,"context_line":"It will make drivers which use qcow2 as volume,"},{"line_number":11,"context_line":"such as glusterfs etc,work together with cinder-backup,"},{"line_number":12,"context_line":"and can also make nfs driver use qcow2 as volume be possible."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a016987_288678b9","line":10,"in_reply_to":"7a016987_0d574ecf","updated":"2015-05-18 09:01:27.000000000","message":"Done","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"572ee2f6581b66b9fa2a839647479e1e03b9db3f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add support to qcow2 format disk for cinder-backup."},{"line_number":10,"context_line":"It will make drivers which use qcow2 as volume format,"},{"line_number":11,"context_line":"such as glusterfs etc,work together with cinder-backup,"},{"line_number":12,"context_line":"and can also make nfs driver use qcow2 as volume be possible."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Changes:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"fa32b979_86b5787f","line":11,"updated":"2015-06-22 02:59:14.000000000","message":"\"...glusterfs etc,work ...\" -\u003e \"...glusterfs etc, work...\"","commit_id":"f4e1c197e93e29d97f4a302dea7459ae92b7f7c6"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"d687a66385f8cefd294cce6d214c03d0688f191f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"It will make drivers which use qcow2 as volume format,"},{"line_number":11,"context_line":"such as glusterfs etc,work together with cinder-backup,"},{"line_number":12,"context_line":"and can also make nfs driver use qcow2 as volume be possible."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Changes:"},{"line_number":15,"context_line":"* Add qemu-nbd support to cinder-backup. Qemu-nbd can mount qcow2"},{"line_number":16,"context_line":"  volume as a raw device to the host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"fa1b9901_adc29951","line":13,"updated":"2015-08-25 14:03:16.000000000","message":"This should have a docImpact since it touches config. Thanks!","commit_id":"a0096ff32753e9f67167b4f3e4e587492061957f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"1976b16de4f944df45ceed134a2c523f5c79f3e0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"It will make drivers which use qcow2 as volume format,"},{"line_number":11,"context_line":"such as glusterfs etc,work together with cinder-backup,"},{"line_number":12,"context_line":"and can also make nfs driver use qcow2 as volume be possible."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Changes:"},{"line_number":15,"context_line":"* Add qemu-nbd support to cinder-backup. Qemu-nbd can mount qcow2"},{"line_number":16,"context_line":"  volume as a raw device to the host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"7a2fa921_f594d243","line":13,"in_reply_to":"fa1b9901_adc29951","updated":"2015-10-08 03:11:17.000000000","message":"Sure, Thanks","commit_id":"a0096ff32753e9f67167b4f3e4e587492061957f"}],"cinder/tests/unit/test_nfs.py":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"99218fbc1218e205d8bde049937ef4f277e28c85","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        self.assertFalse(ret_flag)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def test_backup_prepare_volume_device_qcow2(self):"},{"line_number":340,"context_line":"        (mox, drv) \u003d self._mox, self._driver"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        mox.StubOutWithMock(image_utils, \u0027qemu_img_info\u0027)"},{"line_number":343,"context_line":"        mox.StubOutClassWithMocks(device, \u0027NbdDevice\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_8d10de02","line":340,"updated":"2015-05-18 07:34:19.000000000","message":"As per the discussion below we need to use \"mock\" instead of \"mox\".\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2013-July/012484.html\n\nAlso we can send these conversion changes in another patch later.","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c977edec427ac170eb155e99206bba4c9a89c137","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        self.assertFalse(ret_flag)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def test_backup_prepare_volume_device_qcow2(self):"},{"line_number":340,"context_line":"        (mox, drv) \u003d self._mox, self._driver"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        mox.StubOutWithMock(image_utils, \u0027qemu_img_info\u0027)"},{"line_number":343,"context_line":"        mox.StubOutClassWithMocks(device, \u0027NbdDevice\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_e35e4111","line":340,"in_reply_to":"7a016987_8d10de02","updated":"2015-05-18 09:01:27.000000000","message":"Sure, I will change it.","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"182914d051c0699ec1bffde8a1802d0b07304414","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        volume_device \u003d (self._driver."},{"line_number":350,"context_line":"                         _backup_prepare_volume_device(\u0027/some/path\u0027, 1234,"},{"line_number":351,"context_line":"                                                       {\"format\": \"qcow2\"}))"},{"line_number":352,"context_line":"        self.assertEqual(None, volume_device[\u0027volume_path\u0027])"},{"line_number":353,"context_line":"        self.assertEqual(expected_device.image, volume_device[\u0027device\u0027].image)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    @mock.patch(\"cinder.volume.device.NbdDevice.get_dev\")"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_d8dbad7a","line":352,"updated":"2015-07-16 06:03:57.000000000","message":"assertEqual \u003d\u003e assertIsNone","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        volume_device \u003d (self._driver."},{"line_number":350,"context_line":"                         _backup_prepare_volume_device(\u0027/some/path\u0027, 1234,"},{"line_number":351,"context_line":"                                                       {\"format\": \"qcow2\"}))"},{"line_number":352,"context_line":"        self.assertEqual(None, volume_device[\u0027volume_path\u0027])"},{"line_number":353,"context_line":"        self.assertEqual(expected_device.image, volume_device[\u0027device\u0027].image)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    @mock.patch(\"cinder.volume.device.NbdDevice.get_dev\")"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_71fdd7af","line":352,"in_reply_to":"9a41bdd9_d8dbad7a","updated":"2015-07-16 12:44:36.000000000","message":"Done","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"182914d051c0699ec1bffde8a1802d0b07304414","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    @mock.patch(\"cinder.volume.device.NbdDevice.unget_dev\")"},{"line_number":394,"context_line":"    def test_backup_clean_volume_device(self, mock_unget_dev):"},{"line_number":395,"context_line":"        fake_device \u003d device.NbdDevice(\u0027/some/path\u0027)"},{"line_number":396,"context_line":"        self._driver._backup_clean_volume_device({\u0027device\u0027: fake_device})"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"class NfsDriverTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_988a0563","line":396,"updated":"2015-07-16 06:03:57.000000000","message":"Nothing to check?\nMethod call? Result?","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    @mock.patch(\"cinder.volume.device.NbdDevice.unget_dev\")"},{"line_number":394,"context_line":"    def test_backup_clean_volume_device(self, mock_unget_dev):"},{"line_number":395,"context_line":"        fake_device \u003d device.NbdDevice(\u0027/some/path\u0027)"},{"line_number":396,"context_line":"        self._driver._backup_clean_volume_device({\u0027device\u0027: fake_device})"},{"line_number":397,"context_line":""},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"class NfsDriverTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_d1cf0327","line":396,"in_reply_to":"9a41bdd9_988a0563","updated":"2015-07-16 12:44:36.000000000","message":"Forgot this, have updated it, thanks.","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"}],"cinder/tests/unit/test_volume.py":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"afa3f5db50eb336a395ba10ad86053564d053a69","unresolved":false,"context_lines":[{"line_number":5341,"context_line":"        self.mox.StubOutWithMock(fileutils, \u0027file_open\u0027)"},{"line_number":5342,"context_line":"        self.mox.StubOutWithMock(self.volume.driver, \u0027_detach_volume\u0027)"},{"line_number":5343,"context_line":"        self.mox.StubOutWithMock(self.volume.driver, \u0027terminate_connection\u0027)"},{"line_number":5344,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5345,"context_line":"                                 \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5346,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5347,"context_line":"                                 \u0027_backup_clean_volume_device\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_d147d71b","line":5344,"updated":"2015-05-26 18:50:55.000000000","message":"If possible please use mock instead of mox.","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0df20af731322839830bd91334ffa097684287c","unresolved":false,"context_lines":[{"line_number":5341,"context_line":"        self.mox.StubOutWithMock(fileutils, \u0027file_open\u0027)"},{"line_number":5342,"context_line":"        self.mox.StubOutWithMock(self.volume.driver, \u0027_detach_volume\u0027)"},{"line_number":5343,"context_line":"        self.mox.StubOutWithMock(self.volume.driver, \u0027terminate_connection\u0027)"},{"line_number":5344,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5345,"context_line":"                                 \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5346,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5347,"context_line":"                                 \u0027_backup_clean_volume_device\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_ca653845","line":5344,"in_reply_to":"7a016987_d147d71b","updated":"2015-06-01 06:42:29.000000000","message":"Emm, I thought about this, but worried about that will make not consistent with others in this test. I think it\u0027s better to convert  mox to mock all those in other patch.","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":5510,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5511,"context_line":"                                 \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5512,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5513,"context_line":"                                 \u0027_backup_clean_volume_device\u0027)"},{"line_number":5514,"context_line":""},{"line_number":5515,"context_line":"        self.volume.driver.db.volume_get(self.context, vol[\u0027id\u0027]).\\"},{"line_number":5516,"context_line":"            AndReturn(vol)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_d8388dd5","line":5513,"updated":"2015-07-16 06:01:32.000000000","message":"Use mock.\nRefactor the whole method.","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":5510,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5511,"context_line":"                                 \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5512,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5513,"context_line":"                                 \u0027_backup_clean_volume_device\u0027)"},{"line_number":5514,"context_line":""},{"line_number":5515,"context_line":"        self.volume.driver.db.volume_get(self.context, vol[\u0027id\u0027]).\\"},{"line_number":5516,"context_line":"            AndReturn(vol)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_cfff5764","line":5513,"in_reply_to":"9a41bdd9_d8388dd5","updated":"2015-07-16 12:44:36.000000000","message":"Thanks vincent, I will change the codes those I added to use mock. But about this whole method and other methods too, I feel it\u0027s better to refactor them in other patch and I\u0027ll do it soon.","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":5521,"context_line":"            AndReturn((attach_info, vol))"},{"line_number":5522,"context_line":"        self.volume.driver.\\"},{"line_number":5523,"context_line":"            _backup_prepare_volume_device(\u0027/dev/null\u0027, mox.IgnoreArg(),"},{"line_number":5524,"context_line":"                                          mox.IgnoreArg()).\\"},{"line_number":5525,"context_line":"            AndReturn({\u0027volume_path\u0027: \u0027/dev/null\u0027, \u0027device\u0027: None})"},{"line_number":5526,"context_line":"        os.getuid()"},{"line_number":5527,"context_line":"        utils.execute(\u0027chown\u0027, None, \u0027/dev/null\u0027, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_3850990a","line":5524,"updated":"2015-07-16 06:01:32.000000000","message":"Use mock","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":5521,"context_line":"            AndReturn((attach_info, vol))"},{"line_number":5522,"context_line":"        self.volume.driver.\\"},{"line_number":5523,"context_line":"            _backup_prepare_volume_device(\u0027/dev/null\u0027, mox.IgnoreArg(),"},{"line_number":5524,"context_line":"                                          mox.IgnoreArg()).\\"},{"line_number":5525,"context_line":"            AndReturn({\u0027volume_path\u0027: \u0027/dev/null\u0027, \u0027device\u0027: None})"},{"line_number":5526,"context_line":"        os.getuid()"},{"line_number":5527,"context_line":"        utils.execute(\u0027chown\u0027, None, \u0027/dev/null\u0027, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_5e053643","line":5524,"in_reply_to":"9a41bdd9_3850990a","updated":"2015-07-16 12:44:36.000000000","message":"Done","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":5529,"context_line":"        backup_service.backup(backup, f)"},{"line_number":5530,"context_line":"        utils.execute(\u0027chown\u0027, 0, \u0027/dev/null\u0027, run_as_root\u003dTrue)"},{"line_number":5531,"context_line":"        self.volume.driver._backup_clean_volume_device(mox.IgnoreArg()).\\"},{"line_number":5532,"context_line":"            AndReturn(None)"},{"line_number":5533,"context_line":"        self.volume.driver._detach_volume(self.context, attach_info, vol,"},{"line_number":5534,"context_line":"                                          properties)"},{"line_number":5535,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_58531d17","line":5532,"updated":"2015-07-16 06:01:32.000000000","message":"Use mock","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":5529,"context_line":"        backup_service.backup(backup, f)"},{"line_number":5530,"context_line":"        utils.execute(\u0027chown\u0027, 0, \u0027/dev/null\u0027, run_as_root\u003dTrue)"},{"line_number":5531,"context_line":"        self.volume.driver._backup_clean_volume_device(mox.IgnoreArg()).\\"},{"line_number":5532,"context_line":"            AndReturn(None)"},{"line_number":5533,"context_line":"        self.volume.driver._detach_volume(self.context, attach_info, vol,"},{"line_number":5534,"context_line":"                                          properties)"},{"line_number":5535,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_1efb2e48","line":5532,"in_reply_to":"9a41bdd9_58531d17","updated":"2015-07-16 12:44:36.000000000","message":"Done","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":5555,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5556,"context_line":"                                 \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5557,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5558,"context_line":"                                 \u0027_backup_clean_volume_device\u0027)"},{"line_number":5559,"context_line":""},{"line_number":5560,"context_line":"        os_brick.initiator.connector.\\"},{"line_number":5561,"context_line":"            get_connector_properties(root_helper, CONF.my_ip, False, False).\\"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_f85551f9","line":5558,"updated":"2015-07-16 06:01:32.000000000","message":"Use mock","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":5555,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5556,"context_line":"                                 \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5557,"context_line":"        self.mox.StubOutWithMock(self.volume.driver,"},{"line_number":5558,"context_line":"                                 \u0027_backup_clean_volume_device\u0027)"},{"line_number":5559,"context_line":""},{"line_number":5560,"context_line":"        os_brick.initiator.connector.\\"},{"line_number":5561,"context_line":"            get_connector_properties(root_helper, CONF.my_ip, False, False).\\"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_de9706ea","line":5558,"in_reply_to":"9a41bdd9_f85551f9","updated":"2015-07-16 12:44:36.000000000","message":"Done","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":5565,"context_line":"        self.volume.driver.\\"},{"line_number":5566,"context_line":"            _backup_prepare_volume_device(\u0027/dev/null\u0027, mox.IgnoreArg(),"},{"line_number":5567,"context_line":"                                          mox.IgnoreArg()).\\"},{"line_number":5568,"context_line":"            AndReturn({\u0027volume_path\u0027: \u0027/dev/null\u0027, \u0027device\u0027: None})"},{"line_number":5569,"context_line":"        os.getuid()"},{"line_number":5570,"context_line":"        utils.execute(\u0027chown\u0027, None, \u0027/dev/null\u0027, run_as_root\u003dTrue)"},{"line_number":5571,"context_line":"        f \u003d fileutils.file_open(\u0027/dev/null\u0027, \u0027wb\u0027).AndReturn(file(\u0027/dev/null\u0027))"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_18591535","line":5568,"updated":"2015-07-16 06:01:32.000000000","message":"Use mock","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":5565,"context_line":"        self.volume.driver.\\"},{"line_number":5566,"context_line":"            _backup_prepare_volume_device(\u0027/dev/null\u0027, mox.IgnoreArg(),"},{"line_number":5567,"context_line":"                                          mox.IgnoreArg()).\\"},{"line_number":5568,"context_line":"            AndReturn({\u0027volume_path\u0027: \u0027/dev/null\u0027, \u0027device\u0027: None})"},{"line_number":5569,"context_line":"        os.getuid()"},{"line_number":5570,"context_line":"        utils.execute(\u0027chown\u0027, None, \u0027/dev/null\u0027, run_as_root\u003dTrue)"},{"line_number":5571,"context_line":"        f \u003d fileutils.file_open(\u0027/dev/null\u0027, \u0027wb\u0027).AndReturn(file(\u0027/dev/null\u0027))"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_fe9a0a13","line":5568,"in_reply_to":"9a41bdd9_18591535","updated":"2015-07-16 12:44:36.000000000","message":"Done","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":5571,"context_line":"        f \u003d fileutils.file_open(\u0027/dev/null\u0027, \u0027wb\u0027).AndReturn(file(\u0027/dev/null\u0027))"},{"line_number":5572,"context_line":"        backup_service.restore(backup, vol[\u0027id\u0027], f)"},{"line_number":5573,"context_line":"        utils.execute(\u0027chown\u0027, 0, \u0027/dev/null\u0027, run_as_root\u003dTrue)"},{"line_number":5574,"context_line":"        self.volume.driver._backup_clean_volume_device(mox.IgnoreArg()).\\"},{"line_number":5575,"context_line":"            AndReturn(None)"},{"line_number":5576,"context_line":"        self.volume.driver._detach_volume(self.context, attach_info, vol,"},{"line_number":5577,"context_line":"                                          properties)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_b844a949","line":5574,"updated":"2015-07-16 06:01:32.000000000","message":"Use mock","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":5571,"context_line":"        f \u003d fileutils.file_open(\u0027/dev/null\u0027, \u0027wb\u0027).AndReturn(file(\u0027/dev/null\u0027))"},{"line_number":5572,"context_line":"        backup_service.restore(backup, vol[\u0027id\u0027], f)"},{"line_number":5573,"context_line":"        utils.execute(\u0027chown\u0027, 0, \u0027/dev/null\u0027, run_as_root\u003dTrue)"},{"line_number":5574,"context_line":"        self.volume.driver._backup_clean_volume_device(mox.IgnoreArg()).\\"},{"line_number":5575,"context_line":"            AndReturn(None)"},{"line_number":5576,"context_line":"        self.volume.driver._detach_volume(self.context, attach_info, vol,"},{"line_number":5577,"context_line":"                                          properties)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_9e9dfe0b","line":5574,"in_reply_to":"9a41bdd9_b844a949","updated":"2015-07-16 12:44:36.000000000","message":"Done","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f3a0f9227b9831d4773a531d17e36e98bfa735a0","unresolved":false,"context_lines":[{"line_number":5495,"context_line":"                \u0027_backup_clean_volume_device\u0027)"},{"line_number":5496,"context_line":"    @mock.patch(\u0027cinder.tests.unit.fake_driver.LoggingVolumeDriver.\u0027"},{"line_number":5497,"context_line":"                \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5498,"context_line":"    def test_backup_volume(self, mock_backup_prepare, mock_backup_clean):"},{"line_number":5499,"context_line":"        vol \u003d tests_utils.create_volume(self.context)"},{"line_number":5500,"context_line":"        backup \u003d {\u0027volume_id\u0027: vol[\u0027id\u0027]}"},{"line_number":5501,"context_line":"        properties \u003d {}"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a50d1a3_2d13cb5c","line":5498,"updated":"2015-07-22 08:27:49.000000000","message":"Please change the style for the whole method including all the code lines.","commit_id":"6e7eb2ddd36c2d54f587b3e9d04b2b673a0395a3"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"f3a0f9227b9831d4773a531d17e36e98bfa735a0","unresolved":false,"context_lines":[{"line_number":5538,"context_line":"    @mock.patch(\u0027cinder.tests.unit.fake_driver.LoggingVolumeDriver.\u0027"},{"line_number":5539,"context_line":"                \u0027_backup_prepare_volume_device\u0027)"},{"line_number":5540,"context_line":"    def test_restore_backup(self, mock_backup_prepare, mock_backup_clean):"},{"line_number":5541,"context_line":"        vol \u003d tests_utils.create_volume(self.context)"},{"line_number":5542,"context_line":"        backup \u003d {\u0027volume_id\u0027: vol[\u0027id\u0027],"},{"line_number":5543,"context_line":"                  \u0027id\u0027: \u0027backup-for-%s\u0027 % vol[\u0027id\u0027]}"},{"line_number":5544,"context_line":"        properties \u003d {}"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a50d1a3_8d28df87","line":5541,"updated":"2015-07-22 08:27:49.000000000","message":"Please change the style for the whole method including all the code lines.","commit_id":"6e7eb2ddd36c2d54f587b3e9d04b2b673a0395a3"}],"cinder/tests/unit/test_volume_device.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"006946cd9fdbee0d96b84eae68d66c85183cd1c0","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import mock"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from cinder import test"},{"line_number":26,"context_line":"from cinder.volume.device import NbdDevice"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"ORIG_EXISTS \u003d os.path.exists"},{"line_number":29,"context_line":"ORIG_LISTDIR \u003d os.listdir"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_cbf769d1","line":26,"updated":"2015-05-22 20:19:21.000000000","message":"Please, import modules, not objects","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"37c8e2cb45728d9d203c316f48c23b75c9cea230","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import mock"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from cinder import test"},{"line_number":26,"context_line":"from cinder.volume.device import NbdDevice"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"ORIG_EXISTS \u003d os.path.exists"},{"line_number":29,"context_line":"ORIG_LISTDIR \u003d os.listdir"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_1f0a588a","line":26,"in_reply_to":"7a016987_cbf769d1","updated":"2015-05-23 04:48:38.000000000","message":"Sure.","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"37d212e2a91da8abccae1489b1a8a5851f28fd5c","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"import time"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import eventlet"},{"line_number":22,"context_line":"import fixtures"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_9ae0882a","line":19,"updated":"2015-05-25 09:24:27.000000000","message":"Imported, but never used.","commit_id":"7316f2d8c24b60679692694f4dc2b6dcdcf4b556"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"6a19e31a7056b5dfa45e86692fb05cc069d47b80","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import os"},{"line_number":19,"context_line":"import time"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import eventlet"},{"line_number":22,"context_line":"import fixtures"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_66c89155","line":19,"in_reply_to":"7a016987_9ae0882a","updated":"2015-05-25 12:30:10.000000000","message":"Done","commit_id":"7316f2d8c24b60679692694f4dc2b6dcdcf4b556"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            return pidfile not in [os.path.join(\u0027/sys/block\u0027, dev, \u0027pid\u0027)"},{"line_number":276,"context_line":"                                   for dev in free_devices]"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        self.stubs.Set(device.NbdDevice, \u0027_allocate_nbd\u0027, fake_find_unused)"},{"line_number":279,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027cinder.utils.trycmd\u0027,"},{"line_number":280,"context_line":"                                             delay_and_remove_device))"},{"line_number":281,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027os.path.exists\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_1d14a74a","line":278,"updated":"2015-07-16 06:01:32.000000000","message":"Use mock please:\n\nI suggest you change the style from stub, fixtures.MonkeyPatch to mock.patch or mock.patch.object to remain consistent with the rest unit tests.","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            return pidfile not in [os.path.join(\u0027/sys/block\u0027, dev, \u0027pid\u0027)"},{"line_number":276,"context_line":"                                   for dev in free_devices]"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        self.stubs.Set(device.NbdDevice, \u0027_allocate_nbd\u0027, fake_find_unused)"},{"line_number":279,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027cinder.utils.trycmd\u0027,"},{"line_number":280,"context_line":"                                             delay_and_remove_device))"},{"line_number":281,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027os.path.exists\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_1e800e8a","line":278,"in_reply_to":"9a41bdd9_1d14a74a","updated":"2015-07-16 12:44:36.000000000","message":"Sure","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"}],"cinder/utils.py":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"99218fbc1218e205d8bde049937ef4f277e28c85","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"def trycmd(*cmd, **kwargs):"},{"line_number":818,"context_line":"    \"\"\"Convenience wrapper around oslo\u0027s execute() method.\"\"\""},{"line_number":819,"context_line":"    if \u0027run_as_root\u0027 in kwargs and not \u0027root_helper\u0027 in kwargs:"},{"line_number":820,"context_line":"        kwargs[\u0027root_helper\u0027] \u003d get_root_helper()"},{"line_number":821,"context_line":"    return processutils.trycmd(*cmd, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_ad995a21","line":819,"updated":"2015-05-18 07:34:19.000000000","message":"This condition should be:\n\nif \u0027run_as_root\u0027 in kwargs and \u0027root_helper\u0027 not in kwargs:","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c977edec427ac170eb155e99206bba4c9a89c137","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"def trycmd(*cmd, **kwargs):"},{"line_number":818,"context_line":"    \"\"\"Convenience wrapper around oslo\u0027s execute() method.\"\"\""},{"line_number":819,"context_line":"    if \u0027run_as_root\u0027 in kwargs and not \u0027root_helper\u0027 in kwargs:"},{"line_number":820,"context_line":"        kwargs[\u0027root_helper\u0027] \u003d get_root_helper()"},{"line_number":821,"context_line":"    return processutils.trycmd(*cmd, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_439875c0","line":819,"in_reply_to":"7a016987_ad995a21","updated":"2015-05-18 09:01:27.000000000","message":"Done","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"eba4b0dba96d904cca0989798c440969dcd40dbe","unresolved":false,"context_lines":[{"line_number":820,"context_line":""},{"line_number":821,"context_line":"def trycmd(*cmd, **kwargs):"},{"line_number":822,"context_line":"    \"\"\"Convenience wrapper around oslo\u0027s execute() method.\"\"\""},{"line_number":823,"context_line":"    if \u0027run_as_root\u0027 in kwargs and \u0027root_helper\u0027 not in kwargs:"},{"line_number":824,"context_line":"        kwargs[\u0027root_helper\u0027] \u003d get_root_helper()"},{"line_number":825,"context_line":"    return processutils.trycmd(*cmd, **kwargs)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_291b4e82","line":823,"updated":"2015-06-25 22:24:54.000000000","message":"Please, check \u0027run_as_root\u0027 value too","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"7b80dfbe4905d636523080420f9bfe760bb07fad","unresolved":false,"context_lines":[{"line_number":820,"context_line":""},{"line_number":821,"context_line":"def trycmd(*cmd, **kwargs):"},{"line_number":822,"context_line":"    \"\"\"Convenience wrapper around oslo\u0027s execute() method.\"\"\""},{"line_number":823,"context_line":"    if \u0027run_as_root\u0027 in kwargs and \u0027root_helper\u0027 not in kwargs:"},{"line_number":824,"context_line":"        kwargs[\u0027root_helper\u0027] \u003d get_root_helper()"},{"line_number":825,"context_line":"    return processutils.trycmd(*cmd, **kwargs)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_b307c71c","line":823,"in_reply_to":"fa32b979_291b4e82","updated":"2015-06-26 02:15:38.000000000","message":"Done","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"}],"cinder/volume/device.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"0db506e072ec5472e784beb582c0029aaac20199","unresolved":false,"context_lines":[{"line_number":35,"context_line":"backup_nbd_opts \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027backup_timeout_nbd\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d\u0027Amout of time, in seconds, to wait for NBD \u0027"},{"line_number":39,"context_line":"               \u0027device start up.\u0027),"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_77525c15","line":38,"updated":"2015-05-12 17:12:30.000000000","message":"\"Amout\" typo.","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c977edec427ac170eb155e99206bba4c9a89c137","unresolved":false,"context_lines":[{"line_number":35,"context_line":"backup_nbd_opts \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027backup_timeout_nbd\u0027,"},{"line_number":37,"context_line":"               default\u003d10,"},{"line_number":38,"context_line":"               help\u003d\u0027Amout of time, in seconds, to wait for NBD \u0027"},{"line_number":39,"context_line":"               \u0027device start up.\u0027),"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_e3e3e131","line":38,"in_reply_to":"9a0c5dc1_77525c15","updated":"2015-05-18 09:01:27.000000000","message":"Done","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"006946cd9fdbee0d96b84eae68d66c85183cd1c0","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                    LOG.error(_LE(\u0027NBD error - previous umount did not \u0027"},{"line_number":71,"context_line":"                                  \u0027cleanup /var/lock/qemu-nbd-%s.\u0027), device)"},{"line_number":72,"context_line":"        LOG.warning(_LW(\u0027No free nbd devices\u0027))"},{"line_number":73,"context_line":"        return None"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def _allocate_nbd(self):"},{"line_number":76,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_ab19cd23","line":73,"updated":"2015-05-22 20:19:21.000000000","message":"You don\u0027t need to return None. \u0027return\u0027 will be enouph","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"68367d5497afe704f3656991f04cedada74e62d5","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        LOG.debug(\u0027Get nbd device %(dev)s for %(imgfile)s\u0027,"},{"line_number":99,"context_line":"                  {\u0027dev\u0027: device, \u0027imgfile\u0027: self.image})"},{"line_number":100,"context_line":"        _out, err \u003d utils.trycmd(\u0027qemu-nbd\u0027, \u0027-c\u0027, device, self.image,"},{"line_number":101,"context_line":"                                 run_as_root\u003dTrue)"},{"line_number":102,"context_line":"        if err:"},{"line_number":103,"context_line":"            self.error \u003d _(\u0027qemu-nbd error: %s\u0027) % err"},{"line_number":104,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_1bea8174","line":101,"updated":"2015-05-22 11:21:19.000000000","message":"We should add this command in rootwrap.d/volume.filters to allow.\n\nCurrently it is failing with Not Authorized Error.","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"37c8e2cb45728d9d203c316f48c23b75c9cea230","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        LOG.debug(\u0027Get nbd device %(dev)s for %(imgfile)s\u0027,"},{"line_number":99,"context_line":"                  {\u0027dev\u0027: device, \u0027imgfile\u0027: self.image})"},{"line_number":100,"context_line":"        _out, err \u003d utils.trycmd(\u0027qemu-nbd\u0027, \u0027-c\u0027, device, self.image,"},{"line_number":101,"context_line":"                                 run_as_root\u003dTrue)"},{"line_number":102,"context_line":"        if err:"},{"line_number":103,"context_line":"            self.error \u003d _(\u0027qemu-nbd error: %s\u0027) % err"},{"line_number":104,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_bffb4478","line":101,"in_reply_to":"7a016987_1bea8174","updated":"2015-05-23 04:48:38.000000000","message":"Yes it is. Will fix it soon.","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"006946cd9fdbee0d96b84eae68d66c85183cd1c0","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            if os.path.exists(pidfile):"},{"line_number":112,"context_line":"                self.device \u003d device"},{"line_number":113,"context_line":"                break"},{"line_number":114,"context_line":"            time.sleep(1)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            self.error \u003d _(\u0027nbd device %s did not show up\u0027) % device"},{"line_number":117,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_6bbd15d7","line":114,"updated":"2015-05-22 20:19:21.000000000","message":"Should we use eventlet.sleep here and below?","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"37c8e2cb45728d9d203c316f48c23b75c9cea230","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            if os.path.exists(pidfile):"},{"line_number":112,"context_line":"                self.device \u003d device"},{"line_number":113,"context_line":"                break"},{"line_number":114,"context_line":"            time.sleep(1)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            self.error \u003d _(\u0027nbd device %s did not show up\u0027) % device"},{"line_number":117,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_7ff14c94","line":114,"in_reply_to":"7a016987_6bbd15d7","updated":"2015-05-23 04:48:38.000000000","message":"OK, thanks","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"afa3f5db50eb336a395ba10ad86053564d053a69","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":78,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":79,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":80,"context_line":"            return None"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        devices \u003d self._detect_nbd_devices()"},{"line_number":83,"context_line":"        random.shuffle(devices)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_d13d97bc","line":80,"updated":"2015-05-26 18:50:55.000000000","message":"No need to return None value. Just \"return\" will automatically return None.","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0df20af731322839830bd91334ffa097684287c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":78,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":79,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":80,"context_line":"            return None"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        devices \u003d self._detect_nbd_devices()"},{"line_number":83,"context_line":"        random.shuffle(devices)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_8a5bc085","line":80,"in_reply_to":"7a016987_d13d97bc","updated":"2015-06-01 06:42:29.000000000","message":"Sure","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"afa3f5db50eb336a395ba10ad86053564d053a69","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if not device:"},{"line_number":86,"context_line":"            # really want to log this info, not raise"},{"line_number":87,"context_line":"            self.error \u003d _(\u0027No free nbd devices\u0027)"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":"        return os.path.join(\u0027/dev\u0027, device)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @utils.synchronized(\u0027nbd-allocation-lock\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_b1333bf6","line":88,"updated":"2015-05-26 18:50:55.000000000","message":"Same as above.","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0df20af731322839830bd91334ffa097684287c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if not device:"},{"line_number":86,"context_line":"            # really want to log this info, not raise"},{"line_number":87,"context_line":"            self.error \u003d _(\u0027No free nbd devices\u0027)"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":"        return os.path.join(\u0027/dev\u0027, device)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @utils.synchronized(\u0027nbd-allocation-lock\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_6a576458","line":88,"in_reply_to":"7a016987_b1333bf6","updated":"2015-06-01 06:42:29.000000000","message":"Done","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"8729dea052addda2c8ad9a913a4f44930a627e56","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        LOG.debug(\u0027Get nbd device %(dev)s for %(imgfile)s\u0027,"},{"line_number":100,"context_line":"                  {\u0027dev\u0027: device, \u0027imgfile\u0027: self.image})"},{"line_number":101,"context_line":"        _out, err \u003d utils.trycmd(\u0027qemu-nbd\u0027, \u0027-c\u0027, device, self.image,"},{"line_number":102,"context_line":"                                 run_as_root\u003dTrue)"},{"line_number":103,"context_line":"        if err:"},{"line_number":104,"context_line":"            self.error \u003d _(\u0027qemu-nbd error: %s\u0027) % err"},{"line_number":105,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_e5af1e28","line":102,"updated":"2015-06-17 19:03:22.000000000","message":"It\u0027s not safe to do this w/o specifying -f \u003cformat\u003e.\n\nAlso should be read-only?","commit_id":"75722ffbd55cc19a1bb15f00518e9d36e352b96e"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"62fd5b3dd01f6dedd0410b0d4a2174c6a3001166","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        LOG.debug(\u0027Get nbd device %(dev)s for %(imgfile)s\u0027,"},{"line_number":100,"context_line":"                  {\u0027dev\u0027: device, \u0027imgfile\u0027: self.image})"},{"line_number":101,"context_line":"        _out, err \u003d utils.trycmd(\u0027qemu-nbd\u0027, \u0027-c\u0027, device, self.image,"},{"line_number":102,"context_line":"                                 run_as_root\u003dTrue)"},{"line_number":103,"context_line":"        if err:"},{"line_number":104,"context_line":"            self.error \u003d _(\u0027qemu-nbd error: %s\u0027) % err"},{"line_number":105,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_0aed58b6","line":102,"in_reply_to":"fa32b979_e5af1e28","updated":"2015-06-18 08:49:50.000000000","message":"Sure, should be read-only.","commit_id":"75722ffbd55cc19a1bb15f00518e9d36e352b96e"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"eba4b0dba96d904cca0989798c440969dcd40dbe","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    LOG.error(_LE(\u0027NBD error - previous umount did not \u0027"},{"line_number":72,"context_line":"                                  \u0027cleanup /var/lock/qemu-nbd-%s.\u0027), device)"},{"line_number":73,"context_line":"        LOG.warning(_LW(\u0027No free nbd devices\u0027))"},{"line_number":74,"context_line":"        return"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _allocate_nbd(self):"},{"line_number":77,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_ac0e8c30","line":74,"updated":"2015-06-25 22:24:54.000000000","message":"No need return here","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"7b80dfbe4905d636523080420f9bfe760bb07fad","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    LOG.error(_LE(\u0027NBD error - previous umount did not \u0027"},{"line_number":72,"context_line":"                                  \u0027cleanup /var/lock/qemu-nbd-%s.\u0027), device)"},{"line_number":73,"context_line":"        LOG.warning(_LW(\u0027No free nbd devices\u0027))"},{"line_number":74,"context_line":"        return"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _allocate_nbd(self):"},{"line_number":77,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_2e026c0a","line":74,"in_reply_to":"fa32b979_ac0e8c30","updated":"2015-06-26 02:15:38.000000000","message":"Done","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"eba4b0dba96d904cca0989798c440969dcd40dbe","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":78,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":79,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":80,"context_line":"            return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        devices \u003d self._detect_nbd_devices()"},{"line_number":83,"context_line":"        random.shuffle(devices)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_8c3868d6","line":80,"updated":"2015-06-25 22:24:54.000000000","message":"Should we raise exception here?","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"7b80dfbe4905d636523080420f9bfe760bb07fad","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":78,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":79,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":80,"context_line":"            return"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        devices \u003d self._detect_nbd_devices()"},{"line_number":83,"context_line":"        random.shuffle(devices)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_6eb4f434","line":80,"in_reply_to":"fa32b979_8c3868d6","updated":"2015-06-26 02:15:38.000000000","message":"I think it\u0027s fine, we will retry to allocate ndb and if it is failed finally, get_dev will reutrn False. No need to raise exception here IMHO.","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"cbabdbd539395f83a1d0fb837e3667123304c454","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                else:"},{"line_number":71,"context_line":"                    LOG.error(_LE(\u0027NBD error - previous umount did not \u0027"},{"line_number":72,"context_line":"                                  \u0027cleanup /var/lock/qemu-nbd-%s.\u0027), device)"},{"line_number":73,"context_line":"        LOG.warning(_LW(\u0027No free nbd devices\u0027))"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def _allocate_nbd(self):"},{"line_number":76,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_4a16344d","line":73,"updated":"2015-07-14 21:00:09.000000000","message":"\".\" at EOL","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b649c8232f334b46096f0c471f5a2b752a0ec2c6","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                else:"},{"line_number":71,"context_line":"                    LOG.error(_LE(\u0027NBD error - previous umount did not \u0027"},{"line_number":72,"context_line":"                                  \u0027cleanup /var/lock/qemu-nbd-%s.\u0027), device)"},{"line_number":73,"context_line":"        LOG.warning(_LW(\u0027No free nbd devices\u0027))"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def _allocate_nbd(self):"},{"line_number":76,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_de61903a","line":73,"in_reply_to":"9a41bdd9_4a16344d","updated":"2015-07-15 08:35:49.000000000","message":"Done","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"cbabdbd539395f83a1d0fb837e3667123304c454","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def _allocate_nbd(self):"},{"line_number":76,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":77,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":78,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":79,"context_line":"            return"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_8a075c17","line":77,"updated":"2015-07-14 21:00:09.000000000","message":"\".\" at EOL","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b649c8232f334b46096f0c471f5a2b752a0ec2c6","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def _allocate_nbd(self):"},{"line_number":76,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":77,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":78,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":79,"context_line":"            return"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_fe501434","line":77,"in_reply_to":"9a41bdd9_8a075c17","updated":"2015-07-15 08:35:49.000000000","message":"Done","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"cbabdbd539395f83a1d0fb837e3667123304c454","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def _allocate_nbd(self):"},{"line_number":76,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":77,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":78,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":79,"context_line":"            return"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        devices \u003d self._detect_nbd_devices()"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_ea06281c","line":78,"updated":"2015-07-14 21:00:09.000000000","message":"\".\" at EOL","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b649c8232f334b46096f0c471f5a2b752a0ec2c6","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def _allocate_nbd(self):"},{"line_number":76,"context_line":"        if not os.path.exists(\u0027/sys/block/nbd0\u0027):"},{"line_number":77,"context_line":"            LOG.error(_LE(\u0027nbd module not loaded\u0027))"},{"line_number":78,"context_line":"            self.error \u003d _(\u0027nbd unavailable: module not loaded\u0027)"},{"line_number":79,"context_line":"            return"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        devices \u003d self._detect_nbd_devices()"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_de4bd085","line":78,"in_reply_to":"9a41bdd9_ea06281c","updated":"2015-07-15 08:35:49.000000000","message":"Done","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"cbabdbd539395f83a1d0fb837e3667123304c454","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                break"},{"line_number":114,"context_line":"            eventlet.sleep(1)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            self.error \u003d _(\u0027nbd device %s did not show up\u0027) % device"},{"line_number":117,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            # Cleanup"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_f6013407","line":116,"updated":"2015-07-14 21:00:09.000000000","message":"\".\" at EOL","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b649c8232f334b46096f0c471f5a2b752a0ec2c6","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                break"},{"line_number":114,"context_line":"            eventlet.sleep(1)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            self.error \u003d _(\u0027nbd device %s did not show up\u0027) % device"},{"line_number":117,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            # Cleanup"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_1e7ff8ab","line":116,"in_reply_to":"9a41bdd9_f6013407","updated":"2015-07-15 08:35:49.000000000","message":"Done","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"79b2256ebdf58c9a4b79c769946a4fae297114cc","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    cfg.IntOpt(\u0027backup_timeout_nbd\u0027,"},{"line_number":38,"context_line":"               default\u003d10,"},{"line_number":39,"context_line":"               help\u003d\u0027Amount of time, in seconds, to wait for NBD \u0027"},{"line_number":40,"context_line":"               \u0027device start up.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_dd75dfca","line":40,"updated":"2015-07-16 06:01:32.000000000","message":"Indentation here should be aligned with \u0027Amount .","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"51261971868b95c526dddc35a20dc791d7166dc6","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    cfg.IntOpt(\u0027backup_timeout_nbd\u0027,"},{"line_number":38,"context_line":"               default\u003d10,"},{"line_number":39,"context_line":"               help\u003d\u0027Amount of time, in seconds, to wait for NBD \u0027"},{"line_number":40,"context_line":"               \u0027device start up.\u0027),"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_54619703","line":40,"in_reply_to":"9a41bdd9_dd75dfca","updated":"2015-07-16 12:44:36.000000000","message":"Done","commit_id":"bd808c1d76e9baae4512ea335b1b06e472b95891"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"6db84be4ca286abbaaf78bab910d916f72c97151","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Support for connecting qcow2 volume to local device with qemu-nbd"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is essentially a copy from nova.virt.disk.mount.nbd.py."},{"line_number":20,"context_line":"Some slight modificatons, but at some point we should look at maybe"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a50d1a3_d058de58","line":17,"updated":"2015-07-27 14:50:14.000000000","message":"Missing \".\" at EOL.","commit_id":"d03c74d548829357570a7206b7d6dce360a5b6fa"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"6db84be4ca286abbaaf78bab910d916f72c97151","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is essentially a copy from nova.virt.disk.mount.nbd.py."},{"line_number":20,"context_line":"Some slight modificatons, but at some point we should look at maybe"},{"line_number":21,"context_line":"pushing this up to Oslo"},{"line_number":22,"context_line":"\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import os"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a50d1a3_d39f885d","line":21,"updated":"2015-07-27 14:50:14.000000000","message":"Missing \".\" at EOL.","commit_id":"d03c74d548829357570a7206b7d6dce360a5b6fa"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"8f5117f72aae4a7121e0478769c5b8319c6b1fd5","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                                 self.image, run_as_root\u003dTrue)"},{"line_number":102,"context_line":"        if err:"},{"line_number":103,"context_line":"            self.error \u003d _(\u0027qemu-nbd error: %s\u0027) % err"},{"line_number":104,"context_line":"            LOG.info(_LI(\u0027NBD mount error: %s\u0027), self.error)"},{"line_number":105,"context_line":"            return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # NOTE(vish): this forks into another process, so give it a chance"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a4dcd0f_3aa27a9b","line":104,"updated":"2015-08-14 15:34:01.000000000","message":"Should this be changed to LOG.error()?","commit_id":"3a9643ab165821e54c8ff8ba50ece8dfa1b27bb4"}],"cinder/volume/driver.py":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"77817073daee1dadb376513657a28e7f33058b4a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"from cinder.db.api import volume_admin_metadata_get"},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Drivers for volumes."},{"line_number":19,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_c6ffd0a8","line":16,"updated":"2015-05-18 11:55:27.000000000","message":"We are not using this volume_admin_metadata_get module.\n\nIn line 752, directly we are using self.db.volume_admin_metadata_get method.","commit_id":"d5bf58849a7f4e32287daa5409dde1e1010d8058"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0637b00bdac6affed2c8b1c88a018673353daa0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"from cinder.db.api import volume_admin_metadata_get"},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Drivers for volumes."},{"line_number":19,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_9c50fdd5","line":16,"in_reply_to":"7a016987_c6ffd0a8","updated":"2015-05-19 03:27:43.000000000","message":"Done","commit_id":"d5bf58849a7f4e32287daa5409dde1e1010d8058"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"77817073daee1dadb376513657a28e7f33058b4a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from cinder.i18n import _, _LE, _LW"},{"line_number":32,"context_line":"from cinder.image import image_utils"},{"line_number":33,"context_line":"from cinder.openstack.common import fileutils"},{"line_number":34,"context_line":"from cinder import units"},{"line_number":35,"context_line":"from cinder import utils"},{"line_number":36,"context_line":"from cinder.volume import rpcapi as volume_rpcapi"},{"line_number":37,"context_line":"from cinder.volume import throttling"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_465c00ed","line":34,"updated":"2015-05-18 11:55:27.000000000","message":"units module moved to oslo_units so please use \"from oslo_utils import units\" instead of \"from cinder import units\".\n\nBecause of this many test cases are failing.","commit_id":"d5bf58849a7f4e32287daa5409dde1e1010d8058"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0637b00bdac6affed2c8b1c88a018673353daa0","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from cinder.i18n import _, _LE, _LW"},{"line_number":32,"context_line":"from cinder.image import image_utils"},{"line_number":33,"context_line":"from cinder.openstack.common import fileutils"},{"line_number":34,"context_line":"from cinder import units"},{"line_number":35,"context_line":"from cinder import utils"},{"line_number":36,"context_line":"from cinder.volume import rpcapi as volume_rpcapi"},{"line_number":37,"context_line":"from cinder.volume import throttling"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_3c56a9ce","line":34,"in_reply_to":"7a016987_465c00ed","updated":"2015-05-19 03:27:43.000000000","message":"Done","commit_id":"d5bf58849a7f4e32287daa5409dde1e1010d8058"},{"author":{"_account_id":9624,"name":"Ramy Asselin","email":"ramyasselin@yahoo.com","username":"asselin"},"change_message_id":"96162fe86b85f8edd9d53df27916942883837ea3","unresolved":false,"context_lines":[{"line_number":751,"context_line":"            volume_admin_metadata \u003d self.db.volume_admin_metadata_get("},{"line_number":752,"context_line":"                context.elevated(), backup[\u0027volume_id\u0027])"},{"line_number":753,"context_line":"            volume_device \u003d self._backup_prepare_volume_device("},{"line_number":754,"context_line":"                volume_path, volume[\u0027size\u0027] * units.GiB, volume_admin_metadata)"},{"line_number":755,"context_line":"            # Secure network file systems will not chown files."},{"line_number":756,"context_line":"            if self.secure_file_operations_enabled():"},{"line_number":757,"context_line":"                with fileutils.file_open("}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_ecb73438","line":754,"updated":"2015-05-19 14:23:30.000000000","message":"http://15.126.198.151/76/182276/3/check/lefthand-iscsi-driver-master-client-pip-vsa673-dsvm/cf04407/logs/screen-c-bak.txt.gz?level\u003dTRACE#_2015-05-19_04_45_15_708","commit_id":"5e0ba6df166fcf8fa969b0ec135496dfd0bdc05b"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"432ea0042ecbd15f9e62ecebbfad9602fc2c4ad4","unresolved":false,"context_lines":[{"line_number":786,"context_line":"        try:"},{"line_number":787,"context_line":"            volume_path \u003d attach_info[\u0027device\u0027][\u0027path\u0027]"},{"line_number":788,"context_line":"            volume_admin_metadata \u003d self.db.volume_admin_metadata_get("},{"line_number":789,"context_line":"                context.elevated(), backup[\u0027volume_id\u0027])"},{"line_number":790,"context_line":"            volume_device \u003d self._backup_prepare_volume_device("},{"line_number":791,"context_line":"                volume_path, volume[\u0027size\u0027] * units.Gi, volume_admin_metadata)"},{"line_number":792,"context_line":"            # Secure network file systems will not chown files."}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_7bbdf5d6","line":789,"updated":"2015-05-22 10:45:41.000000000","message":"Here, we can\u0027t always retrieve the volume_admin_metadata of base volume (backup[volume_id]).\n\nPlease have a look at the below scenario:\n1. created a volume \u0027vol1\u0027\n2. created backup of volume \u0027vol1\u0027, let us say backup_vol1\n3. restore backup_vol1\n4. deleted the base volume \u0027vol1\u0027\n5. again try to restore backup_vol1\n\nIn step no.: 3 we can restore the volume, since base volume \u0027vol1\u0027 exists.\n\nBut in step no.: 5 we can\u0027t restore the volume, because base volume \u0027vol1\u0027 has been deleted, so in this step when we try to get the volume_admin_metadata of base volume (vol1 \u003d backup[\u0027volume_id\u0027]) is will raise below exception like:\n\nVolumeNotFound: Volume 3b9037ba-ee93-4709-9586-330dea5cb34d could not be found.","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"37c8e2cb45728d9d203c316f48c23b75c9cea230","unresolved":false,"context_lines":[{"line_number":786,"context_line":"        try:"},{"line_number":787,"context_line":"            volume_path \u003d attach_info[\u0027device\u0027][\u0027path\u0027]"},{"line_number":788,"context_line":"            volume_admin_metadata \u003d self.db.volume_admin_metadata_get("},{"line_number":789,"context_line":"                context.elevated(), backup[\u0027volume_id\u0027])"},{"line_number":790,"context_line":"            volume_device \u003d self._backup_prepare_volume_device("},{"line_number":791,"context_line":"                volume_path, volume[\u0027size\u0027] * units.Gi, volume_admin_metadata)"},{"line_number":792,"context_line":"            # Secure network file systems will not chown files."}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_1fc258e9","line":789,"in_reply_to":"7a016987_7bbdf5d6","updated":"2015-05-23 04:48:38.000000000","message":"Emm, if volume_id is not existed. It will raise the VolumeNotFound in backup_api line 259 before call the driver\u0027s method. So I think it\u0027s safe here.","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"88eea8ff3024f178f56efbd5148a0786e76f40e7","unresolved":false,"context_lines":[{"line_number":786,"context_line":"        try:"},{"line_number":787,"context_line":"            volume_path \u003d attach_info[\u0027device\u0027][\u0027path\u0027]"},{"line_number":788,"context_line":"            volume_admin_metadata \u003d self.db.volume_admin_metadata_get("},{"line_number":789,"context_line":"                context.elevated(), backup[\u0027volume_id\u0027])"},{"line_number":790,"context_line":"            volume_device \u003d self._backup_prepare_volume_device("},{"line_number":791,"context_line":"                volume_path, volume[\u0027size\u0027] * units.Gi, volume_admin_metadata)"},{"line_number":792,"context_line":"            # Secure network file systems will not chown files."}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_62fd2fb0","line":789,"updated":"2015-05-23 05:43:43.000000000","message":"Again I am raising the same point,\n\nWhat I am trying to explain is:\n\n*** Backup is independent of origional volume  ***(Please re the blueprint for the same: https://blueprints.launchpad.net/cinder/+spec/volume-backups)\n\nThat means, once backup is created we can delete the origional volume, in that case, this patch is failing with below error, while restoring the backup.\n\nhttp://paste.openstack.org/show/232681/","commit_id":"7bb5d3e4d73613312cf8272099f9e3ec421f180c"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"eda07472bc7498c32db822e3e4fa817d66f222c8","unresolved":false,"context_lines":[{"line_number":786,"context_line":"        try:"},{"line_number":787,"context_line":"            volume_path \u003d attach_info[\u0027device\u0027][\u0027path\u0027]"},{"line_number":788,"context_line":"            volume_admin_metadata \u003d self.db.volume_admin_metadata_get("},{"line_number":789,"context_line":"                context.elevated(), backup[\u0027volume_id\u0027])"},{"line_number":790,"context_line":"            volume_device \u003d self._backup_prepare_volume_device("},{"line_number":791,"context_line":"                volume_path, volume[\u0027size\u0027] * units.Gi, volume_admin_metadata)"},{"line_number":792,"context_line":"            # Secure network file systems will not chown files."}],"source_content_type":"text/x-python","patch_set":10,"id":"7a016987_e2a0ff43","line":789,"in_reply_to":"7a016987_62fd2fb0","updated":"2015-05-23 10:26:24.000000000","message":"I got you point. It shouldn\u0027t be got from backup[\u0027volume_id\u0027]. It may be deleted.  I think it should got from the volume that pass through api.","commit_id":"7bb5d3e4d73613312cf8272099f9e3ec421f180c"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"afa3f5db50eb336a395ba10ad86053564d053a69","unresolved":false,"context_lines":[{"line_number":730,"context_line":"    def _backup_prepare_volume_device(self, volume_path, volume_size,"},{"line_number":731,"context_line":"                                      volume_admin_metadata):"},{"line_number":732,"context_line":"        return {\u0027volume_path\u0027: volume_path,"},{"line_number":733,"context_line":"                \u0027device\u0027: None}"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"    def _backup_clean_volume_device(self, volume_device):"},{"line_number":736,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_719a63c7","line":733,"updated":"2015-05-26 18:50:55.000000000","message":"The last item in the dictionary should have a trailing comma.\n\nhttp://docs.openstack.org/developer/hacking/#dictionaries-lists","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0df20af731322839830bd91334ffa097684287c","unresolved":false,"context_lines":[{"line_number":730,"context_line":"    def _backup_prepare_volume_device(self, volume_path, volume_size,"},{"line_number":731,"context_line":"                                      volume_admin_metadata):"},{"line_number":732,"context_line":"        return {\u0027volume_path\u0027: volume_path,"},{"line_number":733,"context_line":"                \u0027device\u0027: None}"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"    def _backup_clean_volume_device(self, volume_device):"},{"line_number":736,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_8ad2a0cf","line":733,"in_reply_to":"7a016987_719a63c7","updated":"2015-06-01 06:42:29.000000000","message":"Done","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"d687a66385f8cefd294cce6d214c03d0688f191f","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            LOG.exception(_LE(\"Detaching snapshot from a remote node \""},{"line_number":402,"context_line":"                              \"is not supported.\"))"},{"line_number":403,"context_line":"            raise exception.NotSupportedOperation("},{"line_number":404,"context_line":"                operation\u003d_(\"detach snapshot from remote node\"))"},{"line_number":405,"context_line":"        else:"},{"line_number":406,"context_line":"            # Call local driver\u0027s terminate_connection and remove export."},{"line_number":407,"context_line":"            # NOTE(avishay) This is copied from the manager\u0027s code - need to"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa1b9901_ea3dd72b","line":404,"updated":"2015-08-25 14:03:16.000000000","message":"I suggest that you mention the specific error happening in the log statement. Also, it should be a complete sentence with capitalization and punctuation. Thanks!","commit_id":"a0096ff32753e9f67167b4f3e4e587492061957f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"1976b16de4f944df45ceed134a2c523f5c79f3e0","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            LOG.exception(_LE(\"Detaching snapshot from a remote node \""},{"line_number":402,"context_line":"                              \"is not supported.\"))"},{"line_number":403,"context_line":"            raise exception.NotSupportedOperation("},{"line_number":404,"context_line":"                operation\u003d_(\"detach snapshot from remote node\"))"},{"line_number":405,"context_line":"        else:"},{"line_number":406,"context_line":"            # Call local driver\u0027s terminate_connection and remove export."},{"line_number":407,"context_line":"            # NOTE(avishay) This is copied from the manager\u0027s code - need to"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a2fa921_7519a2d6","line":404,"in_reply_to":"fa1b9901_ea3dd72b","updated":"2015-10-08 03:11:17.000000000","message":"Class NotSupportedOperation has the message: \"message \u003d _(\"Operation not supported: %(operation)s.\")\", so there don\u0027t need a complete sentence. It will make up the exception message as \"Operation not supported: detach snapshot from remote node.\".","commit_id":"a0096ff32753e9f67167b4f3e4e587492061957f"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"d687a66385f8cefd294cce6d214c03d0688f191f","unresolved":false,"context_lines":[{"line_number":773,"context_line":"            LOG.exception(_LE(\"Attaching snapshot from a remote node \""},{"line_number":774,"context_line":"                              \"is not supported.\"))"},{"line_number":775,"context_line":"            raise exception.NotSupportedOperation("},{"line_number":776,"context_line":"                operation\u003d_(\"attach snapshot from remote node\"))"},{"line_number":777,"context_line":"        else:"},{"line_number":778,"context_line":"            # Call local driver\u0027s create_export and initialize_connection."},{"line_number":779,"context_line":"            # NOTE(avishay) This is copied from the manager\u0027s code - need to"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa1b9901_ca557350","line":776,"updated":"2015-08-25 14:03:16.000000000","message":"Ditto here as above. Thanks!","commit_id":"a0096ff32753e9f67167b4f3e4e587492061957f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"1976b16de4f944df45ceed134a2c523f5c79f3e0","unresolved":false,"context_lines":[{"line_number":773,"context_line":"            LOG.exception(_LE(\"Attaching snapshot from a remote node \""},{"line_number":774,"context_line":"                              \"is not supported.\"))"},{"line_number":775,"context_line":"            raise exception.NotSupportedOperation("},{"line_number":776,"context_line":"                operation\u003d_(\"attach snapshot from remote node\"))"},{"line_number":777,"context_line":"        else:"},{"line_number":778,"context_line":"            # Call local driver\u0027s create_export and initialize_connection."},{"line_number":779,"context_line":"            # NOTE(avishay) This is copied from the manager\u0027s code - need to"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a2fa921_557b46f5","line":776,"in_reply_to":"fa1b9901_ca557350","updated":"2015-10-08 03:11:17.000000000","message":"Same as above","commit_id":"a0096ff32753e9f67167b4f3e4e587492061957f"}],"cinder/volume/drivers/remotefs.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"0db506e072ec5472e784beb582c0029aaac20199","unresolved":false,"context_lines":[{"line_number":604,"context_line":"            LOG.warn(msg)"},{"line_number":605,"context_line":"            raise exception.BackupOperationError(msg)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        if volume_info.file_format \u003d\u003d \"qcow2\":"},{"line_number":608,"context_line":"            nbd_device \u003d device.NbdDevice(volume_path)"},{"line_number":609,"context_line":"            if nbd_device.get_dev():"},{"line_number":610,"context_line":"                msg \u003d (_(\"will return nbd (%s)\") % nbd_device.device)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_2c401b56","line":607,"updated":"2015-05-12 17:12:30.000000000","message":"It is not safe to pull the file format from the volume data w/ qemu-img.  In this spec [1] we are working on storing the format in the database rather than querying volume files for it in other places.\n\nWe should not add new functionality which uses this method, and need something based on the work at [1].  See previous bug [2].\n\n[1] https://review.openstack.org/#/c/165393/\n[2] https://bugs.launchpad.net/cinder/+bug/1350504/","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"1bc9e34d67391a6b88e01d728874477080af3022","unresolved":false,"context_lines":[{"line_number":604,"context_line":"            LOG.warn(msg)"},{"line_number":605,"context_line":"            raise exception.BackupOperationError(msg)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"        if volume_info.file_format \u003d\u003d \"qcow2\":"},{"line_number":608,"context_line":"            nbd_device \u003d device.NbdDevice(volume_path)"},{"line_number":609,"context_line":"            if nbd_device.get_dev():"},{"line_number":610,"context_line":"                msg \u003d (_(\"will return nbd (%s)\") % nbd_device.device)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_88c14583","line":607,"in_reply_to":"9a0c5dc1_2c401b56","updated":"2015-05-14 12:37:12.000000000","message":"Thanks Eric, I have noticed the bug/1350504. I will re-code this patch based on the work[1].","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"99218fbc1218e205d8bde049937ef4f277e28c85","unresolved":false,"context_lines":[{"line_number":614,"context_line":"            else:"},{"line_number":615,"context_line":"                msg \u003d (_LW(\"allocate nbd for volume (%s)\""},{"line_number":616,"context_line":"                           \" failed\") % volume_path)"},{"line_number":617,"context_line":"                LOG.warn(msg)"},{"line_number":618,"context_line":"                raise exception.BackupOperationError(msg)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        return super(RemoteFSDriver, self)._backup_prepare_volume_device("}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_eda9927c","line":617,"updated":"2015-05-18 07:34:19.000000000","message":"LOG.warn is deprecated, please use LOG.warning!\n\nSame in other places as well.","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c977edec427ac170eb155e99206bba4c9a89c137","unresolved":false,"context_lines":[{"line_number":614,"context_line":"            else:"},{"line_number":615,"context_line":"                msg \u003d (_LW(\"allocate nbd for volume (%s)\""},{"line_number":616,"context_line":"                           \" failed\") % volume_path)"},{"line_number":617,"context_line":"                LOG.warn(msg)"},{"line_number":618,"context_line":"                raise exception.BackupOperationError(msg)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        return super(RemoteFSDriver, self)._backup_prepare_volume_device("}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_83cb0da5","line":617,"in_reply_to":"7a016987_eda9927c","updated":"2015-05-18 09:01:27.000000000","message":"OK","commit_id":"24051170b44fd2ab4a89105fb87fe31733788408"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"9053c19abb90b6a8354f3a5d4d05759fe94ffe72","unresolved":false,"context_lines":[{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def _backup_clean_volume_device(self, volume_device):"},{"line_number":628,"context_line":"        if volume_device and volume_device[\u0027device\u0027]:"},{"line_number":629,"context_line":"            msg \u003d (_(\"will clean nbd (%s)\") % volume_device[\u0027device\u0027])"},{"line_number":630,"context_line":"            LOG.debug(msg)"},{"line_number":631,"context_line":"            volume_device[\u0027device\u0027].unget_dev()"},{"line_number":632,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_d95c0a7f","line":629,"updated":"2015-05-21 15:54:13.000000000","message":"Here is the problem:\n\nIn line no.: 618, we are setting volume_device[\u0027device\u0027] \u003d nbd_device. This will execute only when that volume is of type \"qcow2\".\n\nIf the volume is of type \"raw\" then, in driver.py line No.: 730 will be executed. That will return a dict with only one key i.e. \u0027volume_path\u0027 but not \u0027device\u0027.\n\nBecause of that in this line (629), we are getting KeyError: \u0027device\u0027.","commit_id":"a4bb393e81955a1b3968a38ab23b79797f30a443"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"8ef3b5059d63f36451662c0e8e77b469e4579458","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            volume_path, volume_size, volume_admin_metadata)"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def _backup_clean_volume_device(self, volume_device):"},{"line_number":642,"context_line":"        if volume_device[\u0027device\u0027] and volume_device[\u0027device\u0027]:"},{"line_number":643,"context_line":"            msg \u003d (_(\"will clean nbd (%s)\") % volume_device[\u0027device\u0027])"},{"line_number":644,"context_line":"            LOG.debug(msg)"},{"line_number":645,"context_line":"            volume_device[\u0027device\u0027].unget_dev()"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_2fb97e2e","line":642,"updated":"2015-05-22 00:54:56.000000000","message":"Because we have added \u0027device\u003dNone\u0027 in driver.py. So there is no need to change I think, and now there is duplicate \u0027volume_device[\u0027device\u0027]\u0027.I will update it in next patch.:)","commit_id":"7b239e4a9c0fa60d7365f1dbaaa1d9c95427ba6b"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"7ba2058f15fb06a6663a32ebbc28c42b6508fe24","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        # To avoid security issue with auto-detection of file format using"},{"line_number":623,"context_line":"        # qemu-image info. We use volume_admin_metadata to storage correct"},{"line_number":624,"context_line":"        # file format."},{"line_number":625,"context_line":"        file_format \u003d volume_admin_metadata.get(\u0027format\u0027, \u0027raw\u0027)"},{"line_number":626,"context_line":"        if file_format \u003d\u003d \"qcow2\":"},{"line_number":627,"context_line":"            nbd_device \u003d device.NbdDevice(volume_path)"},{"line_number":628,"context_line":"            if nbd_device.get_dev():"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_aa6c3c08","line":625,"updated":"2015-05-22 03:50:58.000000000","message":"Here we should not defult the file_format to \u0027raw\u0027. FYI blueprint add-support-store-volume-format-info is still in WIP. So currently volume_admin_metadata will not have \u0027format\u0027 of the volume. Because of this this code is treating qcow2 volumes as raw volumes.\n\nSo for now, we can use qemu_img_info to detect the volume format. Ofcoure that is not safe, but Eric sent a workaround for that: Ic89cffc93940b7b119cfcde3362f304c9f2875df","commit_id":"3b617931be9a105904278cb6b90a8a27ed2cbf3f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"71880260a7acccc5f6a6415ea17e0495af68e41d","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        # To avoid security issue with auto-detection of file format using"},{"line_number":623,"context_line":"        # qemu-image info. We use volume_admin_metadata to storage correct"},{"line_number":624,"context_line":"        # file format."},{"line_number":625,"context_line":"        file_format \u003d volume_admin_metadata.get(\u0027format\u0027, \u0027raw\u0027)"},{"line_number":626,"context_line":"        if file_format \u003d\u003d \"qcow2\":"},{"line_number":627,"context_line":"            nbd_device \u003d device.NbdDevice(volume_path)"},{"line_number":628,"context_line":"            if nbd_device.get_dev():"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_b28dd2d4","line":625,"in_reply_to":"7a016987_aa6c3c08","updated":"2015-05-22 08:13:49.000000000","message":"Yes, Eric\u0027s patch enhance the security of qemu-imge.I got your point, and will update it. Thanks","commit_id":"3b617931be9a105904278cb6b90a8a27ed2cbf3f"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"006946cd9fdbee0d96b84eae68d66c85183cd1c0","unresolved":false,"context_lines":[{"line_number":613,"context_line":"            data \u003d {\u0027volume_path\u0027: volume_path,"},{"line_number":614,"context_line":"                    \u0027virtual_size\u0027: volume_info.virtual_size,"},{"line_number":615,"context_line":"                    \u0027volume_size\u0027: volume_size}"},{"line_number":616,"context_line":"            msg \u003d (_LW(\"volume %(volume_path)s virtual size %(virtual_size)d\""},{"line_number":617,"context_line":"                       \" is not equal with size in db %(volume_size)d,\""},{"line_number":618,"context_line":"                       \" reject the backup operation\") % data)"},{"line_number":619,"context_line":"            LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_0bb6a1f8","line":616,"updated":"2015-05-22 20:19:21.000000000","message":"Please, start messages with upper case","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"37c8e2cb45728d9d203c316f48c23b75c9cea230","unresolved":false,"context_lines":[{"line_number":613,"context_line":"            data \u003d {\u0027volume_path\u0027: volume_path,"},{"line_number":614,"context_line":"                    \u0027virtual_size\u0027: volume_info.virtual_size,"},{"line_number":615,"context_line":"                    \u0027volume_size\u0027: volume_size}"},{"line_number":616,"context_line":"            msg \u003d (_LW(\"volume %(volume_path)s virtual size %(virtual_size)d\""},{"line_number":617,"context_line":"                       \" is not equal with size in db %(volume_size)d,\""},{"line_number":618,"context_line":"                       \" reject the backup operation\") % data)"},{"line_number":619,"context_line":"            LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_9fae482c","line":616,"in_reply_to":"7a016987_0bb6a1f8","updated":"2015-05-23 04:48:38.000000000","message":"Sure.","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"006946cd9fdbee0d96b84eae68d66c85183cd1c0","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            nbd_device \u003d device.NbdDevice(volume_path)"},{"line_number":632,"context_line":"            if nbd_device.get_dev():"},{"line_number":633,"context_line":"                msg \u003d (_(\"will return nbd (%s)\") % nbd_device.device)"},{"line_number":634,"context_line":"                LOG.debug(msg)"},{"line_number":635,"context_line":"                return {\u0027volume_path\u0027: nbd_device.device,"},{"line_number":636,"context_line":"                        \u0027device\u0027: nbd_device, }"},{"line_number":637,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_2baa7d85","line":634,"updated":"2015-05-22 20:19:21.000000000","message":"should be:\nLOG.debug(\"Will return nbd (%s)\", nbd_device.device)","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"37c8e2cb45728d9d203c316f48c23b75c9cea230","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            nbd_device \u003d device.NbdDevice(volume_path)"},{"line_number":632,"context_line":"            if nbd_device.get_dev():"},{"line_number":633,"context_line":"                msg \u003d (_(\"will return nbd (%s)\") % nbd_device.device)"},{"line_number":634,"context_line":"                LOG.debug(msg)"},{"line_number":635,"context_line":"                return {\u0027volume_path\u0027: nbd_device.device,"},{"line_number":636,"context_line":"                        \u0027device\u0027: nbd_device, }"},{"line_number":637,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_3f66342a","line":634,"in_reply_to":"7a016987_2baa7d85","updated":"2015-05-23 04:48:38.000000000","message":"Sure","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"006946cd9fdbee0d96b84eae68d66c85183cd1c0","unresolved":false,"context_lines":[{"line_number":645,"context_line":"    def _backup_clean_volume_device(self, volume_device):"},{"line_number":646,"context_line":"        if volume_device.get(\u0027device\u0027):"},{"line_number":647,"context_line":"            msg \u003d (_(\"will clean nbd (%s)\") % volume_device[\u0027device\u0027])"},{"line_number":648,"context_line":"            LOG.debug(msg)"},{"line_number":649,"context_line":"            volume_device[\u0027device\u0027].unget_dev()"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_cb93e959","line":648,"updated":"2015-05-22 20:19:21.000000000","message":"Same as in line #634","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"37c8e2cb45728d9d203c316f48c23b75c9cea230","unresolved":false,"context_lines":[{"line_number":645,"context_line":"    def _backup_clean_volume_device(self, volume_device):"},{"line_number":646,"context_line":"        if volume_device.get(\u0027device\u0027):"},{"line_number":647,"context_line":"            msg \u003d (_(\"will clean nbd (%s)\") % volume_device[\u0027device\u0027])"},{"line_number":648,"context_line":"            LOG.debug(msg)"},{"line_number":649,"context_line":"            volume_device[\u0027device\u0027].unget_dev()"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_1f6938f9","line":648,"in_reply_to":"7a016987_cb93e959","updated":"2015-05-23 04:48:38.000000000","message":"OK","commit_id":"40a68102c0d2f083245f58c8b6361cdfd9dfb67f"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"afa3f5db50eb336a395ba10ad86053564d053a69","unresolved":false,"context_lines":[{"line_number":612,"context_line":"        if volume_info.virtual_size !\u003d volume_size:"},{"line_number":613,"context_line":"            data \u003d {\u0027volume_path\u0027: volume_path,"},{"line_number":614,"context_line":"                    \u0027virtual_size\u0027: volume_info.virtual_size,"},{"line_number":615,"context_line":"                    \u0027volume_size\u0027: volume_size}"},{"line_number":616,"context_line":"            msg \u003d (_LW(\"Volume %(volume_path)s virtual size %(virtual_size)d\""},{"line_number":617,"context_line":"                       \" is not equal with size in db %(volume_size)d,\""},{"line_number":618,"context_line":"                       \" reject the backup operation\"), data)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_f1ae53e6","line":615,"updated":"2015-05-26 18:50:55.000000000","message":"The last item in the dictionary should have a trailing comma.","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0df20af731322839830bd91334ffa097684287c","unresolved":false,"context_lines":[{"line_number":612,"context_line":"        if volume_info.virtual_size !\u003d volume_size:"},{"line_number":613,"context_line":"            data \u003d {\u0027volume_path\u0027: volume_path,"},{"line_number":614,"context_line":"                    \u0027virtual_size\u0027: volume_info.virtual_size,"},{"line_number":615,"context_line":"                    \u0027volume_size\u0027: volume_size}"},{"line_number":616,"context_line":"            msg \u003d (_LW(\"Volume %(volume_path)s virtual size %(virtual_size)d\""},{"line_number":617,"context_line":"                       \" is not equal with size in db %(volume_size)d,\""},{"line_number":618,"context_line":"                       \" reject the backup operation\"), data)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_6ade44de","line":615,"in_reply_to":"7a016987_f1ae53e6","updated":"2015-06-01 06:42:29.000000000","message":"Done","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"afa3f5db50eb336a395ba10ad86053564d053a69","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                    \u0027volume_size\u0027: volume_size}"},{"line_number":616,"context_line":"            msg \u003d (_LW(\"Volume %(volume_path)s virtual size %(virtual_size)d\""},{"line_number":617,"context_line":"                       \" is not equal with size in db %(volume_size)d,\""},{"line_number":618,"context_line":"                       \" reject the backup operation\"), data)"},{"line_number":619,"context_line":"            LOG.warning(msg)"},{"line_number":620,"context_line":"            raise exception.BackupOperationError(msg)"},{"line_number":621,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_b18fbb74","line":618,"updated":"2015-05-26 18:50:55.000000000","message":"Please move the starting spaces to the end of above lines.","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"c0df20af731322839830bd91334ffa097684287c","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                    \u0027volume_size\u0027: volume_size}"},{"line_number":616,"context_line":"            msg \u003d (_LW(\"Volume %(volume_path)s virtual size %(virtual_size)d\""},{"line_number":617,"context_line":"                       \" is not equal with size in db %(volume_size)d,\""},{"line_number":618,"context_line":"                       \" reject the backup operation\"), data)"},{"line_number":619,"context_line":"            LOG.warning(msg)"},{"line_number":620,"context_line":"            raise exception.BackupOperationError(msg)"},{"line_number":621,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_2ae4cca9","line":618,"in_reply_to":"7a016987_b18fbb74","updated":"2015-06-01 06:42:29.000000000","message":"Done","commit_id":"b5a6e9ad2341aa4860f151102b0b12c072583c27"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"eba4b0dba96d904cca0989798c440969dcd40dbe","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                        \u0027device\u0027: nbd_device, }"},{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                msg \u003d (_LW(\"Allocate nbd for volume (%s) failed\"), volume_path)"},{"line_number":635,"context_line":"                LOG.warning(msg)"},{"line_number":636,"context_line":"                raise exception.BackupOperationError(msg)"},{"line_number":637,"context_line":"        return super(RemoteFSDriver, self)._backup_prepare_volume_device("},{"line_number":638,"context_line":"            volume_path, volume_size, volume_admin_metadata)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_6ce2c431","line":635,"updated":"2015-06-25 22:24:54.000000000","message":"Should be:\n\nmsg \u003d _LW(\"Allocate nbd for volume (%s) failed\")\nLOG.warning(msg, volume_path)\n\nThe same comment for other log statements","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"7b80dfbe4905d636523080420f9bfe760bb07fad","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                        \u0027device\u0027: nbd_device, }"},{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                msg \u003d (_LW(\"Allocate nbd for volume (%s) failed\"), volume_path)"},{"line_number":635,"context_line":"                LOG.warning(msg)"},{"line_number":636,"context_line":"                raise exception.BackupOperationError(msg)"},{"line_number":637,"context_line":"        return super(RemoteFSDriver, self)._backup_prepare_volume_device("},{"line_number":638,"context_line":"            volume_path, volume_size, volume_admin_metadata)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_6e8b9469","line":635,"in_reply_to":"fa32b979_6ce2c431","updated":"2015-06-26 02:15:38.000000000","message":"Done","commit_id":"f075f84cb9f761ede5df23c2138e928a35412516"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"aa168f2be1be943304b3f00ea90bb151c64e20c4","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                    \u0027volume_size\u0027: volume_size, }"},{"line_number":613,"context_line":"            msg \u003d _LW(\"Volume %(volume_path)s virtual size %(virtual_size)d \""},{"line_number":614,"context_line":"                      \"is not equal with size in db %(volume_size)d, \""},{"line_number":615,"context_line":"                      \"reject the backup operation\")"},{"line_number":616,"context_line":"            LOG.warning(msg, data)"},{"line_number":617,"context_line":"            raise exception.BackupOperationError(msg)"},{"line_number":618,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_67333863","line":615,"updated":"2015-07-14 19:05:42.000000000","message":"\".\" at EOL","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b649c8232f334b46096f0c471f5a2b752a0ec2c6","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                    \u0027volume_size\u0027: volume_size, }"},{"line_number":613,"context_line":"            msg \u003d _LW(\"Volume %(volume_path)s virtual size %(virtual_size)d \""},{"line_number":614,"context_line":"                      \"is not equal with size in db %(volume_size)d, \""},{"line_number":615,"context_line":"                      \"reject the backup operation\")"},{"line_number":616,"context_line":"            LOG.warning(msg, data)"},{"line_number":617,"context_line":"            raise exception.BackupOperationError(msg)"},{"line_number":618,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_b9a7060a","line":615,"in_reply_to":"9a41bdd9_67333863","updated":"2015-07-15 08:35:49.000000000","message":"Done","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"aa168f2be1be943304b3f00ea90bb151c64e20c4","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                return {\u0027volume_path\u0027: nbd_device.device,"},{"line_number":632,"context_line":"                        \u0027device\u0027: nbd_device, }"},{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                msg \u003d _LW(\"Allocate nbd for volume (%s) failed\")"},{"line_number":635,"context_line":"                LOG.warning(msg, volume_path)"},{"line_number":636,"context_line":"                raise exception.BackupOperationError(msg)"},{"line_number":637,"context_line":"        return super(RemoteFSDriver, self)._backup_prepare_volume_device("}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_07458cb1","line":634,"updated":"2015-07-14 19:05:42.000000000","message":"\".\" at EOL","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"b649c8232f334b46096f0c471f5a2b752a0ec2c6","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                return {\u0027volume_path\u0027: nbd_device.device,"},{"line_number":632,"context_line":"                        \u0027device\u0027: nbd_device, }"},{"line_number":633,"context_line":"            else:"},{"line_number":634,"context_line":"                msg \u003d _LW(\"Allocate nbd for volume (%s) failed\")"},{"line_number":635,"context_line":"                LOG.warning(msg, volume_path)"},{"line_number":636,"context_line":"                raise exception.BackupOperationError(msg)"},{"line_number":637,"context_line":"        return super(RemoteFSDriver, self)._backup_prepare_volume_device("}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_19b7123b","line":634,"in_reply_to":"9a41bdd9_07458cb1","updated":"2015-07-15 08:35:49.000000000","message":"Done","commit_id":"2cddf09624e83f38e19a97c08e45533905c60338"},{"author":{"_account_id":16793,"name":"Liucheng Jiang","email":"jiangliucheng@huawei.com","username":"Jiangliucheng"},"change_message_id":"1ec636dfd8f531b3379fbee79f6b4c40ca14a413","unresolved":false,"context_lines":[{"line_number":637,"context_line":"                      \"is not equal with size in db %(volume_size)d, \""},{"line_number":638,"context_line":"                      \"reject the backup operation.\")"},{"line_number":639,"context_line":"            LOG.warning(msg, data)"},{"line_number":640,"context_line":"            raise exception.BackupOperationError(msg)"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        # To avoid security issue with auto-detection of file format using"},{"line_number":643,"context_line":"        # qemu-image info. We use volume_admin_metadata to storage correct"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa1b9901_c47858fb","line":640,"updated":"2015-08-24 03:50:58.000000000","message":"1. msg is a format string. exception.BackupOperationError(msg) is not good.\n2. When msg is used in exception and LOG, it\u0027s better to use \u0027_\u0027 instead of \u0027_LW\u0027. see: http://docs.openstack.org/developer/oslo.i18n/guidelines.html.\n3. The next exception in this func shoud be in charge too.","commit_id":"493832b0aafad06d1f7d5ac3048530c617739dba"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"00c14b498560e25b9fdd5a5f4b6e5d6aa70bcb93","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        # key."},{"line_number":647,"context_line":"        # TODO(wanghao) remove the volume_info.file_format if 165393 be merged."},{"line_number":648,"context_line":"        file_format \u003d (volume_admin_metadata.get(\u0027format\u0027) or"},{"line_number":649,"context_line":"                       volume_info.file_format)"},{"line_number":650,"context_line":"        if file_format \u003d\u003d \"qcow2\":"},{"line_number":651,"context_line":"            nbd_device \u003d device.NbdDevice(volume_path)"},{"line_number":652,"context_line":"            if nbd_device.get_dev():"}],"source_content_type":"text/x-python","patch_set":35,"id":"9a8ffd7b_17670ab8","line":649,"updated":"2015-12-02 15:52:40.000000000","message":"Using the detected file format is a security vulnerability, this can\u0027t be done this way.","commit_id":"c6bdcbe9e10e019b92cb54602c0b561d5e0a0a8c"}]}
