)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cb104235e9c586d6009204862643e6bf384d05e4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gerrit Code Review \u003creview@openstack.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-01-22 17:30:31 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Pass extra options to allow libguestfs mount rbd volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1257674"},{"line_number":10,"context_line":"Change-Id: Ia69d6be022412eef979d00bc6213d0622ddfb327"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAUH%2F%2BolY%3D","line":7,"updated":"2014-01-23 17:49:41.000000000","message":"You need to fully describe the problem being addressed here not expect people to read the bug report\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages","commit_id":"9ed3c6ded975444370aff1926ef700ee0ad8c7d3"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a863b6f3f913d4e0a79148d5d17960c358c83977","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2014-04-09 14:55:53 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Pass extra options to allow libguestfs mount rbd volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1257674"},{"line_number":10,"context_line":"Change-Id: Ia69d6be022412eef979d00bc6213d0622ddfb327"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"AAAAW3%2F%2F7s0%3D","line":8,"updated":"2014-04-09 12:05:08.000000000","message":"You need to expand this commit message to describe the original problem and what is being done to fix it.\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages","commit_id":"83922792cd35ec3696f642cfab833294cc274625"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eb6be56ef2d058cd6423cb55e6879f7880802f19","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2014-01-18 12:56:33 +0200"},{"line_number":4,"context_line":"Commit:     Pavel Kirpichyov \u003cpavel.kirpichyov@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-04-17 10:58:54 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Pass extra options to allow libguestfs mount rbd volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1257674"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"AAAAXH%2F%2FXOg%3D","line":6,"updated":"2014-04-22 09:48:53.000000000","message":"please add some explanations here.\n\nthis looks like a BP and not necessarily like a bug fix","commit_id":"2a5e89200e3a1400a75cb397632bc1d5de1c10a3"}],"etc/nova/nova.conf.sample":[{"author":{"_account_id":7593,"name":"Haomai Wang","email":"haomaiwang@gmail.com","username":"HaomaiWang"},"change_message_id":"43f6fb9b66ffda36ff2e8824b39085783ec43177","unresolved":false,"context_lines":[{"line_number":2957,"context_line":"#rbd_secret_uuid\u003d\u003cNone\u003e"},{"line_number":2958,"context_line":""},{"line_number":2959,"context_line":"# a list of rbd servers (list value)"},{"line_number":2960,"context_line":"#rbd_server\u003d"},{"line_number":2961,"context_line":""},{"line_number":2962,"context_line":"# Dir where the nfs volume is mounted on the compute node"},{"line_number":2963,"context_line":"# (string value)"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAUH%2F%2B%2FNM%3D","line":2960,"updated":"2014-01-20 02:08:36.000000000","message":"It seemed we can get it via rbd_utils","commit_id":"3fb12c4e7d240adffa8904bf8565c1c36fa6db88"}],"nova/tests/virt/libvirt/test_imagebackend.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eb6be56ef2d058cd6423cb55e6879f7880802f19","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import shutil"},{"line_number":18,"context_line":"import tempfile"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import mox"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import fixtures"},{"line_number":23,"context_line":"from oslo.config import cfg"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAXH%2F%2FXQo%3D","line":20,"updated":"2014-04-22 09:48:53.000000000","message":"why do you need this new import - you should be using mock for new tests","commit_id":"2a5e89200e3a1400a75cb397632bc1d5de1c10a3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eb6be56ef2d058cd6423cb55e6879f7880802f19","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            fake_libvirt_utils.get_instance_path(self.INSTANCE, forceold\u003dTrue)"},{"line_number":60,"context_line":"        self.PATH \u003d os.path.join("},{"line_number":61,"context_line":"            fake_libvirt_utils.get_instance_path(self.INSTANCE), self.NAME)"},{"line_number":62,"context_line":"\tself.IMAGEINFO \u003d imageinfo.Local(self.PATH, format\u003d\"qcow\")"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # TODO(mikal): rename template_dir to base_dir and template_path"},{"line_number":65,"context_line":"        # to cached_image_path. This will be less confusing."}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAXH%2F%2FXRQ%3D","line":62,"updated":"2014-04-22 09:48:53.000000000","message":"whitespace","commit_id":"2a5e89200e3a1400a75cb397632bc1d5de1c10a3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eb6be56ef2d058cd6423cb55e6879f7880802f19","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        super(Qcow2TestCase, self).setUp()"},{"line_number":267,"context_line":"        self.QCOW2_BASE \u003d (self.TEMPLATE_PATH +"},{"line_number":268,"context_line":"                           \u0027_%d\u0027 % (self.SIZE / units.Gi))"},{"line_number":269,"context_line":"\tself.QCOW2_IMAGEINFO \u003d imageinfo.Local(self.QCOW2_BASE, format\u003d\"qcow2\")"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def prepare_mocks(self):"},{"line_number":272,"context_line":"        fn \u003d self.mox.CreateMockAnything()"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAXH%2F%2FXQ4%3D","line":269,"updated":"2014-04-22 09:48:53.000000000","message":"whitespace","commit_id":"2a5e89200e3a1400a75cb397632bc1d5de1c10a3"}],"nova/tests/virt/test_virt_disk.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"625175f74a2652d91f5b4c204ec7a6c3f215248b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        os.name \u003d os_name"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        self.assertFalse(diskapi.inject_data(\"/some/fail/file\"))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_inject_data_key(self):"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        vfs \u003d vfsguestfs.VFSGuestFS(\"/some/file\", \"qcow2\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BJoU%3D","side":"PARENT","line":70,"updated":"2014-01-29 17:23:04.000000000","message":"You are removing the test coverage that validated handling of a previous bug - please do not do this. If the test needs to change due to API changes, then update it, don\u0027t just delete it.\n\n  commit f59c2d64ac8f0523c587e23b2d1c59fdfe7ea131\n  Author: Michael Davies \u003cmichael@the-davies.net\u003e\n  Date:   Thu Oct 17 04:41:09 2013 -0700\n\n    Fail quickly if file injection for boot volume\n    \n    Previously if the user attempted file injection on a booted volume it\n    would fail and retry several times, which slowed down the instance\n    spawning.  Instead of attempting file injection, fail quickly, and\n    log a warning\n    \n    Fix bug 1188543\n    \n    Change-Id: I264540de736c2bcb92567826fe5ba672e1244ba2","commit_id":"f307761a023a4b56a2c5690159206071a3eb749a"}],"nova/virt/disk/api.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cb104235e9c586d6009204862643e6bf384d05e4","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # Note(pavk): this code should not be referring to a libvirt specific"},{"line_number":336,"context_line":"        # flag."},{"line_number":337,"context_line":"        if not os.path.exists(image) and CONF.libvirt.images_type !\u003d \u0027rbd\u0027:"},{"line_number":338,"context_line":"            raise"},{"line_number":339,"context_line":"        fs \u003d vfs.VFS.instance_for_image(image, fmt, partition)"},{"line_number":340,"context_line":"        fs.setup()"},{"line_number":341,"context_line":"    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2Bokw%3D","line":338,"updated":"2014-01-23 17:49:41.000000000","message":"IMHO this is a demonstration that short circuiting the check here is wrong and should be pushed down into the VFS impl which can learn about rbd","commit_id":"9ed3c6ded975444370aff1926ef700ee0ad8c7d3"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"625175f74a2652d91f5b4c204ec7a6c3f215248b","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        fmt \u003d \"qcow2\""},{"line_number":351,"context_line":"    try:"},{"line_number":352,"context_line":"        # Note(mrda): Test if the image exists first to short circuit errors"},{"line_number":353,"context_line":"        os.stat(image)"},{"line_number":354,"context_line":"        fs \u003d vfs.VFS.instance_for_image(image, fmt, partition)"},{"line_number":355,"context_line":"        fs.setup()"},{"line_number":356,"context_line":"    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BJn8%3D","side":"PARENT","line":353,"updated":"2014-01-29 17:23:04.000000000","message":"You\u0027re deleting this check, which was a fix for a previously reported bug mentioned in my comment against the test suite. You can\u0027t simply delete this code, without providing an alternative fix the problem this was solving.","commit_id":"f307761a023a4b56a2c5690159206071a3eb749a"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"625175f74a2652d91f5b4c204ec7a6c3f215248b","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        fmt \u003d \"qcow2\""},{"line_number":351,"context_line":"    try:"},{"line_number":352,"context_line":"        fs \u003d vfs.VFS.instance_for_image(image, fmt, partition)"},{"line_number":353,"context_line":"        fs.setup(kwargs)"},{"line_number":354,"context_line":"    except Exception as e:"},{"line_number":355,"context_line":"        # If a mandatory item is passed to this function,"},{"line_number":356,"context_line":"        # then reraise the exception to indicate the error."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BJqo%3D","line":353,"updated":"2014-01-29 17:23:04.000000000","message":"Arbitrary undocumented passthrough of parameters is really very bad practice. How is anyone supposed to have any clue what parameters the \u0027inject_data\u0027 method permits now ?\n\nIMHO we need to have an  \"ImageInfo\" class to encapsulate all the parameters related to an image, ie the path, the format, and any RBD specific parameters. An instance of that class would be passed into this method as a single parameter.","commit_id":"45ac39e56e25dc2cd3b129fa3607bb58db0a4487"}],"nova/virt/disk/vfs/api.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a863b6f3f913d4e0a79148d5d17960c358c83977","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        except Exception:"},{"line_number":36,"context_line":"            pass"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        if has_guestfs:"},{"line_number":39,"context_line":"            LOG.debug(_(\"Using primary VFSGuestFS\"))"},{"line_number":40,"context_line":"            return importutils.import_object("},{"line_number":41,"context_line":"                \"nova.virt.disk.vfs.guestfs.VFSGuestFS\","}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAW3%2F%2F7uM%3D","line":38,"updated":"2014-04-09 12:05:08.000000000","message":"If you want todo unrelated variable renames, please put them in a separate patch","commit_id":"83922792cd35ec3696f642cfab833294cc274625"}],"nova/virt/disk/vfs/guestfs.py":[{"author":{"_account_id":7593,"name":"Haomai Wang","email":"haomaiwang@gmail.com","username":"HaomaiWang"},"change_message_id":"43f6fb9b66ffda36ff2e8824b39085783ec43177","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            rbd_test \u003d \"rbd:\""},{"line_number":116,"context_line":"            if self.imgfile.startswith(rbd_test):"},{"line_number":117,"context_line":"                rbd_path \u003d \"/\" + self.imgfile[len(rbd_test):].split(\":\")[0]"},{"line_number":118,"context_line":"                # Note(pavk): libguestfs 1.22 or highter is required"},{"line_number":119,"context_line":"                self.handle.add_drive_opts(rbd_path,"},{"line_number":120,"context_line":"                                           format\u003dself.imgfmt,"},{"line_number":121,"context_line":"                                           protocol\u003d\"rbd\","}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2B%2FNs%3D","line":118,"updated":"2014-01-20 02:08:36.000000000","message":"Maybe here should throw assert libguestfs \u003e\u003d1.22","commit_id":"3fb12c4e7d240adffa8904bf8565c1c36fa6db88"},{"author":{"_account_id":7975,"name":"Pavel Kirpichyov","email":"pavel.kirpichyov@gmail.com","username":"Cheshire"},"change_message_id":"577db86ea563d9f96e9808108b6710794c3f5799","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            rbd_test \u003d \"rbd:\""},{"line_number":116,"context_line":"            if self.imgfile.startswith(rbd_test):"},{"line_number":117,"context_line":"                rbd_path \u003d \"/\" + self.imgfile[len(rbd_test):].split(\":\")[0]"},{"line_number":118,"context_line":"                self.handle.add_drive(rbd_path,"},{"line_number":119,"context_line":"                                      format\u003dself.imgfmt,"},{"line_number":120,"context_line":"                                      protocol\u003d\"rbd\","},{"line_number":121,"context_line":"                                      server\u003dCONF.libvirt.rbd_server,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2B9ig%3D","line":118,"updated":"2014-01-20 11:29:32.000000000","message":".add_drive introduced since 1.22, so it throw AttributeError for version lower than 1.22","commit_id":"4916f8cea30499ee8f5dabdc9eece9e878de0ec4"},{"author":{"_account_id":7593,"name":"Haomai Wang","email":"haomaiwang@gmail.com","username":"HaomaiWang"},"change_message_id":"8ac96049c6fd67709f1e9661108cde6f29150ed0","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            rbd_test \u003d \"rbd:\""},{"line_number":116,"context_line":"            if self.imgfile.startswith(rbd_test):"},{"line_number":117,"context_line":"                rbd_path \u003d \"/\" + self.imgfile[len(rbd_test):].split(\":\")[0]"},{"line_number":118,"context_line":"                self.handle.add_drive(rbd_path,"},{"line_number":119,"context_line":"                                      format\u003dself.imgfmt,"},{"line_number":120,"context_line":"                                      protocol\u003d\"rbd\","},{"line_number":121,"context_line":"                                      server\u003dCONF.libvirt.rbd_server,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2B9Nk%3D","line":118,"in_reply_to":"AAAAUH%2F%2B9ig%3D","updated":"2014-01-20 12:39:35.000000000","message":"I think we need more helper info not AttributeError which make user confusing","commit_id":"4916f8cea30499ee8f5dabdc9eece9e878de0ec4"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"69cff6b4d1bc04a3be8a6e5411899078a3fb6cfb","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                self.handle.add_drive(rbd_path,"},{"line_number":122,"context_line":"                                      format\u003dself.imgfmt,"},{"line_number":123,"context_line":"                                      protocol\u003d\"rbd\","},{"line_number":124,"context_line":"                                      server\u003dCONF.libvirt.rbd_server,"},{"line_number":125,"context_line":"                                      username\u003dCONF.libvirt.rbd_user,"},{"line_number":126,"context_line":"                                      secret\u003dCONF.libvirt.rbd_secret_uuid)"},{"line_number":127,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2BoV8%3D","line":124,"updated":"2014-01-23 18:29:18.000000000","message":"It\u0027d be good to avoid adding another config option for this too. The rbd ImageBackend can already fetch the monitor server addresses, so you can pass that info down from the libvirt driver, or maybe just add a libguestfs_path() method to ImageBackends that handles this for rbd.","commit_id":"9ed3c6ded975444370aff1926ef700ee0ad8c7d3"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cb104235e9c586d6009204862643e6bf384d05e4","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                      protocol\u003d\"rbd\","},{"line_number":124,"context_line":"                                      server\u003dCONF.libvirt.rbd_server,"},{"line_number":125,"context_line":"                                      username\u003dCONF.libvirt.rbd_user,"},{"line_number":126,"context_line":"                                      secret\u003dCONF.libvirt.rbd_secret_uuid)"},{"line_number":127,"context_line":"            else:"},{"line_number":128,"context_line":"                self.handle.add_drive_opts(self.imgfile, format\u003dself.imgfmt)"},{"line_number":129,"context_line":"            self.handle.launch()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2Bojo%3D","line":126,"updated":"2014-01-23 17:49:41.000000000","message":"Referencing libvirt driver private config variables from shared code is forbidden.\n\nIf you need this info, then the libvirt driver must pass the data in explicitly.","commit_id":"9ed3c6ded975444370aff1926ef700ee0ad8c7d3"}],"nova/virt/image/__init__.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eb6be56ef2d058cd6423cb55e6879f7880802f19","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 Pavel Kirpichyov"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAXH%2F%2FXPY%3D","line":1,"updated":"2014-04-22 09:48:53.000000000","message":"you do not need copyright headers for __init__ files","commit_id":"2a5e89200e3a1400a75cb397632bc1d5de1c10a3"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7dc50b0d4640a4706d8bc7ecc0e779cc188c09db","unresolved":false,"context_lines":[{"line_number":14,"context_line":"\"\"\""},{"line_number":15,"context_line":"Image store info"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_50728c11","line":17,"updated":"2014-06-04 16:06:13.000000000","message":"Empty files shouldn\u0027t have the license header at all.. \n\nhttp://docs.openstack.org/developer/hacking/#openstack-licensing","commit_id":"2a5e89200e3a1400a75cb397632bc1d5de1c10a3"}],"nova/virt/image/imageinfo.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6f3cdefb8f5ac12b936d9b0703a5e66a31ec1f77","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import six"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.virt.libvirt import utils as libvirt_utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F9c1k%3D","line":20,"updated":"2014-04-04 12:45:47.000000000","message":"It isn\u0027t permitted to import libvirt code in generic modules like this.","commit_id":"d77d28b50ce7bbafb136a46f3072c3dfae199884"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6f3cdefb8f5ac12b936d9b0703a5e66a31ec1f77","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        return os.path.exists(self.path)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class Rbd(Local):"},{"line_number":34,"context_line":"    def __init__(self, name, pool, user, secret, servers):"},{"line_number":35,"context_line":"        self.pool \u003d pool"},{"line_number":36,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F9c0s%3D","line":33,"updated":"2014-04-04 12:45:47.000000000","message":"This same problem is going to exist for any non-local files in the future (eg gluster, iscsi, nfs), so I think we should have a generic \u0027Network\u0027 class rather than \u0027Rbd\u0027.","commit_id":"d77d28b50ce7bbafb136a46f3072c3dfae199884"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"d815b8d21f7174a91efc12d8f1cf4b0b0c0b5219","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        return os.path.exists(self.path)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class Rbd(Local):"},{"line_number":34,"context_line":"    def __init__(self, name, pool, user, secret, servers):"},{"line_number":35,"context_line":"        self.pool \u003d pool"},{"line_number":36,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F9Su4%3D","line":33,"in_reply_to":"AAAAWH%2F9S3E%3D","updated":"2014-04-07 10:42:34.000000000","message":"In the libvirt config we have defined a consistent set of parameters across all these types, so this shows it is possible to do this is a generic way for all of them","commit_id":"d77d28b50ce7bbafb136a46f3072c3dfae199884"},{"author":{"_account_id":7975,"name":"Pavel Kirpichyov","email":"pavel.kirpichyov@gmail.com","username":"Cheshire"},"change_message_id":"c2f1fba789cb55731a7012c5d9ca92c14280975a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        return os.path.exists(self.path)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class Rbd(Local):"},{"line_number":34,"context_line":"    def __init__(self, name, pool, user, secret, servers):"},{"line_number":35,"context_line":"        self.pool \u003d pool"},{"line_number":36,"context_line":"        self.name \u003d name"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F9S3E%3D","line":33,"in_reply_to":"AAAAWH%2F9c0s%3D","updated":"2014-04-07 10:20:18.000000000","message":"I think we should create separate classes (gluster, nfs, etc) if it required. Because all of them can require different set of params","commit_id":"d77d28b50ce7bbafb136a46f3072c3dfae199884"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6f3cdefb8f5ac12b936d9b0703a5e66a31ec1f77","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        volumes \u003d libvirt_utils.list_rbd_volumes(self.pool)"},{"line_number":46,"context_line":"        for volume in volumes:"},{"line_number":47,"context_line":"            if volume.startswith(self.name):"},{"line_number":48,"context_line":"                return True"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAWH%2F9c0U%3D","line":48,"updated":"2014-04-04 12:45:47.000000000","message":"I\u0027d suggest that we make the caller decide wether the image exists, and just pass in a boolean  \u0027exists\u0027 property. \n\nie, these classes are purely a metadata store, they don\u0027t touch the filesystem or call out to any network libraries. This avoids the forbidden import problem above","commit_id":"d77d28b50ce7bbafb136a46f3072c3dfae199884"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"16463170931d85b5e3e2be385a97a2e45df69bc9","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if self.ceph_conf:"},{"line_number":67,"context_line":"            total.extend([\u0027--conf\u0027, str(self.ceph_conf)])"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        return utils.execute(*total, **kwargs)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAWH%2F9TKw%3D","line":69,"updated":"2014-04-07 09:28:08.000000000","message":"So now instead of calling into libvirt code, you\u0027ve just copy+pasted the libvirt rbd code into this file, which is just as bad.\n\nAFAICT, the only reason for this \u0027check_image_exists\u0027 method, is because \u0027nova.virt.disk.api.inject_data\u0027 wants todo a check and raise exception if it doesn\u0027t exist. The virt driver catches the exception and ignores it. IOW we\u0027re using exceptions for flow control here which is a rather dubious approach. It would be better if the virt driver checked whether the image existed, and then skipped calling inject_data at all if it doesn\u0027t exist. By pushing the check up into the virt driver, we can avoid the need for this \u0027check_image_exists\u0027 method at all.\n\nThis refactoring to remove the os.stat() call from inject_data can be done as a separate, prior, patch from this main one adding RBD support.","commit_id":"f8e8a220fcc44ee3ef4e8736577de28957f0b3bc"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"4c3eb7ca51363a62dac3aac0358e61b33dc3d536","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if self.ceph_conf:"},{"line_number":67,"context_line":"            total.extend([\u0027--conf\u0027, str(self.ceph_conf)])"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        return utils.execute(*total, **kwargs)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAWH%2F9SvI%3D","line":69,"in_reply_to":"AAAAWH%2F9S2k%3D","updated":"2014-04-07 10:41:18.000000000","message":"libguestfs itself will already report an error if the image doesn\u0027t exist. This check by openstack was just trying to short circuit that check by libguestfs. So I think it is completely fine to have this done in the callers.","commit_id":"f8e8a220fcc44ee3ef4e8736577de28957f0b3bc"},{"author":{"_account_id":7975,"name":"Pavel Kirpichyov","email":"pavel.kirpichyov@gmail.com","username":"Cheshire"},"change_message_id":"55859f21f8428978972ec9e37e1ae14dabd345c4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if self.ceph_conf:"},{"line_number":67,"context_line":"            total.extend([\u0027--conf\u0027, str(self.ceph_conf)])"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        return utils.execute(*total, **kwargs)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAWH%2F9S2k%3D","line":69,"in_reply_to":"AAAAWH%2F9TKw%3D","updated":"2014-04-07 10:19:54.000000000","message":"But since we\u0027ll remove check_image_exists check it would be possible to forget check image exist first. For example VirtDiskTest.test_inject_data last assertFalse","commit_id":"f8e8a220fcc44ee3ef4e8736577de28957f0b3bc"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7975,"name":"Pavel Kirpichyov","email":"pavel.kirpichyov@gmail.com","username":"Cheshire"},"change_message_id":"c2bcb4bfe74258d059ac642745743d3da69b6a85","unresolved":false,"context_lines":[{"line_number":2608,"context_line":"                try:"},{"line_number":2609,"context_line":"                    hosts, ports \u003d disk_image.get_mon_addrs()"},{"line_number":2610,"context_line":"                    servers \u003d [str(\u0027:\u0027.join(k)) for k in zip(hosts, ports)]"},{"line_number":2611,"context_line":""},{"line_number":2612,"context_line":"                    disk.inject_data(disk_image.path,"},{"line_number":2613,"context_line":"                                     key, net, metadata, admin_pass, files,"},{"line_number":2614,"context_line":"                                     partition\u003dtarget_partition,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F%2BJs4%3D","line":2611,"updated":"2014-01-29 17:07:35.000000000","message":"handle cases, if backend is not RBD :)","commit_id":"857d51fdf1d4d03f37b2bc2ce9a0a73943a4477f"}]}
