)]}'
{"freezer/job.py":[{"author":{"_account_id":13940,"name":"Saad Zaher","email":"eng.szaher@gmail.com","username":"szaher"},"change_message_id":"ee3ab708b6f984a4f11033889752913eb31d22c5","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def _validate(self):"},{"line_number":96,"context_line":"        if self.conf.mode \u003d\u003d \u0027fs\u0027:"},{"line_number":97,"context_line":"            if not self.conf.path_to_backup:"},{"line_number":98,"context_line":"                raise ValueError(\u0027--mode argument must be provided\u0027)"},{"line_number":99,"context_line":"            if self.conf.no_incremental and (self.conf.max_level or"},{"line_number":100,"context_line":"                                             self.conf.always_level):"},{"line_number":101,"context_line":"                raise Exception("}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_331f5f09","line":98,"updated":"2016-12-15 13:41:18.000000000","message":"This is incorrect. We checked in the if statement if the mode is fs, now we are checking if the user provided the required arguments to take fs backup, so Please remove this and put it back to path-to-backup","commit_id":"a783c4f5fa31ac9a8cb4de9fafbd79f5151bd42b"},{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"f6075f89a4634ec7e1f2705713e90f69d5d9ea01","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def _validate(self):"},{"line_number":96,"context_line":"        if self.conf.mode \u003d\u003d \u0027fs\u0027:"},{"line_number":97,"context_line":"            if not self.conf.path_to_backup:"},{"line_number":98,"context_line":"                raise ValueError(\u0027--mode argument must be provided\u0027)"},{"line_number":99,"context_line":"            if self.conf.no_incremental and (self.conf.max_level or"},{"line_number":100,"context_line":"                                             self.conf.always_level):"},{"line_number":101,"context_line":"                raise Exception("}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_9aef6086","line":98,"in_reply_to":"1a6eadb0_331f5f09","updated":"2016-12-15 15:07:29.000000000","message":"Right you are. We shouldn\u0027t do any fix according to comment for patchset #2 because the default value for mode is \"fs\"","commit_id":"a783c4f5fa31ac9a8cb4de9fafbd79f5151bd42b"}],"freezer/openstack/restore.py":[{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"2afb866fa1835c41fc370d4e7bcf5cdd5ff10920","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                                                  backup, path)"},{"line_number":81,"context_line":"            metadata_file \u003d \"{0}/{1}/{2}/metadata\".format(self.container,"},{"line_number":82,"context_line":"                                                          path, backup)"},{"line_number":83,"context_line":"            data \u003d open(image_file, \u0027rb\u0027)"},{"line_number":84,"context_line":"            info \u003d json.load(file(metadata_file))"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            # TODO(yangyapeng) ssh storage need to implement"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_d20e018b","line":83,"updated":"2016-10-14 17:00:19.000000000","message":"IO exceptions are not tracked, file object is not closed. It\u0027s better to use with open(...) as f: construction","commit_id":"e2afd24255cb80dffb7fdd96e01942bec02a3355"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"2afb866fa1835c41fc370d4e7bcf5cdd5ff10920","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            # storage is ssh storage"},{"line_number":88,"context_line":"            return {}"},{"line_number":89,"context_line":"        LOG.info(\"Creation glance image\")"},{"line_number":90,"context_line":"        image \u003d glance.images.create(name\u003d\"restore_nova_%s\" % path,"},{"line_number":91,"context_line":"                                     container_format\u003d\"bare\","},{"line_number":92,"context_line":"                                     disk_format\u003d\"raw\")"},{"line_number":93,"context_line":"        glance.images.upload(image.id, data)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_8f6462b9","line":90,"range":{"start_line":90,"start_character":51,"end_line":90,"end_character":55},"updated":"2016-10-14 17:00:19.000000000","message":"AFAIK, it could be not only nova restore image but cinder also","commit_id":"e2afd24255cb80dffb7fdd96e01942bec02a3355"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"2afb866fa1835c41fc370d4e7bcf5cdd5ff10920","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                                     container_format\u003d\"bare\","},{"line_number":92,"context_line":"                                     disk_format\u003d\"raw\")"},{"line_number":93,"context_line":"        glance.images.upload(image.id, data)"},{"line_number":94,"context_line":"        LOG.info(\"Create glance image %s finally\" % image.id)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        return info, image"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_2fc8b673","line":94,"updated":"2016-10-14 17:00:19.000000000","message":"There is no exception tracking if creating image failed","commit_id":"e2afd24255cb80dffb7fdd96e01942bec02a3355"},{"author":{"_account_id":21644,"name":"Shangzhong Zhu","email":"zhu.shangzhong@zte.com.cn","username":"shangzhong.zhu"},"change_message_id":"a5f9b844fef1a0b383e84fe2502786299e965e72","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                                              imageRef\u003dimage.id)"},{"line_number":156,"context_line":"        while volume.status !\u003d \"available\":"},{"line_number":157,"context_line":"            try:"},{"line_number":158,"context_line":"                LOG.info(\"Volume copy status: \" + volume.status)"},{"line_number":159,"context_line":"                volume \u003d cinder_client.volumes.get(volume.id)"},{"line_number":160,"context_line":"                time.sleep(5)"},{"line_number":161,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_3505b979","line":158,"range":{"start_line":158,"start_character":16,"end_line":158,"end_character":64},"updated":"2016-11-01 07:19:43.000000000","message":"freezer-agent --action restore --cinder-vol-id 1fce9ea1-4316-4df9-a118-38d76641506f --storage local --container /home/zhusz/image1031\n\nWhen volume.status is \"error\", print \"Volume copy status: error\" forever.","commit_id":"4ac1fe085c3c846ecd3774b80a671a0f9a7b5d1a"},{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"9797b9cc3005b16d80adae03adfbe956e892af51","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                                     container_format\u003d\"bare\","},{"line_number":98,"context_line":"                                     disk_format\u003d\"raw\")"},{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            glance.images.upload(image.id, data)"},{"line_number":101,"context_line":"        except Exception as err:"},{"line_number":102,"context_line":"            raise Exception(err)"},{"line_number":103,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_42872761","line":100,"updated":"2016-11-23 16:23:13.000000000","message":"What if we check checksum after uploading data into image for the case upload operation failed?","commit_id":"c683752d18de771034cdcc6b832b1044a7a55a90"},{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"9797b9cc3005b16d80adae03adfbe956e892af51","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                time.sleep(5)"},{"line_number":178,"context_line":"            except Exception as e:"},{"line_number":179,"context_line":"                LOG.exception(e)"},{"line_number":180,"context_line":"                LOG.warn(\"Exception getting volume status\")"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        LOG.info(\"Deleting temporary image\")"},{"line_number":183,"context_line":"        self.client_manager.get_glance().images.delete(image)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_2274eb9a","line":180,"updated":"2016-11-23 16:23:13.000000000","message":"In case volume.status \u003d\u003d \"error\" you raise Exception and catch it saying there\u0027s an issue with getting volume status, but the issue root cause is different. So you should have if statement here for handling such case","commit_id":"c683752d18de771034cdcc6b832b1044a7a55a90"},{"author":{"_account_id":13940,"name":"Saad Zaher","email":"eng.szaher@gmail.com","username":"szaher"},"change_message_id":"ee3ab708b6f984a4f11033889752913eb31d22c5","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        :type restore_from_timestamp: int"},{"line_number":42,"context_line":"        :return:"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        if self.storage \u003d\u003d \"swift\":"},{"line_number":45,"context_line":"            swift \u003d self.client_manager.get_swift()"},{"line_number":46,"context_line":"            path \u003d \"{0}_segments/{1}/\".format(self.container, path)"},{"line_number":47,"context_line":"            info, backups \u003d swift.get_container(self.container, prefix\u003dpath)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_d3ce2b2c","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":10},"updated":"2016-12-15 13:41:18.000000000","message":"What about ssh ? do we need to handle the other cases, we could say \"This storage is not supported at the moment. Try (local or  swift)\"","commit_id":"a783c4f5fa31ac9a8cb4de9fafbd79f5151bd42b"},{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"f6075f89a4634ec7e1f2705713e90f69d5d9ea01","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        :type restore_from_timestamp: int"},{"line_number":42,"context_line":"        :return:"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        if self.storage \u003d\u003d \"swift\":"},{"line_number":45,"context_line":"            swift \u003d self.client_manager.get_swift()"},{"line_number":46,"context_line":"            path \u003d \"{0}_segments/{1}/\".format(self.container, path)"},{"line_number":47,"context_line":"            info, backups \u003d swift.get_container(self.container, prefix\u003dpath)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_897ac4ef","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":10},"in_reply_to":"1a6eadb0_d3ce2b2c","updated":"2016-12-15 15:07:29.000000000","message":"I\u0027m already working on ssh type of backup and restore. So, it will be coming soon","commit_id":"a783c4f5fa31ac9a8cb4de9fafbd79f5151bd42b"}],"freezer/storage/fslike.py":[{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"2afb866fa1835c41fc370d4e7bcf5cdd5ff10920","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        backup_basepath \u003d \"{0}/{1}\".format(backup_basedir,"},{"line_number":92,"context_line":"                                           split[0])"},{"line_number":93,"context_line":"        backup_metadata \u003d \"%s/metadata\" % backup_basedir"},{"line_number":94,"context_line":"        # wirte backup to backup_basepath"},{"line_number":95,"context_line":"        with self.open(backup_basepath, \u0027wb\u0027) as backup_file:"},{"line_number":96,"context_line":"            for el in stream:"},{"line_number":97,"context_line":"                backup_file.write(el)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_0c8863c4","line":94,"updated":"2016-10-14 17:00:19.000000000","message":"write","commit_id":"e2afd24255cb80dffb7fdd96e01942bec02a3355"}]}
