)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8a8072065ce3589cf544f8a397e9ad5c86d6ab9a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Now we store the image format to a \u0027disk.info\u0027 file, for Qcow2 and Raw"},{"line_number":14,"context_line":"images, and only autodetect for images that have never been written to"},{"line_number":15,"context_line":"that file.  Since glance takes the appropriate security precautions on"},{"line_number":16,"context_line":"image upload, this should be sufficient and backward-compatible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I2016efdb3f49a44ec4d677ac596eacc97871f30a"},{"line_number":19,"context_line":"Closes-bug: #1221190"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAWH%2F%2Bmng%3D","line":16,"updated":"2014-03-25 16:13:03.000000000","message":"Glance takes no security precautions on anything uploaded to it. If a user sets disk_format to \"qcow2\" (or \"raw\"), Glance trusts the user entirely.\n\nThe only thing I can think of that Glance would be useful for here is that Glance returns the checksum of the block data that was given to it (it does an inline md5 checksum of the bytestream it receives and validates that any checksum supplied to it during upload matches the checksum it populates during upload).\n\nNova could store this checksum from Glance and compare it to the checksum of the rescue image perhaps?","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"7b620713964f62781f4c8f4cb7e5c60bbe719603","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Now we store the image format to a \u0027disk.info\u0027 file, for Qcow2 and Raw"},{"line_number":14,"context_line":"images, and only autodetect for images that have never been written to"},{"line_number":15,"context_line":"that file.  Since glance takes the appropriate security precautions on"},{"line_number":16,"context_line":"image upload, this should be sufficient and backward-compatible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I2016efdb3f49a44ec4d677ac596eacc97871f30a"},{"line_number":19,"context_line":"Closes-bug: #1221190"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAWH%2F%2Bmkw%3D","line":16,"in_reply_to":"AAAAWH%2F%2Bmng%3D","updated":"2014-03-25 16:31:36.000000000","message":"The idea is to keep someone from changing the format after-the-fact.  format attacks during the glance upload process are a separate issue.  As discussed on IRC, I will change the commit message.","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4bcc2d8dc0466006184d5684ab013e1ab596d895","unresolved":false,"context_lines":[{"line_number":14,"context_line":"images, and only autodetect for images that have never been written to"},{"line_number":15,"context_line":"that file.  Since glance takes the appropriate security precautions on"},{"line_number":16,"context_line":"image upload, this should be sufficient and backward-compatible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I2016efdb3f49a44ec4d677ac596eacc97871f30a"},{"line_number":19,"context_line":"Closes-bug: #1221190"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAWH%2F%2Bmpc%3D","line":17,"updated":"2014-03-25 16:09:16.000000000","message":"Looks like this should be tagged with SecurityImpact per:\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"7b620713964f62781f4c8f4cb7e5c60bbe719603","unresolved":false,"context_lines":[{"line_number":14,"context_line":"images, and only autodetect for images that have never been written to"},{"line_number":15,"context_line":"that file.  Since glance takes the appropriate security precautions on"},{"line_number":16,"context_line":"image upload, this should be sufficient and backward-compatible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I2016efdb3f49a44ec4d677ac596eacc97871f30a"},{"line_number":19,"context_line":"Closes-bug: #1221190"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAWH%2F%2Bmc0%3D","line":17,"in_reply_to":"AAAAWH%2F%2Bmpc%3D","updated":"2014-03-25 16:31:36.000000000","message":"Done","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e93497b2d9078ac12b98cb1809f7b650ec8ec1c","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"SecurityImpact"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Co-atuhored-by: Nikola Dipanov \u003cndipanov@redhat.com\u003e"},{"line_number":20,"context_line":"Closes-bug: #1221190"},{"line_number":21,"context_line":"Change-Id: I2016efdb3f49a44ec4d677ac596eacc97871f30a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"AAAAWH%2F%2BWXI%3D","line":19,"updated":"2014-03-27 13:23:00.000000000","message":"Should be \"Co-Authored-By:\"","commit_id":"fc3080034bf996291e222b8809c7d371547dbe39"}],"nova/exception.py":[{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"dd80123a095c8518b707cd8a61b98c3e4962ba3e","unresolved":false,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"class InvalidDiskInfo(Invalid):"},{"line_number":467,"context_line":"    msg_fmt \u003d _(\"Disk info file is invalid: %(reason)\")"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"class DiskInfoReadWriteFail(Invalid):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAWH%2F%2Bbb4%3D","line":467,"updated":"2014-03-26 20:38:51.000000000","message":"Shouldn\u0027t this be \"Disk info file is invalid: %(reason)s\" ?","commit_id":"0c13e1ad457df26cd627ced82c4d8a3ef49e297a"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"b61c3575db21ef41f3666986420e055015a33864","unresolved":false,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"class InvalidDiskInfo(Invalid):"},{"line_number":467,"context_line":"    msg_fmt \u003d _(\"Disk info file is invalid: %(reason)\")"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"class DiskInfoReadWriteFail(Invalid):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAWH%2F%2BbHI%3D","line":467,"in_reply_to":"AAAAWH%2F%2Bbb4%3D","updated":"2014-03-26 21:28:47.000000000","message":"Done","commit_id":"0c13e1ad457df26cd627ced82c4d8a3ef49e297a"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"dd80123a095c8518b707cd8a61b98c3e4962ba3e","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"class DiskInfoReadWriteFail(Invalid):"},{"line_number":471,"context_line":"    msg_fmt \u003d _(\"Failed to read or write disk info file: %(reason)\")"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"class ImageUnacceptable(Invalid):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAWH%2F%2Bbbs%3D","line":471,"updated":"2014-03-26 20:38:51.000000000","message":"Same as InvalidDiskInfo.msg_fmt","commit_id":"0c13e1ad457df26cd627ced82c4d8a3ef49e297a"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"b61c3575db21ef41f3666986420e055015a33864","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"class DiskInfoReadWriteFail(Invalid):"},{"line_number":471,"context_line":"    msg_fmt \u003d _(\"Failed to read or write disk info file: %(reason)\")"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"class ImageUnacceptable(Invalid):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAWH%2F%2BbHA%3D","line":471,"in_reply_to":"AAAAWH%2F%2Bbbs%3D","updated":"2014-03-26 21:28:47.000000000","message":"Done","commit_id":"0c13e1ad457df26cd627ced82c4d8a3ef49e297a"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"2f438d9855f60659b69846a6aaf019bd0d1cbbda","unresolved":false,"context_lines":[{"line_number":2971,"context_line":"                                                        inst_type)"},{"line_number":2972,"context_line":"                    devices.append(diskos)"},{"line_number":2973,"context_line":""},{"line_number":2974,"context_line":"                elif \u0027disk.local\u0027 in disk_mapping:"},{"line_number":2975,"context_line":"                    disklocal \u003d self.get_guest_disk_config(instance,"},{"line_number":2976,"context_line":"                                                           \u0027disk.local\u0027,"},{"line_number":2977,"context_line":"                                                           disk_mapping,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BgIg%3D","line":2974,"updated":"2014-03-26 11:13:30.000000000","message":"This does not seem to be related in any way, and is not even correct -we can easily have both disk and disk.locak which is a default ephemeral drive","commit_id":"b6f41e2bc5640e98e863246dacd097ddb7705619"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"0149699687d94d845f85d2b99219af5cf8062e60","unresolved":false,"context_lines":[{"line_number":2971,"context_line":"                                                        inst_type)"},{"line_number":2972,"context_line":"                    devices.append(diskos)"},{"line_number":2973,"context_line":""},{"line_number":2974,"context_line":"                elif \u0027disk.local\u0027 in disk_mapping:"},{"line_number":2975,"context_line":"                    disklocal \u003d self.get_guest_disk_config(instance,"},{"line_number":2976,"context_line":"                                                           \u0027disk.local\u0027,"},{"line_number":2977,"context_line":"                                                           disk_mapping,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BgEc%3D","line":2974,"in_reply_to":"AAAAWH%2F%2BgIg%3D","updated":"2014-03-26 11:25:20.000000000","message":"Done","commit_id":"b6f41e2bc5640e98e863246dacd097ddb7705619"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"cf20c6700d7d339fe147746797fcdcbd0fedc21a","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                try:"},{"line_number":278,"context_line":"                    parts \u003d jsonutils.loads(line)"},{"line_number":279,"context_line":"                except (TypeError, ValueError):"},{"line_number":280,"context_line":"                    parts \u003d []"},{"line_number":281,"context_line":"                if len(parts) \u003d\u003d 2:"},{"line_number":282,"context_line":"                    (path, driver_format) \u003d parts"},{"line_number":283,"context_line":"                    if path \u003d\u003d self.path:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2Bmoc%3D","line":280,"updated":"2014-03-25 16:11:32.000000000","message":"So here we\u0027re silently ignoring a corrupt file?  That seems bad.\n\nThere\u0027s also a bunch of places that could raise OSError and we\u0027re ignoring all of that.\n\nAre we sure that will be handled gracefully?","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"7b620713964f62781f4c8f4cb7e5c60bbe719603","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                try:"},{"line_number":278,"context_line":"                    parts \u003d jsonutils.loads(line)"},{"line_number":279,"context_line":"                except (TypeError, ValueError):"},{"line_number":280,"context_line":"                    parts \u003d []"},{"line_number":281,"context_line":"                if len(parts) \u003d\u003d 2:"},{"line_number":282,"context_line":"                    (path, driver_format) \u003d parts"},{"line_number":283,"context_line":"                    if path \u003d\u003d self.path:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BmdI%3D","line":280,"in_reply_to":"AAAAWH%2F%2Bmoc%3D","updated":"2014-03-25 16:31:36.000000000","message":"I\u0027m treating a bad file just like no file.  We fail to get any useful information, and then later overwrite it.  Do you think we should raise an exception instead if there\u0027s an invalid file?\n\nWe could certainly catch OSError all over, but the only cases I can think of are a real disk failure (not much we can do there; it\u0027s going to spew errors somewhere) or a permission denied due to a software bug or an admin user manually messing with permissions.  Hmm.","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"cf20c6700d7d339fe147746797fcdcbd0fedc21a","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    parts \u003d jsonutils.loads(line)"},{"line_number":279,"context_line":"                except (TypeError, ValueError):"},{"line_number":280,"context_line":"                    parts \u003d []"},{"line_number":281,"context_line":"                if len(parts) \u003d\u003d 2:"},{"line_number":282,"context_line":"                    (path, driver_format) \u003d parts"},{"line_number":283,"context_line":"                    if path \u003d\u003d self.path:"},{"line_number":284,"context_line":"                        return driver_format"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BmrM%3D","line":281,"updated":"2014-03-25 16:11:32.000000000","message":"Seems like key/value pairs in a dict would be a lot easier to deal with than a list like this","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"7b620713964f62781f4c8f4cb7e5c60bbe719603","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    parts \u003d jsonutils.loads(line)"},{"line_number":279,"context_line":"                except (TypeError, ValueError):"},{"line_number":280,"context_line":"                    parts \u003d []"},{"line_number":281,"context_line":"                if len(parts) \u003d\u003d 2:"},{"line_number":282,"context_line":"                    (path, driver_format) \u003d parts"},{"line_number":283,"context_line":"                    if path \u003d\u003d self.path:"},{"line_number":284,"context_line":"                        return driver_format"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BmhI%3D","line":281,"in_reply_to":"AAAAWH%2F%2BmrM%3D","updated":"2014-03-25 16:31:36.000000000","message":"I think \"a lot\" is an exaggeration, since we\u0027re talking about a handful of lines of simple code.  I can change it from a list to a dict but it feels like churn.","commit_id":"046fc47c006b46aab6023a269608ab26064d083a"},{"author":{"_account_id":9533,"name":"Eiichi Aikawa","email":"aikawa@mxk.nes.nec.co.jp","username":"EiichiAikawa"},"change_message_id":"ae69e7ac15adda8134c238504541cc3d5a662173","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                            lock_path\u003dself.lock_path)"},{"line_number":262,"context_line":"        def write_to_disk_info_file():"},{"line_number":263,"context_line":"            # Use os.open to create it without group or world write permission."},{"line_number":264,"context_line":"            fd \u003d os.open(self.disk_info_path, os.O_WRONLY|os.O_CREAT, 0o644)"},{"line_number":265,"context_line":"            disk_info_file \u003d os.fdopen(fd, \"w\")"},{"line_number":266,"context_line":"            disk_info_file.write(\u0027%s\\n\u0027 %"},{"line_number":267,"context_line":"                                 jsonutils.dumps((self.path, driver_format)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BiL8%3D","line":264,"updated":"2014-03-26 04:55:27.000000000","message":"According to error log, whitespace will be needed just before/after |.","commit_id":"7bf5492ddad613b99277452e470b60ac856d38d1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"35c3d32bbfc2ed66e46e20f84db34a4d95849327","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                try:"},{"line_number":278,"context_line":"                    parts \u003d jsonutils.loads(line)"},{"line_number":279,"context_line":"                except (TypeError, ValueError):"},{"line_number":280,"context_line":"                    parts \u003d []"},{"line_number":281,"context_line":"                if len(parts) \u003d\u003d 2:"},{"line_number":282,"context_line":"                    (path, driver_format) \u003d parts"},{"line_number":283,"context_line":"                    if path \u003d\u003d self.path:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BmKU%3D","line":280,"updated":"2014-03-25 17:01:59.000000000","message":"Agreed with russellb here - if there\u0027s something wrong with the data file. We should probably error out the instance rather then pretend it\u0027s cool. Other errors will error it out as well so we can patch it up later.","commit_id":"7bf5492ddad613b99277452e470b60ac856d38d1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"35c3d32bbfc2ed66e46e20f84db34a4d95849327","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    parts \u003d jsonutils.loads(line)"},{"line_number":279,"context_line":"                except (TypeError, ValueError):"},{"line_number":280,"context_line":"                    parts \u003d []"},{"line_number":281,"context_line":"                if len(parts) \u003d\u003d 2:"},{"line_number":282,"context_line":"                    (path, driver_format) \u003d parts"},{"line_number":283,"context_line":"                    if path \u003d\u003d self.path:"},{"line_number":284,"context_line":"                        return driver_format"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BmJk%3D","line":281,"updated":"2014-03-25 17:01:59.000000000","message":"And the k,v pairs too. like russellb said","commit_id":"7bf5492ddad613b99277452e470b60ac856d38d1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6ebac608ffbdaed4d037047a3758d72886840691","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            disk_info_file.close()"},{"line_number":269,"context_line":"            # Ensure the file is always owned by the nova user so qemu can\u0027t"},{"line_number":270,"context_line":"            # write it."},{"line_number":271,"context_line":"            utils.chown(self.disk_info_path, owner_uid\u003dos.getuid())"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        try:"},{"line_number":274,"context_line":"            if (self.disk_info_path is not None and"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2BYWk%3D","line":271,"updated":"2014-03-27 07:54:33.000000000","message":"At this point we may not really need this since we are not chowning it as root but not a big deal","commit_id":"7fc3440cd3ad799a743797077aaffb0a3910d1e4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6ebac608ffbdaed4d037047a3758d72886840691","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    try:"},{"line_number":279,"context_line":"                        dct \u003d jsonutils.loads(line)"},{"line_number":280,"context_line":"                    except (TypeError, ValueError) as e:"},{"line_number":281,"context_line":"                        raise exception.InvalidDiskInfo(reason\u003de.message)"},{"line_number":282,"context_line":"                    for path, driver_format in dct.iteritems():"},{"line_number":283,"context_line":"                        if path \u003d\u003d self.path:"},{"line_number":284,"context_line":"                            return driver_format"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2BYXA%3D","line":281,"updated":"2014-03-27 07:54:33.000000000","message":"Same as below","commit_id":"7fc3440cd3ad799a743797077aaffb0a3910d1e4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"6ebac608ffbdaed4d037047a3758d72886840691","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                fileutils.ensure_tree(os.path.dirname(self.disk_info_path))"},{"line_number":288,"context_line":"                write_to_disk_info_file()"},{"line_number":289,"context_line":"        except OSError as e:"},{"line_number":290,"context_line":"            raise exception.DiskInfoReadWriteFail(reason\u003de.message)"},{"line_number":291,"context_line":"        return driver_format"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F%2BYXM%3D","line":290,"updated":"2014-03-27 07:54:33.000000000","message":"We should really not use e.message as it has been deprecated since 2.5 but not a big deal for this patch","commit_id":"7fc3440cd3ad799a743797077aaffb0a3910d1e4"}]}
