)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"9504316498312b840b1e85b77a84929822c75c92","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Guan Qiang \u003chzguanqiang@corp.netease.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-10-23 13:19:01 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Image device should be reset in mount() and teardown()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When fixing bug#1208387, image device name is returned in function"},{"line_number":10,"context_line":"setup_container. But it\u0027s missed to reset in function mount() and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATX%2F%2F%2F1s%3D","line":7,"updated":"2013-10-23 05:21:53.000000000","message":"nit: we\u0027d better start with LXC: title","commit_id":"2b8f96d80d3836dea94203237317c0e9f23d91d6"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"9504316498312b840b1e85b77a84929822c75c92","unresolved":false,"context_lines":[{"line_number":11,"context_line":"teardown()."},{"line_number":12,"context_line":"This patch is to fix it."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1243108"},{"line_number":15,"context_line":"Related-Bug: #1208387"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I2aaed6f3367edce4fb23b78f0e979440954609a8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATX%2F%2F%2F1o%3D","line":14,"updated":"2013-10-23 05:21:53.000000000","message":"can you try Closes-bug: #1243108, it is weird that it hasn\u0027t been linked with LP.","commit_id":"2b8f96d80d3836dea94203237317c0e9f23d91d6"}],"nova/virt/disk/api.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        self.partition \u003d partition"},{"line_number":216,"context_line":"        self.mount_dir \u003d mount_dir"},{"line_number":217,"context_line":"        self.use_cow \u003d use_cow"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        self.device \u003d None"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        # Internal"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxKQ%3D","line":218,"updated":"2013-11-20 13:20:11.000000000","message":"Can remove this.","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                                                  imgfmt)"},{"line_number":282,"context_line":"        if mounter.do_mount():"},{"line_number":283,"context_line":"            self._mounter \u003d mounter"},{"line_number":284,"context_line":"            self.device \u003d self._mounter.device"},{"line_number":285,"context_line":"        else:"},{"line_number":286,"context_line":"            LOG.debug(mounter.error)"},{"line_number":287,"context_line":"            self._errors.append(mounter.error)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxLM%3D","line":284,"updated":"2013-11-20 13:20:11.000000000","message":"Don\u0027t add this, instead do\n\n  return self._mounter.device","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            self.device \u003d self._mounter.device"},{"line_number":285,"context_line":"        else:"},{"line_number":286,"context_line":"            LOG.debug(mounter.error)"},{"line_number":287,"context_line":"            self._errors.append(mounter.error)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        return bool(self._mounter)"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxLI%3D","line":287,"updated":"2013-11-20 13:20:11.000000000","message":"And here do\n\n   return None","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            LOG.debug(mounter.error)"},{"line_number":287,"context_line":"            self._errors.append(mounter.error)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        return bool(self._mounter)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def umount(self):"},{"line_number":292,"context_line":"        \"\"\"Umount a mount point from the filesystem.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxLQ%3D","line":289,"updated":"2013-11-20 13:20:11.000000000","message":"And just delete this.","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e5afb28db83bc228db9548f31b20eac2be7ef951","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        \"\"\"Umount a mount point from the filesystem.\"\"\""},{"line_number":293,"context_line":"        if self._mounter:"},{"line_number":294,"context_line":"            self._mounter.do_umount()"},{"line_number":295,"context_line":"            self._mounter \u003d None"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def teardown(self):"},{"line_number":298,"context_line":"        \"\"\"Remove a disk image from the file system.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FGgM%3D","line":295,"updated":"2013-11-14 12:01:45.000000000","message":"You\u0027re missing a call to set self.device \u003d None here.","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        \"\"\"Umount a mount point from the filesystem.\"\"\""},{"line_number":293,"context_line":"        if self._mounter:"},{"line_number":294,"context_line":"            self._mounter.do_umount()"},{"line_number":295,"context_line":"            self._mounter \u003d None"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def teardown(self):"},{"line_number":298,"context_line":"        \"\"\"Remove a disk image from the file system.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxLE%3D","line":295,"in_reply_to":"AAAATn%2F%2FDpU%3D","updated":"2013-11-20 13:20:11.000000000","message":"The fact that do_umount() won\u0027t delete the device isn\u0027t relevant to this code though.\n\nThe only time the \u0027self.device\u0027 property appears to be used, is immediately after the \u0027mount\u0027 call in \"setup_container\".  The \u0027mount\u0027 call should just directly return the device name, so we don\u0027t need to bother with having a \u0027self.device\u0027 property at all.","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":6463,"name":"Jackie","email":"guanqiang85@gmail.com","username":"hzguanqiang"},"change_message_id":"d7235d64f22326d994b128faf4925dc0ec61dbd4","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        \"\"\"Umount a mount point from the filesystem.\"\"\""},{"line_number":293,"context_line":"        if self._mounter:"},{"line_number":294,"context_line":"            self._mounter.do_umount()"},{"line_number":295,"context_line":"            self._mounter \u003d None"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def teardown(self):"},{"line_number":298,"context_line":"        \"\"\"Remove a disk image from the file system.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FDpU%3D","line":295,"in_reply_to":"AAAATn%2F%2FGgM%3D","updated":"2013-11-15 02:50:49.000000000","message":"Well, Daniel. There are two steps when preparing a disk image for lxc container to use: firstly link the disk file to a device, then mount the device to lxc rootfs. do_umount() won\u0027t unlink the device. So I think there self.device can not be set to None.","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e5afb28db83bc228db9548f31b20eac2be7ef951","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            if self._mounter:"},{"line_number":301,"context_line":"                self._mounter.do_teardown()"},{"line_number":302,"context_line":"                self._mounter \u003d None"},{"line_number":303,"context_line":"                self.device \u003d None"},{"line_number":304,"context_line":"        finally:"},{"line_number":305,"context_line":"            if self._mkdir:"},{"line_number":306,"context_line":"                os.rmdir(self.mount_dir)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FGf4%3D","line":303,"updated":"2013-11-14 12:01:45.000000000","message":"Overall I think that this copying of \u0027self._mounter.device\u0027 into \u0027self.device\u0027 does not appear to buy us anything and clearly causes bugs.\n\nIMHO, we would be better off killing the \u0027self.device\u0027 fieldn entirely and adding\n\n  def get_device(self):\n       return self._mounter.get_device()\n\n\nand also updating the \u0027Mount\u0027 class to get a \u0027get_device\u0027 method, so we can stop accessing internal fields of these classes.","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            if self._mounter:"},{"line_number":301,"context_line":"                self._mounter.do_teardown()"},{"line_number":302,"context_line":"                self._mounter \u003d None"},{"line_number":303,"context_line":"                self.device \u003d None"},{"line_number":304,"context_line":"        finally:"},{"line_number":305,"context_line":"            if self._mkdir:"},{"line_number":306,"context_line":"                os.rmdir(self.mount_dir)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxK4%3D","line":303,"in_reply_to":"AAAATn%2F%2FDnw%3D","updated":"2013-11-20 13:20:11.000000000","message":"The bug I\u0027m refering to is the one this patch is trying to solve - that \u0027self.device\u0027 is not updated correctly.\n\nDeleting self.device entirely will resolve this in a nicer manner IMHO","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":6463,"name":"Jackie","email":"guanqiang85@gmail.com","username":"hzguanqiang"},"change_message_id":"d7235d64f22326d994b128faf4925dc0ec61dbd4","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            if self._mounter:"},{"line_number":301,"context_line":"                self._mounter.do_teardown()"},{"line_number":302,"context_line":"                self._mounter \u003d None"},{"line_number":303,"context_line":"                self.device \u003d None"},{"line_number":304,"context_line":"        finally:"},{"line_number":305,"context_line":"            if self._mkdir:"},{"line_number":306,"context_line":"                os.rmdir(self.mount_dir)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FDnw%3D","line":303,"in_reply_to":"AAAATn%2F%2FGf4%3D","updated":"2013-11-15 02:50:49.000000000","message":"I have a different opinion, As this class is preparing a diskImage for lxc container, device is certainly an attribute of this diskImage as the image is linked to device. As I noticed in commitmsg, this commit is a complement for bug#1208387. And I don\u0027t know what you mean by saying \"clearly causes bugs\". If this will clearly cause bugs, Please Point it Out, Thanks.","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    Returns path of image device which is mounted to the container directory."},{"line_number":364,"context_line":"    \"\"\""},{"line_number":365,"context_line":"    img \u003d _DiskImage(image\u003dimage, use_cow\u003duse_cow, mount_dir\u003dcontainer_dir)"},{"line_number":366,"context_line":"    if not img.mount():"},{"line_number":367,"context_line":"        LOG.error(_(\"Failed to mount container filesystem \u0027%(image)s\u0027 \""},{"line_number":368,"context_line":"                    \"on \u0027%(target)s\u0027: %(errors)s\"),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxKw%3D","line":365,"updated":"2013-11-20 13:20:11.000000000","message":"Change this to\n\n   dev \u003d img.mount()\n\n   if dev is None:","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f5f1afd77ec8bfd7e538430b5981390a05d69aed","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                  {\"image\": img, \"target\": container_dir,"},{"line_number":370,"context_line":"                   \"errors\": img.errors})"},{"line_number":371,"context_line":"        raise exception.NovaException(img.errors)"},{"line_number":372,"context_line":"    else:"},{"line_number":373,"context_line":"        return img.device"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BxKg%3D","line":372,"updated":"2013-11-20 13:20:11.000000000","message":"And here, remove the \u0027else\u0027 clause and just do\n\n   return dev","commit_id":"39a3b1131a5d92500ef90f76646e92c5422f65ca"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"45b2e0305f753b7a815cdce4efab32fbcb75873a","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        else:"},{"line_number":283,"context_line":"            LOG.debug(mounter.error)"},{"line_number":284,"context_line":"            self._errors.append(mounter.error)"},{"line_number":285,"context_line":"            return None"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def umount(self):"},{"line_number":288,"context_line":"        \"\"\"Umount a mount point from the filesystem.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2BHhQ%3D","line":285,"updated":"2013-12-02 12:22:29.000000000","message":"you do not need to to return None - this is the default","commit_id":"0e44d9a69101b9f0b1f2a08b4800c19493d5443c"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"0930fec4e2361c355e05fe200cfcf164d5ac4168","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        else:"},{"line_number":283,"context_line":"            LOG.debug(mounter.error)"},{"line_number":284,"context_line":"            self._errors.append(mounter.error)"},{"line_number":285,"context_line":"            return None"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def umount(self):"},{"line_number":288,"context_line":"        \"\"\"Umount a mount point from the filesystem.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2BHf8%3D","line":285,"in_reply_to":"AAAATn%2F%2BHhQ%3D","updated":"2013-12-02 12:27:41.000000000","message":"Given that this method returns a non-None value in other codepaths, I think it is better to be explicit that this codepath is deliberately returning None.","commit_id":"0e44d9a69101b9f0b1f2a08b4800c19493d5443c"}]}
