)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b39e3a0483028bdeffa1d0154fc5558fc76adc2b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  178b3b5e38c37d6b4474b013be001475  swap1.img"},{"line_number":51,"context_line":"  6cd14d0bcfb5fae6c924e13fcbf58ae6  swap2.img"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The problem with this is that if we migrate (cold or live) an"},{"line_number":54,"context_line":"instance, we will use the same overlay file for the swap disk with the"},{"line_number":55,"context_line":"host-local, and therefore different, backing file. In practise the"},{"line_number":56,"context_line":"chances of this resulting in data corruption are low, but it is not a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_30134610","line":53,"range":{"start_line":53,"start_character":36,"end_line":53,"end_character":58},"updated":"2019-03-05 18:17:27.000000000","message":"Cold shouldn\u0027t be a problem AFAIK because data in the swap file is effectively garbage at swapon time. For live, anything that is not mapped in the overlay hasn\u0027t been written-to by the instance, and thus isn\u0027t going to be considered valid on read yet. So I don\u0027t think there\u0027s realistically any case where a bad rebase would actually affect us.","commit_id":"5b64ba0a109178363fbf89c12d8e758d11887001"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b39e3a0483028bdeffa1d0154fc5558fc76adc2b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"chances of this resulting in data corruption are low, but it is not a"},{"line_number":57,"context_line":"good idea, and we shouldn\u0027t do it."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"TL;DR The best solution here is to stop storing swap files in the"},{"line_number":60,"context_line":"image cache, and provision a new one every time. That unfortunately"},{"line_number":61,"context_line":"requires invasive changes to the libvirt driver."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Secondly, note that swap disk backing files are provisioned based on"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_f0f4ded1","line":60,"range":{"start_line":59,"start_character":40,"end_line":60,"end_character":11},"updated":"2019-03-05 18:17:27.000000000","message":"++","commit_id":"5b64ba0a109178363fbf89c12d8e758d11887001"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b39e3a0483028bdeffa1d0154fc5558fc76adc2b","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"TL;DR The best solution here is to stop storing swap files in the"},{"line_number":60,"context_line":"image cache, and provision a new one every time. That unfortunately"},{"line_number":61,"context_line":"requires invasive changes to the libvirt driver."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Secondly, note that swap disk backing files are provisioned based on"},{"line_number":64,"context_line":"size. Unlike glance images, which is the primary purpose of the image"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_302ca646","line":61,"updated":"2019-03-05 18:17:27.000000000","message":"I believe you, but it also seems like there might be a middle ground of storing them in the cache, but also just re-creating them on boot.","commit_id":"5b64ba0a109178363fbf89c12d8e758d11887001"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b39e3a0483028bdeffa1d0154fc5558fc76adc2b","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Lastly, note that although we age backing files for swap disks, we"},{"line_number":70,"context_line":"don\u0027t age them for ephemeral disks. For the same reasons as swap"},{"line_number":71,"context_line":"disks, we should also not store backing files for ephemeral disks in"},{"line_number":72,"context_line":"the image cache."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Closes-Bug: #1804262"},{"line_number":75,"context_line":"Related-Bug: #1253991"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_50d29236","line":72,"range":{"start_line":71,"start_character":10,"end_line":72,"end_character":16},"updated":"2019-03-05 18:17:27.000000000","message":"Also ++","commit_id":"5b64ba0a109178363fbf89c12d8e758d11887001"}],"nova/virt/libvirt/imagecache.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b39e3a0483028bdeffa1d0154fc5558fc76adc2b","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                  {\u0027id\u0027: img_id, \u0027base_file\u0027: base_file})"},{"line_number":330,"context_line":"        nova.privsep.path.utime(base_file)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _age_and_verify_swap_images(self, context, base_dir):"},{"line_number":333,"context_line":"        LOG.debug(\u0027Verify swap images\u0027)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        for ent in self.back_swap_images:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_f03a9e32","side":"PARENT","line":332,"updated":"2019-03-05 18:17:27.000000000","message":"I know what you\u0027re going to say but..\n\nIs there any reason we wouldn\u0027t continue to let it collect the swap images, but not do anything with them? Meaning, basically leave everything you\u0027ve removed at the top to scan/store swap images, but just remove this (and the _remove_swap_file() above) method.\n\nI guess my revelation about the fact that this will ignore debris in the directory bothers me and this kindof extends it. We have these things formatted in a specific way so we can identify them, so I feel like we *should* identify them even if we specifically decide not to age/remove them.","commit_id":"c43c1d3fb9da5dd0a13e1f15623a696212f095ff"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b39e3a0483028bdeffa1d0154fc5558fc76adc2b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        \"\"\"Store a base image for later examination.\"\"\""},{"line_number":105,"context_line":"        entpath \u003d os.path.join(base_dir, ent)"},{"line_number":106,"context_line":"        if os.path.isfile(entpath):"},{"line_number":107,"context_line":"            self.unexplained_images.append(entpath)"},{"line_number":108,"context_line":"            if original:"},{"line_number":109,"context_line":"                self.originals.append(entpath)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_f09e1e53","line":107,"updated":"2019-03-05 18:17:27.000000000","message":"So I was thinking that removing the swap case might cause them to be swept up as \"unexplained\", but it does not look like it will. Only images that are formatted like a base image are considered unexplained, which means any random file debris in the directory is, I guess, ignored (not even considered unexplained).","commit_id":"5b64ba0a109178363fbf89c12d8e758d11887001"}]}
