)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ace5a7176237b5490ed859bceaad6c9c19154c83","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Adelina Tuvenie \u003catuvenie@cloudbasesolutions.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-17 04:33:28 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adds Hyper-V imagechace cleanup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"At the moment the Hyper-V driver\u0027s imagecache only deals with caching"},{"line_number":10,"context_line":"the images in _base."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_f19db966","line":7,"updated":"2015-06-17 12:54:40.000000000","message":"imagechace \u003d\u003e imagecache","commit_id":"2c657696d4147109eb0333bcd18ad071ab831fe6"}],"nova/virt/hyperv/driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ace5a7176237b5490ed859bceaad6c9c19154c83","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        return self._vmops.get_console_output(instance)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def manage_image_cache(self, context, all_instances):"},{"line_number":254,"context_line":"        self._imagecache.update(context, all_instances)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_d1a8b58f","line":254,"updated":"2015-06-17 12:54:40.000000000","message":"could there be cases that the image cache aging blows away an image that is currently being spawned?\nDo you need to do locking for this?","commit_id":"2c657696d4147109eb0333bcd18ad071ab831fe6"}],"nova/virt/hyperv/imagecache.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9db04b233459ab772c359fc217d9ff4f2b7963cf","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        def fetch_image_if_not_existing():"},{"line_number":111,"context_line":"            vhd_path \u003d None"},{"line_number":112,"context_line":"            for format_ext in [\u0027vhd\u0027, \u0027vhdx\u0027]:"},{"line_number":113,"context_line":"                test_path \u003d base_vhd_path + \u0027.\u0027 + format_ext"},{"line_number":114,"context_line":"                if self._pathutils.exists(test_path):"},{"line_number":115,"context_line":"                    vhd_path \u003d test_path"},{"line_number":116,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_ea2369bb","line":113,"updated":"2015-08-12 11:13:21.000000000","message":"update the image timestamp here. this way you will not try to delete \"old, unused\" images while spawning a new vm.","commit_id":"9d3199217e6b23f0f61f2ca60bf47f3f5d6ee21a"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"9db04b233459ab772c359fc217d9ff4f2b7963cf","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        for img in backing_files[\u0027base_file\u0027]:"},{"line_number":184,"context_line":"            age_seconds \u003d self._pathutils.get_age_of_file(img)"},{"line_number":185,"context_line":"            if age_seconds \u003e max_age_seconds:"},{"line_number":186,"context_line":"                self._pathutils.remove(img)"},{"line_number":187,"context_line":"        for img in backing_files[\u0027resized_files\u0027]:"},{"line_number":188,"context_line":"            age_seconds \u003d self._pathutils.get_age_of_file(img)"},{"line_number":189,"context_line":"            if age_seconds \u003e max_age_seconds:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_b5c5c28e","line":186,"updated":"2015-08-12 11:13:21.000000000","message":"you should check if the image is currently locked or not. An image is locked if it\u0027s still fetching from glance, which means that it will be in use soon. Deleting a fetching image would be bad.","commit_id":"9d3199217e6b23f0f61f2ca60bf47f3f5d6ee21a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d1f529500949f39453da499b25aba53c9a6afc41","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        for entry in os.listdir(base_dir):"},{"line_number":193,"context_line":"            # remove file extension"},{"line_number":194,"context_line":"            file_name \u003d entry.split(\u0027.\u0027)[0]"},{"line_number":195,"context_line":"            if uuidutils.is_uuid_like(file_name):"},{"line_number":196,"context_line":"                originals.append(file_name)"},{"line_number":197,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_7c60c2cf","line":194,"updated":"2016-05-20 16:35:39.000000000","message":"is there something that guarantees there are no other . chars in the pathname?","commit_id":"f688fb3be9fe86f08239ca65b1723e4ac1a77ec1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d4291fd4ffca6f2654c5d70d145c79a36bba461f","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        for entry in os.listdir(base_dir):"},{"line_number":193,"context_line":"            # remove file extension"},{"line_number":194,"context_line":"            file_name \u003d entry.split(\u0027.\u0027)[0]"},{"line_number":195,"context_line":"            if uuidutils.is_uuid_like(file_name):"},{"line_number":196,"context_line":"                originals.append(file_name)"},{"line_number":197,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_ae3cadc8","line":194,"in_reply_to":"bab6814e_377653d7","updated":"2016-05-20 18:21:17.000000000","message":"I guess I was thinking about a path with a . somewhere else, but I guess this is listing the filenames only. Even still, just doing this would be easier:\n\n  file_name, ext \u003d entry.rsplit(\u0027.\u0027, 1)","commit_id":"f688fb3be9fe86f08239ca65b1723e4ac1a77ec1"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"c6d724a7f925756a408735ed9aaa885643e18907","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        for entry in os.listdir(base_dir):"},{"line_number":193,"context_line":"            # remove file extension"},{"line_number":194,"context_line":"            file_name \u003d entry.split(\u0027.\u0027)[0]"},{"line_number":195,"context_line":"            if uuidutils.is_uuid_like(file_name):"},{"line_number":196,"context_line":"                originals.append(file_name)"},{"line_number":197,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_377653d7","line":194,"in_reply_to":"bab6814e_7c60c2cf","updated":"2016-05-20 17:08:32.000000000","message":"No, but all files / images of interest have the same format: uuid.vhd, or uuid.vhdx. \n\nAll these images / files are created by the imagecache. If someone else outside of nova creates some other files in the base_dir folder, that\u0027s their choice.\n\nIf those foreign files are uuid-like, then they will deleted by the aging process. If not, the files will end up in the \u0027unexplained_images\u0027 list.\n\nBut now that I think about it, having a file uuid.foo might cause problems..","commit_id":"f688fb3be9fe86f08239ca65b1723e4ac1a77ec1"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"20e594df8a64fdaed050c1998de3f647cf3dee82","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        for entry in os.listdir(base_dir):"},{"line_number":193,"context_line":"            # remove file extension"},{"line_number":194,"context_line":"            file_name \u003d entry.split(\u0027.\u0027)[0]"},{"line_number":195,"context_line":"            if uuidutils.is_uuid_like(file_name):"},{"line_number":196,"context_line":"                originals.append(file_name)"},{"line_number":197,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_b62333bc","line":194,"in_reply_to":"bab6814e_ae3cadc8","updated":"2016-05-23 10:26:53.000000000","message":"I think os.path.splitext should do the trick in this case.","commit_id":"f688fb3be9fe86f08239ca65b1723e4ac1a77ec1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"00aa0a08a632aaf98eb69a3f66965ec4c3448ff8","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        image_id \u003d instance.image_ref"},{"line_number":170,"context_line":"        return images.get_info(context, image_id)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _age_and_verify_cached_images(self, context, all_instances, base_dir):"},{"line_number":173,"context_line":"        for img in self.originals:"},{"line_number":174,"context_line":"            if img in self.used_images:"},{"line_number":175,"context_line":"                # change the timestamp on the image so as to reflect the last"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_7a770da0","line":172,"range":{"start_line":172,"start_character":17,"end_line":172,"end_character":23},"updated":"2016-06-01 09:19:44.000000000","message":"I note there is no MD5 verification here, but I think thats OK, particularly given the debate around removing it.","commit_id":"df499b55522ced1efd3006a394e80a7bf794c4e4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"00aa0a08a632aaf98eb69a3f66965ec4c3448ff8","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    @synchronize_with_path"},{"line_number":212,"context_line":"    def remove_old_image(self, img):"},{"line_number":213,"context_line":"        self._pathutils.remove(img)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def update(self, context, all_instances):"},{"line_number":216,"context_line":"        base_vhd_dir \u003d self._pathutils.get_base_vhd_dir()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_9aa7510a","line":213,"updated":"2016-06-01 09:19:44.000000000","message":"unsure if we will hit races where two things try to delete the same image, but this seems like a good starting point.","commit_id":"df499b55522ced1efd3006a394e80a7bf794c4e4"}],"nova/virt/hyperv/pathutils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ace5a7176237b5490ed859bceaad6c9c19154c83","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                     image_name + \u0027.\u0027 + ext.lower())"},{"line_number":267,"context_line":"            if self.exists(file_path):"},{"line_number":268,"context_line":"                return file_path"},{"line_number":269,"context_line":"        return None"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def get_age_of_file(self, file_name):"},{"line_number":272,"context_line":"        return time.time() - os.path.getmtime(file_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_71dbe94f","line":269,"updated":"2015-06-17 12:54:40.000000000","message":"you do not need this line. by default a method returns None","commit_id":"2c657696d4147109eb0333bcd18ad071ab831fe6"}]}
