)]}'
{"freezer/openstack/restore.py":[{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"724202dd03a15089c7b31f33da7b0e0692ce2362","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        cinder \u003d  self.client_manager.get_cinder()"},{"line_number":112,"context_line":"        cinder_volume \u003d cinder.volumes.create(size, imageRef\u003dimage.id)"},{"line_number":113,"context_line":"        cinder_id \u003d cinder.volumes.get(cinder_volume.id)"},{"line_number":114,"context_line":"        while cinder_id.status !\u003d \u0027available\u0027:"},{"line_number":115,"context_line":"            time.sleep(5)"},{"line_number":116,"context_line":"            try:"},{"line_number":117,"context_line":"                cinder_id \u003d cinder.volumes.get(cinder_volume.id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_fee7043e","line":114,"updated":"2016-05-28 01:30:03.000000000","message":"what if the status comes to error? I think you should take this into consideration. And maybe some timeout is better to avoid dead loop","commit_id":"e9567125cabc4e77b653d1bfd7204acb084a5f9c"},{"author":{"_account_id":14509,"name":"Pierre Mathieu","email":"pierre-arthur.mathieu@hpe.com","username":"slashme"},"change_message_id":"fa162f6851fd9f8bc61a4c6d6119174f58f109c3","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            except Exception as e:"},{"line_number":121,"context_line":"                LOG.error(e)"},{"line_number":122,"context_line":"                raise"},{"line_number":123,"context_line":"        LOG.info(\"[*] Deleting temporary image\")"},{"line_number":124,"context_line":"        self.client_manager.get_glance().images.delete(image)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def restore_nova(self, instance_id, restore_from_timestamp):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_3c8b196a","line":123,"range":{"start_line":123,"start_character":18,"end_line":123,"end_character":22},"updated":"2016-07-15 13:07:33.000000000","message":"We removed this logging notation.","commit_id":"ca762b50119e9ecdc8263c0d1c5dbc6659d12e8b"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"8c2ef2eba583ad97e1d93b00c46ed4930301e8f1","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Freezer restore modes related functions"},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import time"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa6399be_7a303c9f","line":18,"updated":"2016-10-18 18:17:20.000000000","message":"time imported twice","commit_id":"357afe080c8ddcd71d0297b80056a65162909314"},{"author":{"_account_id":21644,"name":"Shangzhong Zhu","email":"zhu.shangzhong@zte.com.cn","username":"shangzhong.zhu"},"change_message_id":"bfb6ebbdeccc5736c4cd34a4aed81ec2a911d46d","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        size \u003d length / gb"},{"line_number":128,"context_line":"        if length % gb \u003e 0:"},{"line_number":129,"context_line":"            size +\u003d 1"},{"line_number":130,"context_line":"        LOG.info(\"Creation volume from image\")"},{"line_number":131,"context_line":"        cinder \u003d self.client_manager.get_cinder()"},{"line_number":132,"context_line":"        cinder_volume \u003d cinder.volumes.create(size, imageRef\u003dimage.id)"},{"line_number":133,"context_line":"        cinder_id \u003d cinder.volumes.get(cinder_volume.id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5da102_5796b8f0","line":130,"range":{"start_line":130,"start_character":18,"end_line":130,"end_character":26},"updated":"2016-11-01 02:54:56.000000000","message":"It\u0027s better to use \"Creating\" in here.","commit_id":"357afe080c8ddcd71d0297b80056a65162909314"},{"author":{"_account_id":21644,"name":"Shangzhong Zhu","email":"zhu.shangzhong@zte.com.cn","username":"shangzhong.zhu"},"change_message_id":"bfb6ebbdeccc5736c4cd34a4aed81ec2a911d46d","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        LOG.info(\"Creation volume from image\")"},{"line_number":131,"context_line":"        cinder \u003d self.client_manager.get_cinder()"},{"line_number":132,"context_line":"        cinder_volume \u003d cinder.volumes.create(size, imageRef\u003dimage.id)"},{"line_number":133,"context_line":"        cinder_id \u003d cinder.volumes.get(cinder_volume.id)"},{"line_number":134,"context_line":"        while cinder_id.status !\u003d \u0027available\u0027:"},{"line_number":135,"context_line":"            try:"},{"line_number":136,"context_line":"                cinder_id \u003d cinder.volumes.get(cinder_volume.id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5da102_fd1b2d19","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":56},"updated":"2016-11-01 02:54:56.000000000","message":"The function \"cinder.volumes.get\" get cinder volume instance NOT cinder id.\nuse \"cinder_volume \u003d cinder.volumes.get(cinder_volume.id)\"","commit_id":"357afe080c8ddcd71d0297b80056a65162909314"},{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"b98f7b782e2541a1f3f38814c30b452f14687e04","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            try:"},{"line_number":136,"context_line":"                cinder_id \u003d cinder.volumes.get(cinder_volume.id)"},{"line_number":137,"context_line":"                if cinder_id.status \u003d\u003d \u0027error\u0027:"},{"line_number":138,"context_line":"                    raise Exception(\"restore volume fails, volume %s has\""},{"line_number":139,"context_line":"                                    \"error state\" % cinder_id)"},{"line_number":140,"context_line":"                time.sleep(5)"},{"line_number":141,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_9a1fd25a","line":138,"updated":"2016-11-30 16:26:39.000000000","message":"Each time we run restore_cinder_by_glance we create new image. In case something went wrong and we were not able to create volume image remains. Shouldn\u0027t we remove image even though we were not able to create cinder volume? I believe in such case we can fix something and rerun restore procedure without doing manual image cleanup. What do you think, guys?","commit_id":"357afe080c8ddcd71d0297b80056a65162909314"},{"author":{"_account_id":21644,"name":"Shangzhong Zhu","email":"zhu.shangzhong@zte.com.cn","username":"shangzhong.zhu"},"change_message_id":"bfb6ebbdeccc5736c4cd34a4aed81ec2a911d46d","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                cinder_id \u003d cinder.volumes.get(cinder_volume.id)"},{"line_number":137,"context_line":"                if cinder_id.status \u003d\u003d \u0027error\u0027:"},{"line_number":138,"context_line":"                    raise Exception(\"restore volume fails, volume %s has\""},{"line_number":139,"context_line":"                                    \"error state\" % cinder_id)"},{"line_number":140,"context_line":"                time.sleep(5)"},{"line_number":141,"context_line":"            except Exception as e:"},{"line_number":142,"context_line":"                LOG.error(e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5da102_7de8fdb4","line":139,"range":{"start_line":139,"start_character":52,"end_line":139,"end_character":61},"updated":"2016-11-01 02:54:56.000000000","message":"Replace \"cinder_id\" with \"cinder_volume.id\", because the \"cinder_id\" is a Class.","commit_id":"357afe080c8ddcd71d0297b80056a65162909314"}]}
