)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7ec6cf84131c1e3525cf8cabbaf5db860fb0cbbe","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add missing backup/restore methods to Sheepdog driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The backup tests fails when running tempest."},{"line_number":10,"context_line":"The Sheepdog driver has not implemented backup/restore methods yet."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I8f6a82b046cfd1268092cc79111b9faedafe3c8b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a41bdd9_3ca8ba8c","line":9,"updated":"2015-07-15 11:59:29.000000000","message":"fails - \u003e fail","commit_id":"1b04216b936c5742eeb130a241dd50ee050e8d26"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Teruaki Ishizaki \u003cishizaki.teruaki@lab.ntt.co.jp\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-30 13:00:36 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add missing backup/restore methods to Sheepdog driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The backup tests fail when running tempest."},{"line_number":10,"context_line":"The Sheepdog driver has not implemented backup/restore methods yet."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a50d1a3_3a457f42","line":7,"updated":"2015-07-31 13:18:26.000000000","message":"The first line should be limited to 50 characters.\n\nref: https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"}],"cinder/tests/test_sheepdog.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e6eea64a2bc13832ec4827781cad2d1d6752c092","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        args \u003d (cmd, data)"},{"line_number":103,"context_line":"        self.assertRaises(exception.VolumeDriverException,"},{"line_number":104,"context_line":"                          self.vdi_wrapper._execute,"},{"line_number":105,"context_line":"                          args)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_read_vdi(self):"},{"line_number":108,"context_line":"        self.vdi_wrapper.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_7c2ab37f","line":105,"updated":"2015-03-10 19:07:46.000000000","message":"Should it be *args ?","commit_id":"289b471186d3bf6a6e01257450dacaead2ac67bc"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e6eea64a2bc13832ec4827781cad2d1d6752c092","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        call_args, call_kwargs \u003d fake_backup_service.backup.call_args"},{"line_number":273,"context_line":"        call_backup, call_sheepdog_fd \u003d call_args"},{"line_number":274,"context_line":"        self.assertEqual(fake_backup, call_backup)"},{"line_number":275,"context_line":"        self.assertIsInstance(call_sheepdog_fd, sheepdog.SheepdogIOWrapper)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def test_restore_backup(self):"},{"line_number":278,"context_line":"        fake_context \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_9c1f675b","line":275,"updated":"2015-03-10 19:07:46.000000000","message":"Should also check that snapshot creation and deletion are called.","commit_id":"289b471186d3bf6a6e01257450dacaead2ac67bc"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"03486de8169bebcaa04a3ba5477b27c33e9fc207","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        self.driver.backup_volume("},{"line_number":274,"context_line":"            fake_context, fake_backup, fake_backup_service)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        # check that temporary snapshot was created and deleted."},{"line_number":277,"context_line":"        self.assertEqual(fake_create_snapshot.call_args,"},{"line_number":278,"context_line":"                         fake_delete_snapshot.call_args)"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_0cf7b28d","line":276,"updated":"2015-03-11 08:33:32.000000000","message":"If these methods are not called even once they will still have equal call_args.\nYou should also check how one of them is called. For example using mock\u0027s assert_called_once_with or at the very least check that it\u0027s called once: self.assertEqual(1, fake_create_snapshot.call_count)","commit_id":"67b86fc700635389fdbdd2cf6e3fbbdd54647f64"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"8c45e2cf03dff2ce45717d709e219873f5775b10","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        self.driver.backup_volume("},{"line_number":274,"context_line":"            fake_context, fake_backup, fake_backup_service)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        # check that temporary snapshot was created and deleted."},{"line_number":277,"context_line":"        self.assertEqual(fake_create_snapshot.call_args,"},{"line_number":278,"context_line":"                         fake_delete_snapshot.call_args)"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_6c8f4ecd","line":276,"in_reply_to":"9a80dd14_0cf7b28d","updated":"2015-03-11 08:43:43.000000000","message":"Thanks! I quite agree.","commit_id":"67b86fc700635389fdbdd2cf6e3fbbdd54647f64"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"8b072fd701c0eb7a1dbd8c80b16370e3a5c287be","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_init(self):"},{"line_number":76,"context_line":"        self.assertEqual(self.volume[\u0027name\u0027], self.vdi_wrapper._vdiname)"},{"line_number":77,"context_line":"        self.assertEqual(None, self.vdi_wrapper._snapshot_name)"},{"line_number":78,"context_line":"        self.assertEqual(0, self.vdi_wrapper._offset)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        self.assertEqual(self.snapshot_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_dbc82f77","line":77,"updated":"2015-04-07 06:31:15.000000000","message":"self.assertIsNone(self.vdi_wrapper._snapshot_name)","commit_id":"4f492805726ecb85322c49514d13802745e7ae4c"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"8b072fd701c0eb7a1dbd8c80b16370e3a5c287be","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        call_args, call_kwargs \u003d fake_backup_service.restore.call_args"},{"line_number":298,"context_line":"        call_backup, call_volume_id, call_sheepdog_fd \u003d call_args"},{"line_number":299,"context_line":"        self.assertEqual(fake_backup, call_backup)"},{"line_number":300,"context_line":"        self.assertEqual(call_volume_id, fake_volume[\u0027id\u0027])"},{"line_number":301,"context_line":"        self.assertIsInstance(call_sheepdog_fd, sheepdog.SheepdogIOWrapper)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_5b82df01","line":300,"updated":"2015-04-07 06:31:15.000000000","message":"Order is expected, observed.","commit_id":"4f492805726ecb85322c49514d13802745e7ae4c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5449320262d40cb7612fc35a21cbec24642ae4af","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            self.volume[\u0027name\u0027], 0,"},{"line_number":129,"context_line":"            process_input\u003dNone)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def test_seek(self):"},{"line_number":132,"context_line":"        self.vdi_wrapper.seek(12345)"},{"line_number":133,"context_line":"        self.assertEqual(12345, self.vdi_wrapper.tell())"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_addd2344","line":131,"updated":"2015-04-07 13:12:06.000000000","message":"No test for negative seek from a positive offset or negative resulting offset?","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5449320262d40cb7612fc35a21cbec24642ae4af","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def test_flush(self):"},{"line_number":136,"context_line":"        # flush does noting."},{"line_number":137,"context_line":"        self.vdi_wrapper.flush()"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def test_fileno(self):"},{"line_number":140,"context_line":"        self.assertRaises(IOError, self.vdi_wrapper.fileno)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_6de83be3","line":137,"updated":"2015-04-07 13:12:06.000000000","message":"Then you should check that self.execute.called is False","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5449320262d40cb7612fc35a21cbec24642ae4af","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                    \"%sG\" % fake_vol[\u0027size\u0027]]"},{"line_number":376,"context_line":"            mock_exe.assert_called_once_with(*args)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def test_backup_volume(self):"},{"line_number":379,"context_line":"        fake_context \u003d {}"},{"line_number":380,"context_line":"        fake_backup \u003d {\u0027volume_id\u0027: \u00272926efe0-24ab-45b7-95e1-ff66e0646a33\u0027}"},{"line_number":381,"context_line":"        fake_backup_service \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_4de57707","line":378,"updated":"2015-04-07 13:12:06.000000000","message":"Maybe add a test to confirm that the snapshot gets deleted even if there\u0027s an error on the backup. (I know it does, but a test would be fine to avoid regressions)","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"45b3d7563223e186202943fd1a1dd5287259d377","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        self.assertEqual(fake_backup, call_backup)"},{"line_number":413,"context_line":"        self.assertIsInstance(call_sheepdog_fd, sheepdog.SheepdogIOWrapper)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"        # check that the snapshot gets deleted in case of a backup error."},{"line_number":416,"context_line":"        class BackupError(Exception):"},{"line_number":417,"context_line":"            pass"},{"line_number":418,"context_line":"        backup_failure \u003d mock.Mock(side_effect\u003dBackupError)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_3e4a33c6","line":415,"updated":"2015-04-08 08:01:28.000000000","message":"It would be better to create a new specific test for this one.\nIf you prefer to keep it here you should reset mocks so that in the next asserts don\u0027t have to take into account above statements. (Ex: after reset call_counts below would be equal to 1 and not 2).","commit_id":"b7147d45d750c4f577b01177995b2aa92ba187a2"}],"cinder/tests/unit/test_sheepdog.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"b6161def0f10f9f766c5f860520316289e7aa4ca","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    @mock.patch.object(sheepdog.SheepdogDriver, \u0027create_snapshot\u0027)"},{"line_number":473,"context_line":"    @mock.patch.object(backup_driver, \u0027BackupDriver\u0027)"},{"line_number":474,"context_line":"    @mock.patch.object(sheepdog.SheepdogDriver, \u0027delete_snapshot\u0027)"},{"line_number":475,"context_line":"    def test_backup_volume(self, fake_delete_snapshot, fake_backup_service,"},{"line_number":476,"context_line":"                           fake_create_snapshot, fake_execute,"},{"line_number":477,"context_line":"                           fake_volume_get):"},{"line_number":478,"context_line":"        fake_context \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_886beaf0","line":475,"updated":"2015-07-22 10:20:50.000000000","message":"This should be broken up into separate test cases as you did for https://review.openstack.org/#/c/194532.","commit_id":"e42dd3ac2a617ecfc0606bad4ed0187499abe157"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"8c0cd9c854458058f766bfa3a13a91c32c059418","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    @mock.patch.object(sheepdog.SheepdogDriver, \u0027create_snapshot\u0027)"},{"line_number":473,"context_line":"    @mock.patch.object(backup_driver, \u0027BackupDriver\u0027)"},{"line_number":474,"context_line":"    @mock.patch.object(sheepdog.SheepdogDriver, \u0027delete_snapshot\u0027)"},{"line_number":475,"context_line":"    def test_backup_volume(self, fake_delete_snapshot, fake_backup_service,"},{"line_number":476,"context_line":"                           fake_create_snapshot, fake_execute,"},{"line_number":477,"context_line":"                           fake_volume_get):"},{"line_number":478,"context_line":"        fake_context \u003d {}"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_90c30889","line":475,"in_reply_to":"3a50d1a3_886beaf0","updated":"2015-07-22 12:23:15.000000000","message":"OK, I\u0027ll split test cases.","commit_id":"e42dd3ac2a617ecfc0606bad4ed0187499abe157"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3b2eac75990cea481b994dc2f83cf28f27e35df0","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            self.volume, self.snapshot_name)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self.execute \u003d mock.MagicMock()"},{"line_number":76,"context_line":"        self.stubs.Set(processutils, \u0027execute\u0027, self.execute)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def test_init(self):"},{"line_number":79,"context_line":"        self.assertEqual(self.volume[\u0027name\u0027], self.vdi_wrapper._vdiname)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_792360bf","line":76,"updated":"2015-07-30 06:02:13.000000000","message":"use self.mock_object.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def test_validate(self):"},{"line_number":87,"context_line":"        self.vdi_wrapper._valid \u003d False"},{"line_number":88,"context_line":"        self.vdi_wrapper._validate()"},{"line_number":89,"context_line":"        self.assertEqual(True, self.vdi_wrapper._valid)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self.vdi_wrapper._valid \u003d True"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_8ff2579a","line":89,"updated":"2015-07-31 13:18:26.000000000","message":"Use self.assertTrue instead.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    def test_invalidate(self):"},{"line_number":94,"context_line":"        self.vdi_wrapper._valid \u003d True"},{"line_number":95,"context_line":"        self.vdi_wrapper._invalidate()"},{"line_number":96,"context_line":"        self.assertEqual(False, self.vdi_wrapper._valid)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_is_valid(self):"},{"line_number":99,"context_line":"        self.vdi_wrapper._valid \u003d True"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_0f14079d","line":96,"updated":"2015-07-31 13:18:26.000000000","message":"Use self.assertFalse instead.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3b2eac75990cea481b994dc2f83cf28f27e35df0","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        cmd \u003d (\u0027cmd1\u0027, \u0027arg1\u0027)"},{"line_number":122,"context_line":"        data \u003d \u0027data1\u0027"},{"line_number":123,"context_line":"        self.stubs.Set(processutils, \u0027execute\u0027,"},{"line_number":124,"context_line":"                       mock.MagicMock(side_effect\u003dOSError))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        args \u003d (cmd, data)"},{"line_number":127,"context_line":"        self.assertRaises(exception.VolumeDriverException,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_592a2492","line":124,"updated":"2015-07-30 06:02:13.000000000","message":"use self.mock_object or mock.patch.object.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        cmd \u003d (\u0027cmd1\u0027, \u0027arg1\u0027)"},{"line_number":122,"context_line":"        data \u003d \u0027data1\u0027"},{"line_number":123,"context_line":"        self.stubs.Set(processutils, \u0027execute\u0027,"},{"line_number":124,"context_line":"                       mock.MagicMock(side_effect\u003dOSError))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        args \u003d (cmd, data)"},{"line_number":127,"context_line":"        self.assertRaises(exception.VolumeDriverException,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_0f62c73d","line":124,"in_reply_to":"3a50d1a3_592a2492","updated":"2015-07-31 13:18:26.000000000","message":"+1","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        self.vdi_wrapper._validate()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def test_flush(self):"},{"line_number":184,"context_line":"        # flush does noting."},{"line_number":185,"context_line":"        self.vdi_wrapper.flush()"},{"line_number":186,"context_line":"        self.assertFalse(self.execute.called)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_735108d8","line":184,"updated":"2015-08-04 13:50:18.000000000","message":"s/noting/nothing/","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"}],"cinder/volume/drivers/sheepdog.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e6eea64a2bc13832ec4827781cad2d1d6752c092","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        temp_snapshot \u003d {\u0027volume_name\u0027: volume[\u0027name\u0027],"},{"line_number":274,"context_line":"                         \u0027name\u0027: \u0027tmp-snap-%s\u0027 % volume[\u0027name\u0027]}"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        self.create_snapshot(temp_snapshot)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        try:"},{"line_number":279,"context_line":"            sheepdog_fd \u003d SheepdogIOWrapper(volume, temp_snapshot[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_bc242bb0","line":276,"updated":"2015-03-10 19:07:46.000000000","message":"Should we try this and raise VolumeBackendAPIException in case of a processutils.ProcessExecutionError exception?","commit_id":"289b471186d3bf6a6e01257450dacaead2ac67bc"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"708d38e09b3b0575b2b80611aa81b6c68424d0f3","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":55,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":56,"context_line":"            msg \u003d _(\u0027Sheepdog I/O Error\u0027)"},{"line_number":57,"context_line":"            raise exception.VolumeDriverException(msg)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def read(self, length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_42f22f9b","line":56,"updated":"2015-03-11 21:16:09.000000000","message":"Generally it is good practice to include what the processutils error was, or at least what the commend being attempted to aid debug.","commit_id":"d9f73389b2d750b2c655f9997adc9893774ef808"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"708d38e09b3b0575b2b80611aa81b6c68424d0f3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            # SEEK_END or 2 - end of the stream; offset is usually negative"},{"line_number":87,"context_line":"            # TODO(yamada-h): Support SEEK_END"},{"line_number":88,"context_line":"            raise IOError(_(\"Invalid argument - whence\u003d%s not supported\") %"},{"line_number":89,"context_line":"                          (whence))"},{"line_number":90,"context_line":"        else:"},{"line_number":91,"context_line":"            raise IOError(_(\"Invalid argument - whence\u003d%s not supported\") %"},{"line_number":92,"context_line":"                          (whence))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_02dbd7ed","line":89,"updated":"2015-03-11 21:16:09.000000000","message":"Do we really need the eli and else here?  Just leave the todo perhaps?","commit_id":"d9f73389b2d750b2c655f9997adc9893774ef808"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"708d38e09b3b0575b2b80611aa81b6c68424d0f3","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                          (whence))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        if (new_offset \u003c 0):"},{"line_number":95,"context_line":"            raise IOError(_(\"Invalid argument\"))"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self._offset \u003d new_offset"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_62e01397","line":95,"updated":"2015-03-11 21:16:09.000000000","message":"Suggest including that this happened on a seek.  This doesn\u0027t seem so helpful without some context.","commit_id":"d9f73389b2d750b2c655f9997adc9893774ef808"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"708d38e09b3b0575b2b80611aa81b6c68424d0f3","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":278,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":279,"context_line":"            msg \u003d _(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":280,"context_line":"                    \u0027volume %s\u0027) % volume[\u0027id\u0027]"},{"line_number":281,"context_line":"            LOG.error(msg)"},{"line_number":282,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_82bc276e","line":280,"updated":"2015-03-11 21:16:09.000000000","message":"Again here, it would be helpful to know what error was encountered.","commit_id":"d9f73389b2d750b2c655f9997adc9893774ef808"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"8b072fd701c0eb7a1dbd8c80b16370e3a5c287be","unresolved":false,"context_lines":[{"line_number":111,"context_line":"class SheepdogDriver(driver.VolumeDriver):"},{"line_number":112,"context_line":"    \"\"\"Executes commands relating to Sheepdog Volumes.\"\"\""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    VERSION \u003d \"1.0.0\""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":117,"context_line":"        super(SheepdogDriver, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_9bb627db","line":114,"updated":"2015-04-07 06:31:15.000000000","message":"Do we need to update the version?","commit_id":"4f492805726ecb85322c49514d13802745e7ae4c"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"0e71e17a16056127a6c53cb96c67cc83078b2e94","unresolved":false,"context_lines":[{"line_number":111,"context_line":"class SheepdogDriver(driver.VolumeDriver):"},{"line_number":112,"context_line":"    \"\"\"Executes commands relating to Sheepdog Volumes.\"\"\""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    VERSION \u003d \"1.0.0\""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":117,"context_line":"        super(SheepdogDriver, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_15ae602e","line":114,"in_reply_to":"9aa53dc9_9bb627db","updated":"2015-04-07 09:37:25.000000000","message":"I don\u0027t know when we should update the version. Should it be 1.1.0?","commit_id":"4f492805726ecb85322c49514d13802745e7ae4c"},{"author":{"_account_id":11676,"name":"wuyuting","email":"wytdahu@gmail.com","username":"wuyuting"},"change_message_id":"8d441a4c0849adc07048a14a1c963de69c4490f1","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        try:"},{"line_number":274,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":275,"context_line":"        except (processutils.ProcessExecutionError, OSError) as exc:"},{"line_number":276,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":277,"context_line":"                     \u0027volume %(volume_id)s, error message was %(err_msg)s\u0027)"},{"line_number":278,"context_line":"                   % {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027err_msg\u0027: exc.message})"},{"line_number":279,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa963961_3ea4ad55","line":276,"updated":"2015-03-27 07:08:25.000000000","message":"_LE should replace _","commit_id":"4f492805726ecb85322c49514d13802745e7ae4c"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"73d824650450919bb52d72140b17991fcc4249c3","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        try:"},{"line_number":274,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":275,"context_line":"        except (processutils.ProcessExecutionError, OSError) as exc:"},{"line_number":276,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":277,"context_line":"                     \u0027volume %(volume_id)s, error message was %(err_msg)s\u0027)"},{"line_number":278,"context_line":"                   % {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027err_msg\u0027: exc.message})"},{"line_number":279,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9b358b_427ad0f2","line":276,"in_reply_to":"fa963961_3ea4ad55","updated":"2015-03-31 02:52:28.000000000","message":"This is used for both logging and the VolumeBackendAPIException, so _() is the correct marker to use.","commit_id":"4f492805726ecb85322c49514d13802745e7ae4c"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"82ea3219ffc2731bbc5a6b7242622d2dc16358bf","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class SheepdogIOWrapper(io.RawIOBase):"},{"line_number":42,"context_line":"    \u0027File-like object with Sheepdog backend\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, volume, snapshot_name\u003dNone):"},{"line_number":45,"context_line":"        self._vdiname \u003d volume[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_b0822251","line":42,"updated":"2015-04-07 09:40:35.000000000","message":"$ ./run_tests.sh -8\nRunning flake8 on cinder/tests/test_sheepdog.py cinder/volume/drivers/sheepdog.py \n./cinder/volume/drivers/sheepdog.py:42:2: H402  one line docstring needs punctuation.","commit_id":"bec35cdd6a0e60ff762d37693f5c3880b706ac65"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"0f6442fc25bcf6f9e9f52cc43a3f03d032014807","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class SheepdogIOWrapper(io.RawIOBase):"},{"line_number":42,"context_line":"    \u0027File-like object with Sheepdog backend\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, volume, snapshot_name\u003dNone):"},{"line_number":45,"context_line":"        self._vdiname \u003d volume[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_50463624","line":42,"updated":"2015-04-07 09:42:18.000000000","message":"Should be \"\"\" \"\"\" for docstrings, please","commit_id":"bec35cdd6a0e60ff762d37693f5c3880b706ac65"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"fe9c9a91bce98dc3447c40704f37059babe4fb53","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class SheepdogIOWrapper(io.RawIOBase):"},{"line_number":42,"context_line":"    \u0027File-like object with Sheepdog backend\u0027"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, volume, snapshot_name\u003dNone):"},{"line_number":45,"context_line":"        self._vdiname \u003d volume[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9aa53dc9_a78d497d","line":42,"in_reply_to":"9aa53dc9_50463624","updated":"2015-04-07 10:15:49.000000000","message":"OK. I misunderstood flake8 output.","commit_id":"bec35cdd6a0e60ff762d37693f5c3880b706ac65"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5449320262d40cb7612fc35a21cbec24642ae4af","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        cmd \u003d [\u0027dog\u0027, \u0027vdi\u0027, \u0027read\u0027]"},{"line_number":61,"context_line":"        if self._snapshot_name:"},{"line_number":62,"context_line":"            cmd.extend([\u0027-s\u0027, self._snapshot_name])"},{"line_number":63,"context_line":"        cmd.extend([self._vdiname, self._offset])"},{"line_number":64,"context_line":"        if length:"},{"line_number":65,"context_line":"            cmd.extend([length])"},{"line_number":66,"context_line":"        data \u003d self._execute(cmd)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_ad0f63e0","line":63,"updated":"2015-04-07 13:12:06.000000000","message":"We could use tuples instead of lists in lines 62 and 63 since they are \"cheaper\".\nEx: cmd.extend((\u0027-s\u0027, self._snapshot_name))","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5449320262d40cb7612fc35a21cbec24642ae4af","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            cmd.extend([\u0027-s\u0027, self._snapshot_name])"},{"line_number":63,"context_line":"        cmd.extend([self._vdiname, self._offset])"},{"line_number":64,"context_line":"        if length:"},{"line_number":65,"context_line":"            cmd.extend([length])"},{"line_number":66,"context_line":"        data \u003d self._execute(cmd)"},{"line_number":67,"context_line":"        self._inc_offset(len(data))"},{"line_number":68,"context_line":"        return data"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_ed2c4b4c","line":65,"updated":"2015-04-07 13:12:06.000000000","message":"`cmd.append`","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7c14204210ce1e1c4f946c9c96d089fe3d423a29","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            cmd.extend([\u0027-s\u0027, self._snapshot_name])"},{"line_number":63,"context_line":"        cmd.extend([self._vdiname, self._offset])"},{"line_number":64,"context_line":"        if length:"},{"line_number":65,"context_line":"            cmd.extend([length])"},{"line_number":66,"context_line":"        data \u003d self._execute(cmd)"},{"line_number":67,"context_line":"        self._inc_offset(len(data))"},{"line_number":68,"context_line":"        return data"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_fbad1489","line":65,"in_reply_to":"9aa53dc9_ed2c4b4c","updated":"2015-04-07 17:22:16.000000000","message":"extend is correct here:\n\u003e\u003e\u003e cmd \u003d[\u0027a\u0027,\u0027b\u0027,\u0027c\u0027]\n\u003e\u003e\u003e length\u003d\u0027de\u0027\n\u003e\u003e\u003e cmd.extend([length])\n\u003e\u003e\u003e cmd\n[\u0027a\u0027, \u0027b\u0027, \u0027c\u0027, \u0027de\u0027]\n\u003e\u003e\u003e cmd.append([length])\n\u003e\u003e\u003e cmd\n[\u0027a\u0027, \u0027b\u0027, \u0027c\u0027, \u0027de\u0027, [\u0027de\u0027]]","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e05d39fb6569ecaa22c4b06299c038f2144af3fe","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            cmd.extend([\u0027-s\u0027, self._snapshot_name])"},{"line_number":63,"context_line":"        cmd.extend([self._vdiname, self._offset])"},{"line_number":64,"context_line":"        if length:"},{"line_number":65,"context_line":"            cmd.extend([length])"},{"line_number":66,"context_line":"        data \u003d self._execute(cmd)"},{"line_number":67,"context_line":"        self._inc_offset(len(data))"},{"line_number":68,"context_line":"        return data"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_e0031b41","line":65,"in_reply_to":"9aa53dc9_fbad1489","updated":"2015-04-07 21:06:37.000000000","message":"When I said to use append it was implied that it should be:\n`cmd.append(lenght)`\nBecause that\u0027s what the method is for, to append 1 element to a list.\nIf we use extend this way, we are constructing a linked list just for 1 element and then calling a method to join linked lists instead of just adding an element at the end of the list like append does.","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5449320262d40cb7612fc35a21cbec24642ae4af","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            raise IOError(_(\"Invalid argument - whence\u003d%s not supported\") %"},{"line_number":89,"context_line":"                          (whence))"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if (new_offset \u003c 0):"},{"line_number":92,"context_line":"            raise IOError(_(\"Invalid argument - negative seek offset\"))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self._offset \u003d new_offset"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_8d2b7f30","line":91,"updated":"2015-04-07 13:12:06.000000000","message":"No need for parenthesis","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7c14204210ce1e1c4f946c9c96d089fe3d423a29","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":349,"context_line":"                     \u0027volume %(volume_id)s, error message was %(err_msg)s\u0027)"},{"line_number":350,"context_line":"                   % {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027err_msg\u0027: exc.message})"},{"line_number":351,"context_line":"            LOG.error(msg)"},{"line_number":352,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_3b401ca5","line":351,"updated":"2015-04-07 17:22:16.000000000","message":"May be LOG.exception will be better in this case","commit_id":"5324712cd9a48b7b5e6a80a53d12452cf1bd925a"},{"author":{"_account_id":124,"name":"Kazutaka Morita","email":"morita.kazutaka@gmail.com","username":"morita-kazutaka"},"change_message_id":"699ef31dc9cc1e7944bd8651a898c711cb96c7ba","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":55,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":56,"context_line":"            msg \u003d _(\u0027Sheepdog I/O Error, command was \"%s\"\u0027) % \u0027 \u0027.join(cmd)"},{"line_number":57,"context_line":"            raise exception.VolumeDriverException(msg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_159cc45b","line":54,"updated":"2015-04-09 03:21:26.000000000","message":"cinder-backup consumes 100% CPU while waiting for the command completion.  That\u0027s the reason Sheepdog CI fails occasionally because of timeout.\n\nWe shouldn\u0027t call processutils.execute here?  Can anybody shed light on this?","commit_id":"b7147d45d750c4f577b01177995b2aa92ba187a2"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"8e31e9a1196b05890ff02f5f88aebca5cb4295d2","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":55,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":56,"context_line":"            msg \u003d _(\u0027Sheepdog I/O Error, command was \"%s\"\u0027) % \u0027 \u0027.join(cmd)"},{"line_number":57,"context_line":"            raise exception.VolumeDriverException(msg)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def read(self, length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_9a9c8bc1","line":56,"updated":"2015-04-08 19:28:53.000000000","message":"suggest \u0027command was: \"%s\" \u0027","commit_id":"b7147d45d750c4f577b01177995b2aa92ba187a2"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"8e31e9a1196b05890ff02f5f88aebca5cb4295d2","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":347,"context_line":"        except (processutils.ProcessExecutionError, OSError) as exc:"},{"line_number":348,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":349,"context_line":"                     \u0027volume %(volume_id)s, error message was %(err_msg)s\u0027)"},{"line_number":350,"context_line":"                   % {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027err_msg\u0027: exc.message})"},{"line_number":351,"context_line":"            LOG.exception(msg)"},{"line_number":352,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_5a6f23c5","line":349,"updated":"2015-04-08 19:28:53.000000000","message":"suggest \u0027error message was: %(err_msg)s\u0027","commit_id":"b7147d45d750c4f577b01177995b2aa92ba187a2"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"aca0a31429363f3fd0be8e895284a3feffa6d21c","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            # XXX(yamada-h):"},{"line_number":55,"context_line":"            # processutils.execute causes busy waiting under eventlet."},{"line_number":56,"context_line":"            # To avoid wasting CPU resources, it should not be used for"},{"line_number":57,"context_line":"            # the command which takes long time to execute."}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_6e7683d8","line":54,"updated":"2015-04-09 18:01:15.000000000","message":"I understand why you need to do this, I just don\u0027t know if this is something acceptable to do in the code.","commit_id":"0bbbdfc6ba54f3df96bf8d912ca8dae07589d9c9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"aca0a31429363f3fd0be8e895284a3feffa6d21c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            # the command which takes long time to execute."},{"line_number":58,"context_line":"            # For workaround, we replace the eventlet-patched subprocess module"},{"line_number":59,"context_line":"            # with the original one while only executing a read/write command."},{"line_number":60,"context_line":"            import eventlet"},{"line_number":61,"context_line":"            processutils.subprocess \u003d eventlet.patcher.original(\u0027subprocess\u0027)"},{"line_number":62,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":63,"context_line":"        except (processutils.ProcessExecutionError, OSError):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_4ee3bfa4","line":60,"updated":"2015-04-09 18:01:15.000000000","message":"Eventlet many not be in use in oslo: https://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/processutils.py#L35","commit_id":"0bbbdfc6ba54f3df96bf8d912ca8dae07589d9c9"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"502b31ad67ffdc2518a4ef87a455a2b1f4ef0c3b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            # the command which takes long time to execute."},{"line_number":58,"context_line":"            # For workaround, we replace the eventlet-patched subprocess module"},{"line_number":59,"context_line":"            # with the original one while only executing a read/write command."},{"line_number":60,"context_line":"            import eventlet"},{"line_number":61,"context_line":"            processutils.subprocess \u003d eventlet.patcher.original(\u0027subprocess\u0027)"},{"line_number":62,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":63,"context_line":"        except (processutils.ProcessExecutionError, OSError):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5aa745d1_15c1dfe4","line":60,"in_reply_to":"9aa53dc9_4ee3bfa4","updated":"2015-04-16 04:57:53.000000000","message":"Right. This should be like:\n\ntmp \u003d processutils.subprocess\nprocessutils.subprocess \u003d eventlet.patcher.original(\u0027subprocess\u0027)\n(command execution)\nprocessutils.subprocess \u003d tmp\n\nI will fix it.","commit_id":"0bbbdfc6ba54f3df96bf8d912ca8dae07589d9c9"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"d54fd2e81c05fdecfb40712ce999e3dfd3f6e419","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            processutils.subprocess \u003d eventlet.green.subprocess"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def read(self, length\u003dNone):"},{"line_number":70,"context_line":"        cmd \u003d [\u0027dog\u0027, \u0027vdi\u0027, \u0027read\u0027]"},{"line_number":71,"context_line":"        if self._snapshot_name:"},{"line_number":72,"context_line":"            cmd.extend((\u0027-s\u0027, self._snapshot_name))"},{"line_number":73,"context_line":"        cmd.extend((self._vdiname, self._offset))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ab451fb_c4c73944","line":70,"updated":"2015-04-17 13:40:59.000000000","message":"You use list here and tuple in lines #71, #82. Please, use unified type over the code","commit_id":"0bbbdfc6ba54f3df96bf8d912ca8dae07589d9c9"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"76d8c0e78956b98240cfc49606c2112f7ce86595","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            processutils.subprocess \u003d eventlet.green.subprocess"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def read(self, length\u003dNone):"},{"line_number":70,"context_line":"        cmd \u003d [\u0027dog\u0027, \u0027vdi\u0027, \u0027read\u0027]"},{"line_number":71,"context_line":"        if self._snapshot_name:"},{"line_number":72,"context_line":"            cmd.extend((\u0027-s\u0027, self._snapshot_name))"},{"line_number":73,"context_line":"        cmd.extend((self._vdiname, self._offset))"}],"source_content_type":"text/x-python","patch_set":8,"id":"dac4157f_db17eceb","line":70,"in_reply_to":"3ab451fb_1d11e8ac","updated":"2015-04-21 05:09:16.000000000","message":"I think either is fine.","commit_id":"0bbbdfc6ba54f3df96bf8d912ca8dae07589d9c9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6a019e1df9ca59767606ec36086f50042ccb475a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            processutils.subprocess \u003d eventlet.green.subprocess"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def read(self, length\u003dNone):"},{"line_number":70,"context_line":"        cmd \u003d [\u0027dog\u0027, \u0027vdi\u0027, \u0027read\u0027]"},{"line_number":71,"context_line":"        if self._snapshot_name:"},{"line_number":72,"context_line":"            cmd.extend((\u0027-s\u0027, self._snapshot_name))"},{"line_number":73,"context_line":"        cmd.extend((self._vdiname, self._offset))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ab451fb_1d11e8ac","line":70,"in_reply_to":"3ab451fb_c4c73944","updated":"2015-04-17 18:29:39.000000000","message":"Ivan, a tuple is used where data is immutable and a list where it is mutable, like in this case when it is extended when there is a snapshot name.\nTherefore it is correct to not always use lists.","commit_id":"0bbbdfc6ba54f3df96bf8d912ca8dae07589d9c9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5a77837d082a45bfbc2ce0f5e683c0f5b248d46d","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            # XXX(yamada-h):"},{"line_number":56,"context_line":"            # processutils.execute causes busy waiting under eventlet."},{"line_number":57,"context_line":"            # To avoid wasting CPU resources, it should not be used for"},{"line_number":58,"context_line":"            # the command which takes long time to execute."}],"source_content_type":"text/x-python","patch_set":9,"id":"bab921fb_3425f4aa","line":55,"updated":"2015-04-23 10:42:05.000000000","message":"Like I mentioned before I don\u0027t like this solution much, maybe it\u0027s better to use a separate thread like it\u0027s done here: https://review.openstack.org/#/c/175555/7/cinder/volume/drivers/rbd.py","commit_id":"d6ccb12f6f17fd4c95da3a107696310be15a4057"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"aeaa705c378c2c68ec61db813d04b4b3eef38574","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            # XXX(yamada-h):"},{"line_number":56,"context_line":"            # processutils.execute causes busy waiting under eventlet."},{"line_number":57,"context_line":"            # To avoid wasting CPU resources, it should not be used for"},{"line_number":58,"context_line":"            # the command which takes long time to execute."}],"source_content_type":"text/x-python","patch_set":9,"id":"7ad32947_15e8b57b","line":55,"in_reply_to":"bab921fb_3425f4aa","updated":"2015-04-28 07:56:47.000000000","message":"I think a separate thread doesn\u0027t resolve this problem. The problem isn\u0027t that execute blocks the thread, but wastes CPU resources. It will happen in a separate thread.\n\nThe essence of this problem is described in this ticket.\nhttps://bugs.launchpad.net/oslo.concurrency/+bug/1444899","commit_id":"d6ccb12f6f17fd4c95da3a107696310be15a4057"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"7211c14ea1935f90d588caf872ebf77a0a590101","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                         \u0027name\u0027: \u0027tmp-snap-%s\u0027 % volume[\u0027name\u0027]}"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        try:"},{"line_number":377,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":378,"context_line":"        except (processutils.ProcessExecutionError, OSError) as exc:"},{"line_number":379,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":380,"context_line":"                     \u0027volume %(volume_id)s, error message was: %(err_msg)s\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ad32947_fdad1f32","line":377,"updated":"2015-04-28 09:24:21.000000000","message":"Do we loose track of a snapshot here if the service restarts? Looks like it. I think other drivers that do a snapshot suffer from the same problem... probably with a low priority bug to track it, somebody might come up with a good idea for how to fix it...","commit_id":"d6ccb12f6f17fd4c95da3a107696310be15a4057"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"08be991b541e79dcce1e85bade1dd29708cc263f","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                         \u0027name\u0027: \u0027tmp-snap-%s\u0027 % volume[\u0027name\u0027]}"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        try:"},{"line_number":377,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":378,"context_line":"        except (processutils.ProcessExecutionError, OSError) as exc:"},{"line_number":379,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":380,"context_line":"                     \u0027volume %(volume_id)s, error message was: %(err_msg)s\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_e3eeb320","line":377,"in_reply_to":"7ad32947_fdad1f32","updated":"2015-06-11 12:56:21.000000000","message":"I think at least we can add a timestamp to the temp_snapshot name. So that system admin can manually find the long-time-no-use ones and clean them.","commit_id":"d6ccb12f6f17fd4c95da3a107696310be15a4057"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"ee38b23f679f5f1a210fbbf522716743d25eedb3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            import eventlet"},{"line_number":62,"context_line":"            _processutils_subprocess \u003d processutils.subprocess"},{"line_number":63,"context_line":"            processutils.subprocess \u003d eventlet.patcher.original(\u0027subprocess\u0027)"},{"line_number":64,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":65,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":66,"context_line":"            msg \u003d _(\u0027Sheepdog I/O Error, command was: \"%s\"\u0027) % \u0027 \u0027.join(cmd)"},{"line_number":67,"context_line":"            raise exception.VolumeDriverException(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_5158b356","line":64,"updated":"2015-06-29 09:59:12.000000000","message":"It doesn\u0027t feel right to have this reverse monkey patch inside\na particular device\u0027s driver.\n\nThe issue you cite in\nhttps://bugs.launchpad.net/oslo.concurrency/+bug/1444899\nwould seem to be quite general, as you illustrate it with the\n\u0027cat\u0027 command.\n\nSo this makes me wonder if we have the same issue with\nthe generic volume driver method which you override - the\nmethod that almost all other volume drivers are using.\n\nAt\nhttps://github.com/openstack/cinder/blob/master/cinder/volume/driver.py#L766\nwe see invocation of the backup_service with the backup\nobject and a file descriptor for the volume to be backed up,\nalmost identical to what you do below at line 387.\n\nWould you expect the generic driver backup_volume() method\nto have this busy-waiting issue as well, or is there something\nabout the Sheepdog driver that is special in this regard?","commit_id":"2ce1466e02f5772fd7f5f92979fe67ea0d81f388"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"84c6a36b0532aa4f104e0184d2c5ad955d423223","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            import eventlet"},{"line_number":62,"context_line":"            _processutils_subprocess \u003d processutils.subprocess"},{"line_number":63,"context_line":"            processutils.subprocess \u003d eventlet.patcher.original(\u0027subprocess\u0027)"},{"line_number":64,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":65,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":66,"context_line":"            msg \u003d _(\u0027Sheepdog I/O Error, command was: \"%s\"\u0027) % \u0027 \u0027.join(cmd)"},{"line_number":67,"context_line":"            raise exception.VolumeDriverException(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_1d1bf973","line":64,"in_reply_to":"ba3cc151_5158b356","updated":"2015-06-30 02:22:14.000000000","message":"I think this happens when executed command has large stdin. Generic method doesn\u0027t execute command but open the targeted volume file directly, so it doesn\u0027t have same problem.\nOther driver, ceph for example, might have I/O via C++ library, so it doen\u0027t have same problem too.\n\nUnfortunately, the \u0027dog\u0027 command is only way to communicate with Sheepdog cluster from Python code for now.","commit_id":"2ce1466e02f5772fd7f5f92979fe67ea0d81f388"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5b6db265c57395a66fb6450285df5c2555d89b77","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            # XXX(yamada-h):"},{"line_number":56,"context_line":"            # processutils.execute causes busy waiting under eventlet."},{"line_number":57,"context_line":"            # To avoid wasting CPU resources, it should not be used for"},{"line_number":58,"context_line":"            # the command which takes long time to execute."}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_6ec78698","line":55,"updated":"2015-07-08 13:49:56.000000000","message":"s/XXX(yamada-h)/NOTE(yamada-h)/","commit_id":"0aace5c1a052a2b020fa3294b2b3d2b256d9b59e"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"43f880a355cc244e8c946ce0e515bb144bd90a8d","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":54,"context_line":"        try:"},{"line_number":55,"context_line":"            # XXX(yamada-h):"},{"line_number":56,"context_line":"            # processutils.execute causes busy waiting under eventlet."},{"line_number":57,"context_line":"            # To avoid wasting CPU resources, it should not be used for"},{"line_number":58,"context_line":"            # the command which takes long time to execute."}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_c0e458e1","line":55,"in_reply_to":"ba3cc151_6ec78698","updated":"2015-07-15 04:59:25.000000000","message":"OK, I\u0027ll change it.","commit_id":"0aace5c1a052a2b020fa3294b2b3d2b256d9b59e"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"b13fc7fee6e3f16a2f4e33542c5d5ba96b03f82d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    def write(self, data):"},{"line_number":83,"context_line":"        length \u003d len(data)"},{"line_number":84,"context_line":"        cmd \u003d (\u0027dog\u0027, \u0027vdi\u0027, \u0027write\u0027, self._vdiname, self._offset, length)"},{"line_number":85,"context_line":"        self._execute(cmd, data)"},{"line_number":86,"context_line":"        self._inc_offset(length)"},{"line_number":87,"context_line":"        return length"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_432654cf","line":85,"updated":"2015-07-07 14:14:05.000000000","message":"This doesn\u0027t look safe.  If the cmd fails after the data has been written, you will throw an exception and not update self._offset.\n\nThen when another read/write occurs, you don\u0027t know if you are working with the expected offset.\n\nThe easiest way to fix this is to invalidate the object if an exception occurs, so that later read/write/seek requests fail rather than pretending to work.","commit_id":"0aace5c1a052a2b020fa3294b2b3d2b256d9b59e"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"43f880a355cc244e8c946ce0e515bb144bd90a8d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    def write(self, data):"},{"line_number":83,"context_line":"        length \u003d len(data)"},{"line_number":84,"context_line":"        cmd \u003d (\u0027dog\u0027, \u0027vdi\u0027, \u0027write\u0027, self._vdiname, self._offset, length)"},{"line_number":85,"context_line":"        self._execute(cmd, data)"},{"line_number":86,"context_line":"        self._inc_offset(length)"},{"line_number":87,"context_line":"        return length"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_4dcc416a","line":85,"in_reply_to":"ba3cc151_432654cf","updated":"2015-07-15 04:59:25.000000000","message":"OK, I\u0027ll add invalidate flag for safe operation.","commit_id":"0aace5c1a052a2b020fa3294b2b3d2b256d9b59e"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"6f963fcddaeb37628df3116aaf9769b2374f9284","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                         \u0027name\u0027: \u0027tmp-snap-%s\u0027 % volume[\u0027name\u0027]}"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        try:"},{"line_number":377,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":378,"context_line":"        except (processutils.ProcessExecutionError, OSError) as exc:"},{"line_number":379,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":380,"context_line":"                     \u0027volume %(volume_id)s, error message was: %(err_msg)s\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba3cc151_77d3e0d5","line":377,"updated":"2015-07-08 11:57:26.000000000","message":"This snapshot will be left around if the backup service fails/gets restarted while the backup is ongoing","commit_id":"0aace5c1a052a2b020fa3294b2b3d2b256d9b59e"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"43f880a355cc244e8c946ce0e515bb144bd90a8d","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                         \u0027name\u0027: \u0027tmp-snap-%s\u0027 % volume[\u0027name\u0027]}"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        try:"},{"line_number":377,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":378,"context_line":"        except (processutils.ProcessExecutionError, OSError) as exc:"},{"line_number":379,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":380,"context_line":"                     \u0027volume %(volume_id)s, error message was: %(err_msg)s\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_e0371c4b","line":377,"in_reply_to":"ba3cc151_77d3e0d5","updated":"2015-07-15 04:59:25.000000000","message":"I\u0027ll add delete_snapshot operation for deleting old temporary snapshot at first of the method.","commit_id":"0aace5c1a052a2b020fa3294b2b3d2b256d9b59e"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"b6161def0f10f9f766c5f860520316289e7aa4ca","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def _validate(self):"},{"line_number":52,"context_line":"        self._valid \u003d True"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _invalidate(self):"},{"line_number":55,"context_line":"        self._valid \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _is_valid(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_1e72b049","line":54,"updated":"2015-07-22 10:20:50.000000000","message":"I don\u0027t see you ever calling this.  I thought the idea was to invalidate if there\u0027s an exception ....","commit_id":"e42dd3ac2a617ecfc0606bad4ed0187499abe157"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"8c0cd9c854458058f766bfa3a13a91c32c059418","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def _validate(self):"},{"line_number":52,"context_line":"        self._valid \u003d True"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _invalidate(self):"},{"line_number":55,"context_line":"        self._valid \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _is_valid(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_f40123b0","line":54,"in_reply_to":"3a50d1a3_1e72b049","updated":"2015-07-22 12:23:15.000000000","message":"Sorry, it\u0027s my mistakes...\n\nI\u0027ll change.","commit_id":"e42dd3ac2a617ecfc0606bad4ed0187499abe157"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"b6161def0f10f9f766c5f860520316289e7aa4ca","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        try:"},{"line_number":408,"context_line":"            self.delete_snapshot(temp_snapshot)"},{"line_number":409,"context_line":"        except (processutils.ProcessExecutionError):"},{"line_number":410,"context_line":"            LOG.debug(\u0027An invalid snapshot does not exist\u0027)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        try:"},{"line_number":413,"context_line":"            self.create_snapshot(temp_snapshot)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_9ea800dd","line":410,"updated":"2015-07-22 10:20:50.000000000","message":"I understand what you are doing here given the # NOTE and the dialogue with Duncan in changeset 11, but when we read the logs that information is not available.  The bare message \"An invalid snapshot does not exist\" will I think be quite confusing.  Was an invalid snapshot supposed to exist ? :-)  Why is this message appearing when I being a backup operation?","commit_id":"e42dd3ac2a617ecfc0606bad4ed0187499abe157"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"8c0cd9c854458058f766bfa3a13a91c32c059418","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        try:"},{"line_number":408,"context_line":"            self.delete_snapshot(temp_snapshot)"},{"line_number":409,"context_line":"        except (processutils.ProcessExecutionError):"},{"line_number":410,"context_line":"            LOG.debug(\u0027An invalid snapshot does not exist\u0027)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        try:"},{"line_number":413,"context_line":"            self.create_snapshot(temp_snapshot)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_54ced782","line":410,"in_reply_to":"3a50d1a3_9ea800dd","updated":"2015-07-22 12:23:15.000000000","message":"OK, this message is not important.\n\nTo ignore ProcessExecutionError here, I\u0027ll change to pass.","commit_id":"e42dd3ac2a617ecfc0606bad4ed0187499abe157"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5e7555d4c5aff5c42ff1169dbb12cc57258e2498","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":64,"context_line":"        try:"},{"line_number":65,"context_line":"            # NOTE(yamada-h):"},{"line_number":66,"context_line":"            # processutils.execute causes busy waiting under eventlet."},{"line_number":67,"context_line":"            # To avoid wasting CPU resources, it should not be used for"},{"line_number":68,"context_line":"            # the command which takes long time to execute."}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_2f636eb2","line":65,"updated":"2015-07-29 14:44:03.000000000","message":"You do not need to put a new line after your NOTE comment.","commit_id":"d9dedd5ebefc46d8f43480343eb45947149ec4af"},{"author":{"_account_id":13923,"name":"Teruaki Ishizaki","email":"ishizaki.teruaki@lab.ntt.co.jp","username":"tishizaki"},"change_message_id":"3ab8bf98d3196e60a07a5b7a8b82edcef2774745","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":64,"context_line":"        try:"},{"line_number":65,"context_line":"            # NOTE(yamada-h):"},{"line_number":66,"context_line":"            # processutils.execute causes busy waiting under eventlet."},{"line_number":67,"context_line":"            # To avoid wasting CPU resources, it should not be used for"},{"line_number":68,"context_line":"            # the command which takes long time to execute."}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_46bc8306","line":65,"in_reply_to":"3a50d1a3_2f636eb2","updated":"2015-07-30 04:05:56.000000000","message":"I fixed some messages from your comments.","commit_id":"d9dedd5ebefc46d8f43480343eb45947149ec4af"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5e7555d4c5aff5c42ff1169dbb12cc57258e2498","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def read(self, length\u003dNone):"},{"line_number":83,"context_line":"        if not self._is_valid():"},{"line_number":84,"context_line":"            msg \u003d _(\u0027An error for reading an invalid volume \"%s\" happens.\u0027)"},{"line_number":85,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        cmd \u003d [\u0027dog\u0027, \u0027vdi\u0027, \u0027read\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_af6f7e90","line":84,"updated":"2015-07-29 14:44:03.000000000","message":"This needs to be reworded - An error occurred while reading volume \"%s\".","commit_id":"d9dedd5ebefc46d8f43480343eb45947149ec4af"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5e7555d4c5aff5c42ff1169dbb12cc57258e2498","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def write(self, data):"},{"line_number":98,"context_line":"        if not self._is_valid():"},{"line_number":99,"context_line":"            msg \u003d _(\u0027An error for writing to an invalid volume \"%s\" happens.\u0027)"},{"line_number":100,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        length \u003d len(data)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_af48de2d","line":99,"updated":"2015-07-29 14:44:03.000000000","message":"This needs to be reworded - An error occurred while writing to volume \"%s\".","commit_id":"d9dedd5ebefc46d8f43480343eb45947149ec4af"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5e7555d4c5aff5c42ff1169dbb12cc57258e2498","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def seek(self, offset, whence\u003d0):"},{"line_number":109,"context_line":"        if not self._is_valid():"},{"line_number":110,"context_line":"            msg \u003d _(\u0027An error for seeking an invalid volume \"%s\" happens.\u0027)"},{"line_number":111,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if whence \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_afc1be81","line":110,"updated":"2015-07-29 14:44:03.000000000","message":"This needs to be reworded - An error occurred while seeking for volume \"%s\".","commit_id":"d9dedd5ebefc46d8f43480343eb45947149ec4af"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"5e7555d4c5aff5c42ff1169dbb12cc57258e2498","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        temp_snapshot \u003d {\u0027volume_name\u0027: volume[\u0027name\u0027],"},{"line_number":397,"context_line":"                         \u0027name\u0027: \u0027tmp-snap-%s\u0027 % volume[\u0027name\u0027]}"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        # NOTE(tishizaki)"},{"line_number":400,"context_line":"        # If previous backup_volume operation has failed,"},{"line_number":401,"context_line":"        # a temporary snapshot for previous operation may exist."},{"line_number":402,"context_line":"        # So, the old snapshot must be deleted before backup_volume."}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_2fa04ef3","line":399,"updated":"2015-07-29 14:44:03.000000000","message":"s/NOTE(tishizaki)/NOTE(tishizaki):/\n\nYou do not need to put a new line after the NOTE comment.","commit_id":"d9dedd5ebefc46d8f43480343eb45947149ec4af"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3b2eac75990cea481b994dc2f83cf28f27e35df0","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"},{"line_number":75,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":76,"context_line":"            self._invalidate()"},{"line_number":77,"context_line":"            msg \u003d _(\u0027Sheepdog I/O Error, command was: \"%s\"\u0027) % \u0027 \u0027.join(cmd)"},{"line_number":78,"context_line":"            raise exception.VolumeDriverException(msg)"},{"line_number":79,"context_line":"        finally:"},{"line_number":80,"context_line":"            processutils.subprocess \u003d _processutils_subprocess"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_7975a0ca","line":77,"updated":"2015-07-30 06:02:13.000000000","message":"Put \u0027.\u0027 in the end of the message.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            # SEEK_END or 2 - end of the stream; offset is usually negative"},{"line_number":122,"context_line":"            # TODO(yamada-h): Support SEEK_END"},{"line_number":123,"context_line":"            raise IOError(_(\"Invalid argument - whence\u003d%s not supported\") %"},{"line_number":124,"context_line":"                          (whence))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        if new_offset \u003c 0:"},{"line_number":127,"context_line":"            raise IOError(_(\"Invalid argument - negative seek offset\"))"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_2c80f18a","line":124,"updated":"2015-07-31 13:18:26.000000000","message":"Please remove extra () from whence. (whence) \u003d\u003e whence.\nAlso add \".\" at the end of the message.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                          (whence))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        if new_offset \u003c 0:"},{"line_number":127,"context_line":"            raise IOError(_(\"Invalid argument - negative seek offset\"))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        self._offset \u003d new_offset"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_2c579127","line":127,"updated":"2015-07-31 13:18:26.000000000","message":"Please add \".\" at the end of the message.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        Raising IOError is recommended way to notify caller that interface is"},{"line_number":141,"context_line":"        not supported - see http://docs.python.org/2/library/io.html#io.IOBase"},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":"        raise IOError(_(\"fileno is not supported by SheepdogIOWrapper\"))"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class SheepdogDriver(driver.VolumeDriver):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_6c24b9c5","line":143,"updated":"2015-07-31 13:18:26.000000000","message":"Same as above.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"200e03141a08cdf7d9433c84099571100e18a132","unresolved":false,"context_lines":[{"line_number":415,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":416,"context_line":"                     \u0027volume %(volume_id)s, error message was: %(err_msg)s\u0027)"},{"line_number":417,"context_line":"                   % {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027err_msg\u0027: exc})"},{"line_number":418,"context_line":"            LOG.exception(msg)"},{"line_number":419,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_8fe1f7fe","line":418,"updated":"2015-07-31 13:18:26.000000000","message":"IMO, it should be LOG.error() else it will duplicate the stack trace logs.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9f9a53da82561af752522f06c860a588c416c0f5","unresolved":false,"context_lines":[{"line_number":415,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for \u0027"},{"line_number":416,"context_line":"                     \u0027volume %(volume_id)s, error message was: %(err_msg)s\u0027)"},{"line_number":417,"context_line":"                   % {\u0027volume_id\u0027: volume[\u0027id\u0027], \u0027err_msg\u0027: exc})"},{"line_number":418,"context_line":"            LOG.exception(msg)"},{"line_number":419,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_9a337362","line":418,"in_reply_to":"3a50d1a3_8fe1f7fe","updated":"2015-07-31 13:26:43.000000000","message":"Or remove err_msg from the string formatting above. At a minimum it will need six.text_type around the exc variable to make sure there aren\u0027t any unicode string formatting errors. But I don\u0027t think you want to pass all of that into the exception, so my recommendation would be to remove \"as exc\" from the except line and from the \"error message was:\" and associated formatting bits. Then keep it using LOG.exception.","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"3b2eac75990cea481b994dc2f83cf28f27e35df0","unresolved":false,"context_lines":[{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        try:"},{"line_number":422,"context_line":"            sheepdog_fd \u003d SheepdogIOWrapper(volume, temp_snapshot[\u0027name\u0027])"},{"line_number":423,"context_line":"            backup_service.backup(backup, sheepdog_fd)"},{"line_number":424,"context_line":"        finally:"},{"line_number":425,"context_line":"            self.delete_snapshot(temp_snapshot)"},{"line_number":426,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_d93dd4de","line":423,"updated":"2015-07-30 06:02:13.000000000","message":"why not except ?","commit_id":"674daef506b673f34954d8cc888e3beace559ff8"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        self._offset \u003d 0"},{"line_number":49,"context_line":"        self._validate()"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _validate(self):"},{"line_number":52,"context_line":"        self._valid \u003d True"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _invalidate(self):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_13d4441e","line":51,"updated":"2015-08-04 13:50:18.000000000","message":"This method does not do much, other than set a private variable to true.  Why not just set the variable directly, instead of using a method to do it?","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def _validate(self):"},{"line_number":52,"context_line":"        self._valid \u003d True"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _invalidate(self):"},{"line_number":55,"context_line":"        self._valid \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _is_valid(self):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_13bbe4e6","line":54,"updated":"2015-08-04 13:50:18.000000000","message":"Ditto","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def _invalidate(self):"},{"line_number":55,"context_line":"        self._valid \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _is_valid(self):"},{"line_number":58,"context_line":"        return self._valid"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _inc_offset(self, length):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_73ed88ee","line":57,"updated":"2015-08-04 13:50:18.000000000","message":"Ditto","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        return self._valid"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _inc_offset(self, length):"},{"line_number":61,"context_line":"        self._offset +\u003d length"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _execute(self, cmd, data\u003dNone):"},{"line_number":64,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_93e854e4","line":61,"updated":"2015-08-04 13:50:18.000000000","message":"Ditto","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def read(self, length\u003dNone):"},{"line_number":83,"context_line":"        if not self._is_valid():"},{"line_number":84,"context_line":"            msg \u003d _(\u0027An error occured while reading volume \"%s\".\u0027)"},{"line_number":85,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        cmd \u003d [\u0027dog\u0027, \u0027vdi\u0027, \u0027read\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_b391d054","line":84,"updated":"2015-08-04 13:50:18.000000000","message":"s/occured/occurred/","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def write(self, data):"},{"line_number":98,"context_line":"        if not self._is_valid():"},{"line_number":99,"context_line":"            msg \u003d _(\u0027An error occured while writing to volume \"%s\".\u0027)"},{"line_number":100,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        length \u003d len(data)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_338ce034","line":99,"updated":"2015-08-04 13:50:18.000000000","message":"s/occured/occurred/","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b47299506040b16a79a2f0b76fb2d54561ed40eb","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def seek(self, offset, whence\u003d0):"},{"line_number":109,"context_line":"        if not self._is_valid():"},{"line_number":110,"context_line":"            msg \u003d _(\u0027An error occured while seeking for volume \"%s\".\u0027)"},{"line_number":111,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if whence \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_d3825c00","line":110,"updated":"2015-08-04 13:50:18.000000000","message":"s/occured/occurred/","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"e318c39b47daea9d60d2ada22c90deb47cfd4979","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        Raising IOError is recommended way to notify caller that interface is"},{"line_number":141,"context_line":"        not supported - see http://docs.python.org/2/library/io.html#io.IOBase"},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":"        raise IOError(_(\"fileno is not supported by SheepdogIOWrapper\"))"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"class SheepdogDriver(driver.VolumeDriver):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_259104f1","line":143,"updated":"2015-08-04 11:28:34.000000000","message":"Add a \u0027.\u0027 at the end of the EOL please, thanks.","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"e318c39b47daea9d60d2ada22c90deb47cfd4979","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        # does not exist."},{"line_number":407,"context_line":"        try:"},{"line_number":408,"context_line":"            self.delete_snapshot(temp_snapshot)"},{"line_number":409,"context_line":"        except (processutils.ProcessExecutionError):"},{"line_number":410,"context_line":"            pass"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_a073c2b0","line":409,"updated":"2015-08-04 11:28:34.000000000","message":"No need parenthesis here.","commit_id":"fc809177f4e9890450344e3d6eca41428db11b35"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b02f7024af4d1eb8e6c281236005d3d82e92bfa8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            # the command which takes long time to execute."},{"line_number":58,"context_line":"            # For workaround, we replace a subprocess module with"},{"line_number":59,"context_line":"            # the original one while only executing a read/write command."},{"line_number":60,"context_line":"            import eventlet"},{"line_number":61,"context_line":"            _processutils_subprocess \u003d processutils.subprocess"},{"line_number":62,"context_line":"            processutils.subprocess \u003d eventlet.patcher.original(\u0027subprocess\u0027)"},{"line_number":63,"context_line":"            return processutils.execute(*cmd, process_input\u003ddata)[0]"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_af498ab9","line":60,"updated":"2015-08-14 04:38:17.000000000","message":"import should be moved to the beginning of the file.","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b02f7024af4d1eb8e6c281236005d3d82e92bfa8","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":65,"context_line":"            self._valid \u003d False"},{"line_number":66,"context_line":"            msg \u003d _(\u0027Sheepdog I/O Error, command was: \"%s\".\u0027) % \u0027 \u0027.join(cmd)"},{"line_number":67,"context_line":"            raise exception.VolumeDriverException(msg)"},{"line_number":68,"context_line":"        finally:"},{"line_number":69,"context_line":"            processutils.subprocess \u003d _processutils_subprocess"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_efd6b2c2","line":67,"updated":"2015-08-14 04:38:17.000000000","message":"exception.VolumeDriverException(message\u003dmsg)","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b02f7024af4d1eb8e6c281236005d3d82e92bfa8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def read(self, length\u003dNone):"},{"line_number":72,"context_line":"        if not self._valid:"},{"line_number":73,"context_line":"            msg \u003d _(\u0027An error occurred while reading volume \"%s\".\u0027)"},{"line_number":74,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        cmd \u003d [\u0027dog\u0027, \u0027vdi\u0027, \u0027read\u0027]"},{"line_number":77,"context_line":"        if self._snapshot_name:"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_8fe36ea4","line":74,"updated":"2015-08-14 04:38:17.000000000","message":"same","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b02f7024af4d1eb8e6c281236005d3d82e92bfa8","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def write(self, data):"},{"line_number":87,"context_line":"        if not self._valid:"},{"line_number":88,"context_line":"            msg \u003d _(\u0027An error occurred while writing to volume \"%s\".\u0027)"},{"line_number":89,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        length \u003d len(data)"},{"line_number":92,"context_line":"        cmd \u003d (\u0027dog\u0027, \u0027vdi\u0027, \u0027write\u0027, self._vdiname, self._offset, length)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_afe0aa97","line":89,"updated":"2015-08-14 04:38:17.000000000","message":"same","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b02f7024af4d1eb8e6c281236005d3d82e92bfa8","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def seek(self, offset, whence\u003d0):"},{"line_number":98,"context_line":"        if not self._valid:"},{"line_number":99,"context_line":"            msg \u003d _(\u0027An error occured while seeking for volume \"%s\".\u0027)"},{"line_number":100,"context_line":"            raise exception.VolumeDriverException(msg % self._vdiname)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if whence \u003d\u003d 0:"},{"line_number":103,"context_line":"            # SEEK_SET or 0 - start of the stream (the default);"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_2feb3a7a","line":100,"updated":"2015-08-14 04:38:17.000000000","message":"same","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":8202,"name":"chenzongliang","email":"chenzongliang@huawei.com","username":"zongliang"},"change_message_id":"bb4a88fd135b7ecd69fe6a2d95694d9a92164ea4","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if whence \u003d\u003d 0:"},{"line_number":103,"context_line":"            # SEEK_SET or 0 - start of the stream (the default);"},{"line_number":104,"context_line":"            #                 offset should be zero or positive"},{"line_number":105,"context_line":"            new_offset \u003d offset"},{"line_number":106,"context_line":"        elif whence \u003d\u003d 1:"},{"line_number":107,"context_line":"            # SEEK_CUR or 1 - current stream position; offset may be negative"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_620dd436","line":104,"updated":"2015-08-09 13:06:50.000000000","message":"only one space needed","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b02f7024af4d1eb8e6c281236005d3d82e92bfa8","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            pass"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        try:"},{"line_number":402,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":403,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":404,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for volume %s.\u0027)"},{"line_number":405,"context_line":"                   % volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_cf5c164f","line":402,"updated":"2015-08-14 04:38:17.000000000","message":"Do you need to create a temp snapshot and backup from it even if the volume is \u0027available\u0027?  Will it be faster if you just backup the volume directly if it is \u0027available\u0027?\n\nFor LVM, we backup from the volume directly if it is \u0027available\u0027. If the volume is \u0027in-use\u0027, we back it up from a temp snapshot.","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":15101,"name":"YAMADA Hideki","email":"yamada.hideki@lab.ntt.co.jp","username":"yamada-h"},"change_message_id":"c20775b77a7f5dc8c7bb387ce3a364161ba23afd","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            pass"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        try:"},{"line_number":402,"context_line":"            self.create_snapshot(temp_snapshot)"},{"line_number":403,"context_line":"        except (processutils.ProcessExecutionError, OSError):"},{"line_number":404,"context_line":"            msg \u003d (_(\u0027Failed to create a temporary snapshot for volume %s.\u0027)"},{"line_number":405,"context_line":"                   % volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_196d1a32","line":402,"in_reply_to":"1a4dcd0f_cf5c164f","updated":"2015-08-18 01:20:26.000000000","message":"Sounds right. I will fix it in next patch.","commit_id":"25d5b0882b717fb1d0699839b540a99d4c655c67"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"6999902cbc9799a3f6a18944bc5af672f508c830","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            new_offset \u003d offset"},{"line_number":109,"context_line":"        elif whence \u003d\u003d 1:"},{"line_number":110,"context_line":"            # SEEK_CUR or 1 - current stream position; offset may be negative"},{"line_number":111,"context_line":"            new_offset \u003d self._offset + offset"},{"line_number":112,"context_line":"        else:"},{"line_number":113,"context_line":"            # SEEK_END or 2 - end of the stream; offset is usually negative"},{"line_number":114,"context_line":"            # TODO(yamada-h): Support SEEK_END"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa1b9901_5a59788d","line":111,"updated":"2015-08-24 11:11:04.000000000","message":"What happens if the seek causes the offset to go negative? Possibly worth a guard check - normal files raise IOError in this cause.","commit_id":"23e7943b1df4d5c567db69ee44e85242f8aff7a4"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"6999902cbc9799a3f6a18944bc5af672f508c830","unresolved":false,"context_lines":[{"line_number":395,"context_line":"        # is done successfully, although target snapshot does not exist."},{"line_number":396,"context_line":"        # However, sheepdog 0.8 or before \u0027delete_snapshot\u0027 operation"},{"line_number":397,"context_line":"        # is failed, and raise ProcessExecutionError when target snapshot"},{"line_number":398,"context_line":"        # does not exist."},{"line_number":399,"context_line":"        try:"},{"line_number":400,"context_line":"            self.delete_snapshot(temp_snapshot)"},{"line_number":401,"context_line":"        except (processutils.ProcessExecutionError):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa1b9901_5adc1846","line":398,"updated":"2015-08-24 11:11:04.000000000","message":"What happens if there is another backup of this volume going on concurrently? e.g. two c-bak processes running on the same host? Does the running backup get the snap pulled out from under it?","commit_id":"23e7943b1df4d5c567db69ee44e85242f8aff7a4"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"73a05612a2596e866dffdefae8571ed6f7c4423d","unresolved":false,"context_lines":[{"line_number":395,"context_line":"        # is done successfully, although target snapshot does not exist."},{"line_number":396,"context_line":"        # However, sheepdog 0.8 or before \u0027delete_snapshot\u0027 operation"},{"line_number":397,"context_line":"        # is failed, and raise ProcessExecutionError when target snapshot"},{"line_number":398,"context_line":"        # does not exist."},{"line_number":399,"context_line":"        try:"},{"line_number":400,"context_line":"            self.delete_snapshot(temp_snapshot)"},{"line_number":401,"context_line":"        except (processutils.ProcessExecutionError):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa1b9901_9517e153","line":398,"in_reply_to":"fa1b9901_5adc1846","updated":"2015-08-24 11:32:04.000000000","message":"Sorry, ignore that, it can\u0027t happen since we don\u0027t allow two backups to be happening at one and the live backup code will have created a new volume. Apologies for the noise.","commit_id":"23e7943b1df4d5c567db69ee44e85242f8aff7a4"}]}
