)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cd2e4e5021dfc68a444caa192240cd2938e242c2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Leave the brackets on Ceph Monitor IPv6 addresses for libguestfs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds the \u0027strip_brackets\u0027 argument for get_mon_addrs method. This is default \u0027True\u0027 to not interfere anywhere this is used with no arguments."},{"line_number":10,"context_line":"Use strip_brackets\u003dFalse when getting the hosts and ports for RBDImage, which is used for libguestfs"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I378998a73046b9b9a33e30d0e06c4721d712da65"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_e16db7cc","line":9,"updated":"2019-04-02 17:37:15.000000000","message":"Wrap at 79 characters.","commit_id":"ae3d124ab7fa8d9fe7dd0336fcaa42ab391340a5"}],"nova/virt/disk/vfs/guestfs.py":[{"author":{"_account_id":29598,"name":"Jared Winborne","email":"jwinborne@knownhost.com","username":"winbornejw"},"change_message_id":"f5874f55fb2f2effdb9867abf5ca22f1cc03696a","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                                                      self.image.name),"},{"line_number":221,"context_line":"                                           protocol\u003d\"rbd\","},{"line_number":222,"context_line":"                                           format\u003dimgmodel.FORMAT_RAW,"},{"line_number":223,"context_line":"                                           server\u003dself.image.servers,"},{"line_number":224,"context_line":"                                           username\u003dself.image.user,"},{"line_number":225,"context_line":"                                           secret\u003dself.image.password)"},{"line_number":226,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_9724ec0e","line":223,"updated":"2019-04-05 19:43:31.000000000","message":"this is the only use of the servers property I\u0027ve been able to find, which is where its passed to libguestfs","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"}],"nova/virt/image/model.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9d7c77cca3589069970f4504bf95660819018f62","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        super(LocalBlockImage, self).__init__(path, FORMAT_RAW)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"class RBDImage(Image):"},{"line_number":112,"context_line":"    \"\"\"Class for images that are volumes on a remote"},{"line_number":113,"context_line":"    RBD server"},{"line_number":114,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_17523c14","line":111,"updated":"2019-04-05 18:48:36.000000000","message":"Oh, this is basically a struct with no logic in it.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9d7c77cca3589069970f4504bf95660819018f62","unresolved":false,"context_lines":[{"line_number":3438,"context_line":"                      instance\u003dinstance)"},{"line_number":3439,"context_line":"            img_id \u003d instance.image_ref"},{"line_number":3440,"context_line":"            try:"},{"line_number":3441,"context_line":"                disk_api.inject_data(disk.get_model(self._conn),"},{"line_number":3442,"context_line":"                                     key, net, metadata, admin_pass,"},{"line_number":3443,"context_line":"                                     injection_info.files,"},{"line_number":3444,"context_line":"                                     partition\u003dtarget_partition,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_0c1f8f6c","line":3441,"updated":"2019-04-05 18:48:36.000000000","message":"This is the \"root\" of the problem, right? Could we not do the brackets thing here to limit the blast radius?","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":29598,"name":"Jared Winborne","email":"jwinborne@knownhost.com","username":"winbornejw"},"change_message_id":"f5874f55fb2f2effdb9867abf5ca22f1cc03696a","unresolved":false,"context_lines":[{"line_number":3438,"context_line":"                      instance\u003dinstance)"},{"line_number":3439,"context_line":"            img_id \u003d instance.image_ref"},{"line_number":3440,"context_line":"            try:"},{"line_number":3441,"context_line":"                disk_api.inject_data(disk.get_model(self._conn),"},{"line_number":3442,"context_line":"                                     key, net, metadata, admin_pass,"},{"line_number":3443,"context_line":"                                     injection_info.files,"},{"line_number":3444,"context_line":"                                     partition\u003dtarget_partition,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_17a6bcc2","line":3441,"in_reply_to":"5fc1f717_0c1f8f6c","updated":"2019-04-05 19:43:31.000000000","message":"I had considered adding the brackets back in the inject_method called here, but it seemed cleaner to not remove them in the first place than to remove them and then put them back","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9adc6994a83c90fc2ae4ecc67220e82211082e13","unresolved":false,"context_lines":[{"line_number":3438,"context_line":"                      instance\u003dinstance)"},{"line_number":3439,"context_line":"            img_id \u003d instance.image_ref"},{"line_number":3440,"context_line":"            try:"},{"line_number":3441,"context_line":"                disk_api.inject_data(disk.get_model(self._conn),"},{"line_number":3442,"context_line":"                                     key, net, metadata, admin_pass,"},{"line_number":3443,"context_line":"                                     injection_info.files,"},{"line_number":3444,"context_line":"                                     partition\u003dtarget_partition,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_37e09897","line":3441,"in_reply_to":"5fc1f717_17a6bcc2","updated":"2019-04-05 19:48:59.000000000","message":"Adding them back here would entail assuming that a) the last colon delineates the port, and b) any other colons imply IPv6. These things should be true, but that logic is better off living in one place.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb7b6f3d42058581d4a51daf32427fd0dab05f20","unresolved":false,"context_lines":[{"line_number":3438,"context_line":"                      instance\u003dinstance)"},{"line_number":3439,"context_line":"            img_id \u003d instance.image_ref"},{"line_number":3440,"context_line":"            try:"},{"line_number":3441,"context_line":"                disk_api.inject_data(disk.get_model(self._conn),"},{"line_number":3442,"context_line":"                                     key, net, metadata, admin_pass,"},{"line_number":3443,"context_line":"                                     injection_info.files,"},{"line_number":3444,"context_line":"                                     partition\u003dtarget_partition,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_fc2d1046","line":3441,"in_reply_to":"5fc1f717_1c049c14","updated":"2019-04-05 23:56:31.000000000","message":"It\u0027s mainly because it clearly makes no sense for the `host` part of a `host:port` string to have colons in it and not be bracketed; and so I want the code that makes sure this doesn\u0027t happen to be very close to the code that assembles the host and port into a single colon-separated string. Here is not that.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"35d137b59efeadb387195006bf71c11bc559e34b","unresolved":false,"context_lines":[{"line_number":3438,"context_line":"                      instance\u003dinstance)"},{"line_number":3439,"context_line":"            img_id \u003d instance.image_ref"},{"line_number":3440,"context_line":"            try:"},{"line_number":3441,"context_line":"                disk_api.inject_data(disk.get_model(self._conn),"},{"line_number":3442,"context_line":"                                     key, net, metadata, admin_pass,"},{"line_number":3443,"context_line":"                                     injection_info.files,"},{"line_number":3444,"context_line":"                                     partition\u003dtarget_partition,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_1c049c14","line":3441,"in_reply_to":"5fc1f717_37e09897","updated":"2019-04-05 23:32:00.000000000","message":"I agree it\u0027d be ugly to re-add them here. I guess it comes down to what\u0027s less ugly: re-add them here, or do it at the source with the caveat that there\u0027s no obviously visible link between the code here that needs brackets and the code that actually adds them. Looks like folks are favouring the latter, and I\u0027m fine with that. Since get_model apparently isn\u0027t used by anything else, it should be safe.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":29598,"name":"Jared Winborne","email":"jwinborne@knownhost.com","username":"winbornejw"},"change_message_id":"f5874f55fb2f2effdb9867abf5ca22f1cc03696a","unresolved":false,"context_lines":[{"line_number":5555,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":5556,"context_line":"        else:"},{"line_number":5557,"context_line":"            root_disk \u003d self.image_backend.by_name(instance, \u0027disk\u0027)"},{"line_number":5558,"context_line":"            image_model \u003d root_disk.get_model(self._conn)"},{"line_number":5559,"context_line":""},{"line_number":5560,"context_line":"        container_dir \u003d os.path.join(inst_path, \u0027rootfs\u0027)"},{"line_number":5561,"context_line":"        fileutils.ensure_tree(container_dir)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_b7948837","line":5558,"updated":"2019-04-05 19:43:31.000000000","message":"This is the other use of the get_model method. I\u0027m not as familiar with LXC, but I can\u0027t find it using the servers property","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9adc6994a83c90fc2ae4ecc67220e82211082e13","unresolved":false,"context_lines":[{"line_number":5555,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":5556,"context_line":"        else:"},{"line_number":5557,"context_line":"            root_disk \u003d self.image_backend.by_name(instance, \u0027disk\u0027)"},{"line_number":5558,"context_line":"            image_model \u003d root_disk.get_model(self._conn)"},{"line_number":5559,"context_line":""},{"line_number":5560,"context_line":"        container_dir \u003d os.path.join(inst_path, \u0027rootfs\u0027)"},{"line_number":5561,"context_line":"        fileutils.ensure_tree(container_dir)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_f7ef7084","line":5558,"in_reply_to":"5fc1f717_b7948837","updated":"2019-04-05 19:48:59.000000000","message":"I dug around too, and this gels with my findings.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cd2e4e5021dfc68a444caa192240cd2938e242c2","unresolved":false,"context_lines":[{"line_number":960,"context_line":"                CONF.libvirt.rbd_secret_uuid)"},{"line_number":961,"context_line":"            secret \u003d base64.b64encode(secretobj.value())"},{"line_number":962,"context_line":""},{"line_number":963,"context_line":"        hosts, ports \u003d self.driver.get_mon_addrs(strip_brackets\u003dFalse)"},{"line_number":964,"context_line":"        servers \u003d [str(\u0027:\u0027.join(k)) for k in zip(hosts, ports)]"},{"line_number":965,"context_line":""},{"line_number":966,"context_line":"        return imgmodel.RBDImage(self.rbd_name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_6161c7d3","line":963,"updated":"2019-04-02 17:37:15.000000000","message":"Would be good to have a comment here about why strip_brackets\u003dFalse.\n\nShould also have unit tests for the behavior change to avoid regressions. Looks like the existing test will probably blow up anyway since the fake stub method in the test doesn\u0027t match the method signature now:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/unit/virt/libvirt/test_imagebackend.py#L1507\n\ntox -e py36 -- nova.tests.unit.virt.libvirt.test_imagebackend \n\nto hit that code locally.","commit_id":"ae3d124ab7fa8d9fe7dd0336fcaa42ab391340a5"},{"author":{"_account_id":29598,"name":"Jared Winborne","email":"jwinborne@knownhost.com","username":"winbornejw"},"change_message_id":"0cbcd91da4a728ac754f4811640356516ccef29f","unresolved":false,"context_lines":[{"line_number":864,"context_line":"        info \u003d vconfig.LibvirtConfigGuestDisk()"},{"line_number":865,"context_line":"        disk_bus \u003d disk_info[\u0027bus\u0027]"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"        hosts, ports \u003d self.driver.get_mon_addrs()"},{"line_number":868,"context_line":"        info.source_device \u003d disk_info[\u0027type\u0027]"},{"line_number":869,"context_line":"        info.driver_format \u003d \u0027raw\u0027"},{"line_number":870,"context_line":"        info.driver_cache \u003d cache_mode"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_2c2a8b90","line":867,"updated":"2019-04-05 18:48:17.000000000","message":"This is where the brackets should be stripped. Could strip brackets from each host here instead.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9d7c77cca3589069970f4504bf95660819018f62","unresolved":false,"context_lines":[{"line_number":953,"context_line":"        raise exception.ImageUnacceptable(image_id\u003dimage_id_or_uri,"},{"line_number":954,"context_line":"                                          reason\u003dreason)"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"    def get_model(self, connection):"},{"line_number":957,"context_line":"        secret \u003d None"},{"line_number":958,"context_line":"        if CONF.libvirt.rbd_secret_uuid:"},{"line_number":959,"context_line":"            secretobj \u003d connection.secretLookupByUUIDString("}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_8c0a9f23","line":956,"updated":"2019-04-05 18:48:36.000000000","message":"I thought of putting strip_brackets here instead, but it\u0027s a public interface of the Image class, so probably not a good idea.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9d7c77cca3589069970f4504bf95660819018f62","unresolved":false,"context_lines":[{"line_number":963,"context_line":"        # Brackets are stripped from IPv6 addresses normally for libvirt XML,"},{"line_number":964,"context_line":"        # but the servers list is for libguestfs, which needs the brackets"},{"line_number":965,"context_line":"        # so the joined string is similar to \u0027[::1]:6789\u0027"},{"line_number":966,"context_line":"        hosts, ports \u003d self.driver.get_mon_addrs(strip_brackets\u003dFalse)"},{"line_number":967,"context_line":"        servers \u003d [str(\u0027:\u0027.join(k)) for k in zip(hosts, ports)]"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        return imgmodel.RBDImage(self.rbd_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_572e848c","line":966,"updated":"2019-04-05 18:48:36.000000000","message":"So, what else calls get_model? Because now we\u0027ve changed the Image that we return to have a different servers field than before...","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b05a581b33e1ea63abd0fd74d12df57e64381ee6","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        # but the servers list is for libguestfs, which needs the brackets"},{"line_number":965,"context_line":"        # so the joined string is similar to \u0027[::1]:6789\u0027"},{"line_number":966,"context_line":"        hosts, ports \u003d self.driver.get_mon_addrs(strip_brackets\u003dFalse)"},{"line_number":967,"context_line":"        servers \u003d [str(\u0027:\u0027.join(k)) for k in zip(hosts, ports)]"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        return imgmodel.RBDImage(self.rbd_name,"},{"line_number":970,"context_line":"                                 self.pool,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_0ccc6f33","line":967,"range":{"start_line":967,"start_character":8,"end_line":967,"end_character":63},"updated":"2019-04-05 18:32:04.000000000","message":"hm, I almost think the bracket-stripping ought to be done here instead. But meh.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":29598,"name":"Jared Winborne","email":"jwinborne@knownhost.com","username":"winbornejw"},"change_message_id":"0cbcd91da4a728ac754f4811640356516ccef29f","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        # but the servers list is for libguestfs, which needs the brackets"},{"line_number":965,"context_line":"        # so the joined string is similar to \u0027[::1]:6789\u0027"},{"line_number":966,"context_line":"        hosts, ports \u003d self.driver.get_mon_addrs(strip_brackets\u003dFalse)"},{"line_number":967,"context_line":"        servers \u003d [str(\u0027:\u0027.join(k)) for k in zip(hosts, ports)]"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        return imgmodel.RBDImage(self.rbd_name,"},{"line_number":970,"context_line":"                                 self.pool,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_8c213fb7","line":967,"range":{"start_line":967,"start_character":8,"end_line":967,"end_character":63},"in_reply_to":"5fc1f717_0ccc6f33","updated":"2019-04-05 18:48:17.000000000","message":"Here is where the brackets need to be left, stripping is needed line 867","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"aff6a27eb68051427556c1058264d9ac100d54f5","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        # but the servers list is for libguestfs, which needs the brackets"},{"line_number":965,"context_line":"        # so the joined string is similar to \u0027[::1]:6789\u0027"},{"line_number":966,"context_line":"        hosts, ports \u003d self.driver.get_mon_addrs(strip_brackets\u003dFalse)"},{"line_number":967,"context_line":"        servers \u003d [str(\u0027:\u0027.join(k)) for k in zip(hosts, ports)]"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        return imgmodel.RBDImage(self.rbd_name,"},{"line_number":970,"context_line":"                                 self.pool,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_375f3810","line":967,"range":{"start_line":967,"start_character":8,"end_line":967,"end_character":63},"in_reply_to":"5fc1f717_0ccc6f33","updated":"2019-04-05 18:50:46.000000000","message":"Overall the change looks sane to me, but I want to look a bit more into, is get_model definitely not used by anything other than a servers list and libvirt is never going to use it? That\u0027s my only potential concern with this.","commit_id":"5d29dccaf91c697ffc12a7289ce16cd83e60b07f"}],"nova/virt/libvirt/storage/rbd_utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"768ac45c5c6295474e94f0f04c4a4daa94898996","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        for addr in addrs:"},{"line_number":174,"context_line":"            host_port \u003d addr[:addr.rindex(\u0027/\u0027)]"},{"line_number":175,"context_line":"            host, port \u003d host_port.rsplit(\u0027:\u0027, 1)"},{"line_number":176,"context_line":"            if strip_brackets:"},{"line_number":177,"context_line":"                host \u003d host.strip(\u0027[]\u0027)"},{"line_number":178,"context_line":"            hosts.append(host)"},{"line_number":179,"context_line":"            ports.append(port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_61b6a741","line":176,"updated":"2019-04-02 17:37:52.000000000","message":"Should have a unit test in https://github.com/openstack/nova/blob/master/nova/tests/unit/virt/libvirt/storage/test_rbd.py for the False logic.","commit_id":"ae3d124ab7fa8d9fe7dd0336fcaa42ab391340a5"}]}
