)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13431,"name":"Evgeny Antyshev","email":"eantyshev@gmail.com","username":"eantyshev"},"change_message_id":"a943e78d0ca15becf609e33a1d30cd16f9f204fc","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Allow remotefs code to deal with qcow2 snapshot"},{"line_number":10,"context_line":"deletion. Otherwise snapshot in error state cannot"},{"line_number":11,"context_line":"be deleted if info file doesn\u0027t contain information"},{"line_number":12,"context_line":"about specific snapshot."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I1086548e837e3ae78d5092048085f0b3f12f0c11"},{"line_number":15,"context_line":"Signed-off-by: Pavel Glushchak \u003cpglushchak@virtuozzo.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a6eadb0_d66139d5","line":12,"updated":"2016-12-19 14:50:30.000000000","message":"There should be no such state: .info and .qemu_img_info should be kept in sync with actual file backing chain. If you encountered any inconsistency, you\u0027re better to fix the source of it.\n\nDid you try create1-create2-delete1-delete2 snapshot use case? AFAIU, you break many scenarios by this change.","commit_id":"4c3fe13d50cc894be071f658540aade9fd80a7d1"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"2f62a4646dd16f8e6bfd7db40833eb0bf55a9fb8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"vzstorage: fixed snapshot deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Allow remotefs code to deal with qcow2 snapshot"},{"line_number":10,"context_line":"deletion. Otherwise snapshot in error state cannot"},{"line_number":11,"context_line":"be deleted if info file doesn\u0027t contain information"},{"line_number":12,"context_line":"about specific snapshot."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I1086548e837e3ae78d5092048085f0b3f12f0c11"},{"line_number":15,"context_line":"Signed-off-by: Pavel Glushchak \u003cpglushchak@virtuozzo.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a6eadb0_004f9ebd","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":24},"updated":"2016-12-20 20:44:48.000000000","message":"Can you please create a bug in launchpad, the the details there and link it here?","commit_id":"f47d3dcad59ea18d962d1c5d71e03ee557d3bcf1"}],"cinder/tests/unit/volume/drivers/test_vzstorage.py":[{"author":{"_account_id":13431,"name":"Evgeny Antyshev","email":"eantyshev@gmail.com","username":"eantyshev"},"change_message_id":"a943e78d0ca15becf609e33a1d30cd16f9f204fc","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        self._vz_driver.get_volume_format \u003d mock.Mock("},{"line_number":343,"context_line":"            return_value\u003d\u0027qcow2\u0027)"},{"line_number":344,"context_line":"        self._vz_driver.delete_snapshot(self.snap)"},{"line_number":345,"context_line":"        self.assertTrue(mock_delete_snapshot.called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_160491c4","line":345,"updated":"2016-12-19 14:50:30.000000000","message":"Please, add at lease 1 testcase:\nCreate 1st snap, create 2nd snap, delete 1st, delete 2nd","commit_id":"4c3fe13d50cc894be071f658540aade9fd80a7d1"},{"author":{"_account_id":21284,"name":"Pavel Gluschak (scsnow)","email":"pglushchak@virtuozzo.com","username":"scsnow"},"change_message_id":"f6c6853a695b62d3083245b4728e839c4cbc6f22","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        self._vz_driver.get_volume_format \u003d mock.Mock("},{"line_number":343,"context_line":"            return_value\u003d\u0027qcow2\u0027)"},{"line_number":344,"context_line":"        self._vz_driver.delete_snapshot(self.snap)"},{"line_number":345,"context_line":"        self.assertTrue(mock_delete_snapshot.called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a6eadb0_9253db16","line":345,"in_reply_to":"1a6eadb0_160491c4","updated":"2016-12-21 14:34:33.000000000","message":"You are right. This case fails, but only for online snapshots. Trying to find out what specifics we have comparing to original remotefs code path.","commit_id":"4c3fe13d50cc894be071f658540aade9fd80a7d1"}],"cinder/volume/drivers/vzstorage.py":[{"author":{"_account_id":13431,"name":"Evgeny Antyshev","email":"eantyshev@gmail.com","username":"eantyshev"},"change_message_id":"dbb15d459e062baa9d975ac72a32b7caf2476625","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            snap_tm \u003d os.stat(path).st_mtime"},{"line_number":194,"context_line":"            if info_tm \u003e\u003d snap_tm:"},{"line_number":195,"context_line":"                is_cache_outdated \u003d False"},{"line_number":196,"context_line":"        if is_cache_outdated:"},{"line_number":197,"context_line":"            LOG.debug(\"Cached qemu-img info %s not present or outdated,\""},{"line_number":198,"context_line":"                      \" refresh\", qemu_img_cache)"},{"line_number":199,"context_line":"            ret \u003d super(VZStorageDriver, self)._qemu_img_info_base("}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_0bee3e8b","line":196,"updated":"2016-12-22 09:47:19.000000000","message":"You code will fail when there\u0027s no cache file: it assumes cache either exists and valid, or exists and outdated.\nIf there\u0027s no cache file, it\u0027s not right, and the cache must be created. It\u0027s a very common scenario in this module: we call _qemu_img_info right after f.e. volume creation to ensure cache is created","commit_id":"908a2992b0233efa0bd4a7267fce90cbbd83964f"},{"author":{"_account_id":21284,"name":"Pavel Gluschak (scsnow)","email":"pglushchak@virtuozzo.com","username":"scsnow"},"change_message_id":"79ce84ddc6ad935bc6f50acf638cf83ead3d45f4","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            snap_tm \u003d os.stat(path).st_mtime"},{"line_number":194,"context_line":"            if info_tm \u003e\u003d snap_tm:"},{"line_number":195,"context_line":"                is_cache_outdated \u003d False"},{"line_number":196,"context_line":"        if is_cache_outdated:"},{"line_number":197,"context_line":"            LOG.debug(\"Cached qemu-img info %s not present or outdated,\""},{"line_number":198,"context_line":"                      \" refresh\", qemu_img_cache)"},{"line_number":199,"context_line":"            ret \u003d super(VZStorageDriver, self)._qemu_img_info_base("}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_3ea50204","line":196,"in_reply_to":"da4df55a_0bee3e8b","updated":"2016-12-22 09:51:25.000000000","message":"if cache file doesn\u0027t exist, then condition in L191 is false. Thus is_cache_outdated remains True.","commit_id":"908a2992b0233efa0bd4a7267fce90cbbd83964f"},{"author":{"_account_id":13431,"name":"Evgeny Antyshev","email":"eantyshev@gmail.com","username":"eantyshev"},"change_message_id":"a26f3048125bb937d1f7d9650a172ea74c734d96","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            snap_tm \u003d os.stat(path).st_mtime"},{"line_number":194,"context_line":"            if info_tm \u003e\u003d snap_tm:"},{"line_number":195,"context_line":"                is_cache_outdated \u003d False"},{"line_number":196,"context_line":"        if is_cache_outdated:"},{"line_number":197,"context_line":"            LOG.debug(\"Cached qemu-img info %s not present or outdated,\""},{"line_number":198,"context_line":"                      \" refresh\", qemu_img_cache)"},{"line_number":199,"context_line":"            ret \u003d super(VZStorageDriver, self)._qemu_img_info_base("}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_3eb422f1","line":196,"in_reply_to":"da4df55a_3ea50204","updated":"2016-12-22 10:03:53.000000000","message":"Oh, I see. Then I\u0027m fine, providing you mark you patch as dependent from https://review.openstack.org/#/c/357679\n\nThat one has gone through hard community discussions and it will be painful to make extra round of it. Yet this patch is not so fundamental","commit_id":"908a2992b0233efa0bd4a7267fce90cbbd83964f"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"8035811d88d0133d2127bd037f7103aeff82f42b","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _qemu_img_info(self, path, volume_name):"},{"line_number":186,"context_line":"        qemu_img_cache \u003d path + \".qemu_img_info\""},{"line_number":187,"context_line":"        is_cache_outdated \u003d True"},{"line_number":188,"context_line":"        if os.path.isdir(path):"},{"line_number":189,"context_line":"            # Ploop disks stored along with metadata xml as directories"},{"line_number":190,"context_line":"            # qemu-img should explore base data file inside"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_5b7f6a14","line":187,"range":{"start_line":187,"start_character":8,"end_line":187,"end_character":32},"updated":"2017-01-24 11:56:15.000000000","message":"Not related to this error.","commit_id":"c1b0c4d8b0d7cf8287ee873bafa74d8c03dd8f3e"},{"author":{"_account_id":21284,"name":"Pavel Gluschak (scsnow)","email":"pglushchak@virtuozzo.com","username":"scsnow"},"change_message_id":"c4f11ec5504052e51a4de68a5cbda378b875fc5e","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _qemu_img_info(self, path, volume_name):"},{"line_number":186,"context_line":"        qemu_img_cache \u003d path + \".qemu_img_info\""},{"line_number":187,"context_line":"        is_cache_outdated \u003d True"},{"line_number":188,"context_line":"        if os.path.isdir(path):"},{"line_number":189,"context_line":"            # Ploop disks stored along with metadata xml as directories"},{"line_number":190,"context_line":"            # qemu-img should explore base data file inside"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_56590134","line":187,"range":{"start_line":187,"start_character":8,"end_line":187,"end_character":32},"in_reply_to":"5a3905b3_5b7f6a14","updated":"2017-01-24 12:14:36.000000000","message":"It\u0027s cosmetic change, that makes code more readable and saves 1 syscall. Don\u0027t think it worth for separate review.","commit_id":"c1b0c4d8b0d7cf8287ee873bafa74d8c03dd8f3e"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"8035811d88d0133d2127bd037f7103aeff82f42b","unresolved":false,"context_lines":[{"line_number":604,"context_line":"        if snapshot.id not in snap_info:"},{"line_number":605,"context_line":"            LOG.warning(_LW(\"Snapshot %s doesn\u0027t exist in snap_info\"),"},{"line_number":606,"context_line":"                        snapshot.id)"},{"line_number":607,"context_line":"            return"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        snap_file \u003d os.path.join(self._local_volume_dir(snapshot.volume),"},{"line_number":610,"context_line":"                                 snap_info[snapshot.id])"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_bb992e7b","line":607,"range":{"start_line":607,"start_character":12,"end_line":607,"end_character":18},"updated":"2017-01-24 11:56:15.000000000","message":"What are the situations where the snapshot info is not in the snapshot file? IIRC that information should always be there in the normal driver operation. And if its not, that is the point that should be fixed, i.e. the snapshot file should match the information in Cinder DB.","commit_id":"c1b0c4d8b0d7cf8287ee873bafa74d8c03dd8f3e"},{"author":{"_account_id":21284,"name":"Pavel Gluschak (scsnow)","email":"pglushchak@virtuozzo.com","username":"scsnow"},"change_message_id":"c4f11ec5504052e51a4de68a5cbda378b875fc5e","unresolved":false,"context_lines":[{"line_number":604,"context_line":"        if snapshot.id not in snap_info:"},{"line_number":605,"context_line":"            LOG.warning(_LW(\"Snapshot %s doesn\u0027t exist in snap_info\"),"},{"line_number":606,"context_line":"                        snapshot.id)"},{"line_number":607,"context_line":"            return"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        snap_file \u003d os.path.join(self._local_volume_dir(snapshot.volume),"},{"line_number":610,"context_line":"                                 snap_info[snapshot.id])"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_96cfe954","line":607,"range":{"start_line":607,"start_character":12,"end_line":607,"end_character":18},"in_reply_to":"5a3905b3_bb992e7b","updated":"2017-01-24 12:14:36.000000000","message":"In some situations snapshot creation may fail leaving snapshot in error state. This snapshot cannot be deleted as snap info doesn\u0027t contain any information about that and we fail with KeyError. Similar check is done in remotefs code. As we cannot completely reuse remotefs code because vzstorage doesn\u0027t support concurrent file access from multiple nodes, we do special handling here for online snapshotting to deal with cached qemu-img info files rather than reading information directly from image file as it\u0027s used by qemu process on compute node.","commit_id":"c1b0c4d8b0d7cf8287ee873bafa74d8c03dd8f3e"}]}
