)]}'
{"nova/virt/libvirt/driver.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"4bf92bc8754ba9351725ec4387d5a318b6c48c7e","unresolved":false,"context_lines":[{"line_number":3500,"context_line":"            connection_info \u003d vol[\u0027connection_info\u0027]"},{"line_number":3501,"context_line":"            vol_dev \u003d block_device.prepend_dev(vol[\u0027mount_device\u0027])"},{"line_number":3502,"context_line":"            info \u003d disk_mapping[vol_dev]"},{"line_number":3503,"context_line":"            self._connect_volume(connection_info, info)"},{"line_number":3504,"context_line":"            cfg \u003d self._get_volume_config(connection_info, info)"},{"line_number":3505,"context_line":"            devices.append(cfg)"},{"line_number":3506,"context_line":"            vol[\u0027connection_info\u0027] \u003d connection_info"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_593de22b","line":3503,"updated":"2014-09-18 04:06:37.000000000","message":"A call to _connect_volume is needed here. Otherwise, tempest/scenario/test_volume_boot_pattern.py _boot_instance_from_volume fails with \"No valid host was found.\". The following console log shows this error: http://logs.openstack.org/65/121965/2/check/check-tempest-dsvm-full/e44d074/console.html","commit_id":"767a146a48b8b4f8b03e81e47f172163189c75de"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"aff12fe50fb676d5ea3ead2a132ac50fc35b7ecd","unresolved":false,"context_lines":[{"line_number":3503,"context_line":"            self._connect_volume(connection_info, info)"},{"line_number":3504,"context_line":"            cfg \u003d self._get_volume_config(connection_info, info)"},{"line_number":3505,"context_line":"            devices.append(cfg)"},{"line_number":3506,"context_line":"            connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d cfg.source_path"},{"line_number":3507,"context_line":"            vol[\u0027connection_info\u0027] \u003d connection_info"},{"line_number":3508,"context_line":"            vol.save(nova_context.get_admin_context())"},{"line_number":3509,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_8a1438a0","line":3506,"updated":"2014-09-18 15:46:00.000000000","message":"In several driver implementations we set the sorce path in get_config so in theory this should happen every time we do get_config?\n\nMaybe we need to make sure this si mutated or assigned and saved on every get config as part of _get_volume_config?\n\nI remember there were bugs with us not properly not updating this stuff before.","commit_id":"ee8c6e94f29980c37efc6e9af520d8a1d9a6f8e3"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"e554e6e933cbbcb186c7a6d3be3fd7ed320e551a","unresolved":false,"context_lines":[{"line_number":3503,"context_line":"            self._connect_volume(connection_info, info)"},{"line_number":3504,"context_line":"            cfg \u003d self._get_volume_config(connection_info, info)"},{"line_number":3505,"context_line":"            devices.append(cfg)"},{"line_number":3506,"context_line":"            connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d cfg.source_path"},{"line_number":3507,"context_line":"            vol[\u0027connection_info\u0027] \u003d connection_info"},{"line_number":3508,"context_line":"            vol.save(nova_context.get_admin_context())"},{"line_number":3509,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_5b522436","line":3506,"in_reply_to":"fa98f980_8a1438a0","updated":"2014-09-18 17:40:13.000000000","message":"You are correct. The drivers set cfg.source_path on get_config.  I will assign connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d cfg.source_path in _get_volume_config in the next patch.","commit_id":"ee8c6e94f29980c37efc6e9af520d8a1d9a6f8e3"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8543f7328cb8cea768398721c655c5cb945a874f","unresolved":false,"context_lines":[{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"        # Save source_path in connection_info for later use"},{"line_number":1342,"context_line":"        connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d ("},{"line_number":1343,"context_line":"            connection_info[\u0027data\u0027].get(\u0027device_path\u0027, cfg.source_path))"},{"line_number":1344,"context_line":"        return cfg"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"    def _get_volume_encryptor(self, connection_info, encryption):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_c68d46d5","line":1343,"updated":"2014-09-19 10:21:59.000000000","message":"But this is not right actually because looking at the code in volume.py - get_config does not change anything, and indeed it should be idempotent.\n\nWhat does need to change things is connect_volume, and we can assume that we *must* save the changes after that (correct me if I am wrong). The thing is that in some cases (like attach_volume) we do it, as it is called from the DriverBlockDevice methods which make sure that all stuff that is modified will get saved.\n\nLooking at the code - this leaves us with swap_volume which is definitely buggy as it won\u0027t update the db. then we have _get_guest_storage_config that gets called in all the usual places and does the save ATM (see my comment below).\n\nNow back to updating connection_info - it is my feeling that we should only update (mutate) it on connect, and that it would be great to do this in the volume drivers as this is where we really do that type of manipulation, so the real fix is to actually update the connection info in connect of each driver (in the superclass maybe).\n\nThen as bonus points we can fix swap_volume to actualy update it properly in the db","commit_id":"e7705bc5024992d427341e6bcac33e6a1c6caed8"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"6e373979307a2f3c7e770fa9c9c613f01cc8681c","unresolved":false,"context_lines":[{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"        # Save source_path in connection_info for later use"},{"line_number":1342,"context_line":"        connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d ("},{"line_number":1343,"context_line":"            connection_info[\u0027data\u0027].get(\u0027device_path\u0027, cfg.source_path))"},{"line_number":1344,"context_line":"        return cfg"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"    def _get_volume_encryptor(self, connection_info, encryption):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da9df570_91c91c5d","line":1343,"in_reply_to":"fa98f980_c68d46d5","updated":"2014-09-19 21:15:27.000000000","message":"I found it difficult to put connection_info[\u0027data\u0027][\u0027device_path\u0027] caching in LibvirtBaseVolumeDriver super class for the following reason.\n\nconnection_info[\u0027data\u0027][\u0027device_path\u0027] should be set to cfg.source_path.  In order to get cfg.source_path, we have to call get_config.  Since this patch and the one that it is the follow up to is trying to separate connect_volume and get_config, I do not believe we should be having connect_volume call get_config to get cfg.source_path.\n\nIn the patch that I will soon submit, I set the connection_info[\u0027data\u0027][\u0027device_path\u0027] directly to the value that is assigned to cfg.source_path, but I did it in connect_volume.  This will accomplish what we want, which is to cache connection_info[\u0027data\u0027][\u0027device_path\u0027] and separate the calls that were in connect_volume to get_config.  I also saved the updated bdm in swap_volume.","commit_id":"e7705bc5024992d427341e6bcac33e6a1c6caed8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8543f7328cb8cea768398721c655c5cb945a874f","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"                flags |\u003d libvirt.VIR_DOMAIN_AFFECT_LIVE"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"            # cache device_path in connection_info -- required by encryptors"},{"line_number":1397,"context_line":"            if \u0027data\u0027 in connection_info:"},{"line_number":1398,"context_line":"                connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d conf.source_path"},{"line_number":1399,"context_line":""},{"line_number":1400,"context_line":"            if encryption:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_2430cd06","line":1397,"updated":"2014-09-19 10:21:59.000000000","message":"So we don\u0027t need this one now either? Not that it matters based on other analysis.","commit_id":"e7705bc5024992d427341e6bcac33e6a1c6caed8"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"6e373979307a2f3c7e770fa9c9c613f01cc8681c","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"                flags |\u003d libvirt.VIR_DOMAIN_AFFECT_LIVE"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"            # cache device_path in connection_info -- required by encryptors"},{"line_number":1397,"context_line":"            if \u0027data\u0027 in connection_info:"},{"line_number":1398,"context_line":"                connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d conf.source_path"},{"line_number":1399,"context_line":""},{"line_number":1400,"context_line":"            if encryption:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_b7fdc3b3","line":1397,"in_reply_to":"fa98f980_2430cd06","updated":"2014-09-19 21:15:27.000000000","message":"Done","commit_id":"e7705bc5024992d427341e6bcac33e6a1c6caed8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8543f7328cb8cea768398721c655c5cb945a874f","unresolved":false,"context_lines":[{"line_number":3509,"context_line":"            cfg \u003d self._get_volume_config(connection_info, info)"},{"line_number":3510,"context_line":"            devices.append(cfg)"},{"line_number":3511,"context_line":"            vol[\u0027connection_info\u0027] \u003d connection_info"},{"line_number":3512,"context_line":"            vol.save(nova_context.get_admin_context())"},{"line_number":3513,"context_line":""},{"line_number":3514,"context_line":"        for d in devices:"},{"line_number":3515,"context_line":"            self._set_cache_mode(d)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_86909e97","line":3512,"updated":"2014-09-19 10:21:59.000000000","message":"Actually we need these 2 lines in all the places where we call connect. and don\u0027t call it through the DriverBlockDevice API that will take care of the save.","commit_id":"e7705bc5024992d427341e6bcac33e6a1c6caed8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f75d84502fbca92abc01f10e704c9c03e95a3597","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"            nova_context.get_admin_context(), volume_id)"},{"line_number":1475,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"},{"line_number":1476,"context_line":"        driver_bdm[\u0027connection_info\u0027] \u003d new_connection_info"},{"line_number":1477,"context_line":"        driver_bdm.save(nova_context.get_admin_context())"},{"line_number":1478,"context_line":""},{"line_number":1479,"context_line":"        self._swap_volume(virt_dom, disk_dev, conf.source_path, resize_to)"},{"line_number":1480,"context_line":"        self._disconnect_volume(old_connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_4246f4c0","line":1477,"updated":"2014-09-29 15:27:12.000000000","message":"It would be nicer if we could maybe move this into a separate patch as it is really a different bug.","commit_id":"3256f520fe16a90c18ca83754241383ff3092dc9"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"de533b667e63a1dbd65fff9244fb6f9e9ce5a16a","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"            nova_context.get_admin_context(), volume_id)"},{"line_number":1475,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"},{"line_number":1476,"context_line":"        driver_bdm[\u0027connection_info\u0027] \u003d new_connection_info"},{"line_number":1477,"context_line":"        driver_bdm.save(nova_context.get_admin_context())"},{"line_number":1478,"context_line":""},{"line_number":1479,"context_line":"        self._swap_volume(virt_dom, disk_dev, conf.source_path, resize_to)"},{"line_number":1480,"context_line":"        self._disconnect_volume(old_connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_8c52c3db","line":1477,"in_reply_to":"baa201ad_2503bab9","updated":"2014-09-30 01:59:02.000000000","message":"I opened the following bug - https://bugs.launchpad.net/nova/+bug/1375531","commit_id":"3256f520fe16a90c18ca83754241383ff3092dc9"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"d72d0f56f32bd294a9c783353648442a821b18ea","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"            nova_context.get_admin_context(), volume_id)"},{"line_number":1475,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"},{"line_number":1476,"context_line":"        driver_bdm[\u0027connection_info\u0027] \u003d new_connection_info"},{"line_number":1477,"context_line":"        driver_bdm.save(nova_context.get_admin_context())"},{"line_number":1478,"context_line":""},{"line_number":1479,"context_line":"        self._swap_volume(virt_dom, disk_dev, conf.source_path, resize_to)"},{"line_number":1480,"context_line":"        self._disconnect_volume(old_connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_2503bab9","line":1477,"in_reply_to":"baa201ad_4246f4c0","updated":"2014-09-29 15:45:35.000000000","message":"Sure, will do.","commit_id":"3256f520fe16a90c18ca83754241383ff3092dc9"}],"nova/virt/libvirt/volume.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f75d84502fbca92abc01f10e704c9c03e95a3597","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                host_device \u003d multipath_device"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        connection_info[\u0027data\u0027][\u0027host_device\u0027] \u003d host_device"},{"line_number":339,"context_line":"        connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d host_device"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    @utils.synchronized(\u0027connect_volume\u0027)"},{"line_number":342,"context_line":"    def disconnect_volume(self, connection_info, disk_dev):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_8231bca4","line":339,"updated":"2014-09-29 15:27:12.000000000","message":"?? I think you meand to remove this line :)","commit_id":"3256f520fe16a90c18ca83754241383ff3092dc9"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"d72d0f56f32bd294a9c783353648442a821b18ea","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                host_device \u003d multipath_device"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        connection_info[\u0027data\u0027][\u0027host_device\u0027] \u003d host_device"},{"line_number":339,"context_line":"        connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d host_device"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    @utils.synchronized(\u0027connect_volume\u0027)"},{"line_number":342,"context_line":"    def disconnect_volume(self, connection_info, disk_dev):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_c59e6e56","line":339,"in_reply_to":"baa201ad_8231bca4","updated":"2014-09-29 15:45:35.000000000","message":":P  I will remove.","commit_id":"3256f520fe16a90c18ca83754241383ff3092dc9"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"8384b415fe287ee1f83e5568c9909f42417aba81","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        connection_info[\u0027data\u0027][\u0027host_device\u0027] \u003d host_device"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # Set device_path so connection_info it is consistent with other"},{"line_number":341,"context_line":"        # drivers"},{"line_number":342,"context_line":"        connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d host_device"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_cd3113ee","line":340,"updated":"2014-09-30 18:31:00.000000000","message":"i think you meant \"connection_info is consistent\"","commit_id":"1570d818a67cef9a5f78c3c208885befb1f9640f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"b6b5307242741378fd83efb6bf1a8692961dfc6c","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        connection_info[\u0027data\u0027][\u0027host_device\u0027] \u003d host_device"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # Set device_path so connection_info it is consistent with other"},{"line_number":341,"context_line":"        # drivers"},{"line_number":342,"context_line":"        connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d host_device"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_78962396","line":340,"in_reply_to":"baa201ad_6d20274a","updated":"2014-09-30 19:01:51.000000000","message":"Since connection_info[\u0027data\u0027][\u0027host_device\u0027] and connection_info[\u0027data\u0027][\u0027device_path\u0027] are the same, and connection_info[\u0027data\u0027][\u0027host_device\u0027] is only used to hold host_device so it could be retrieved later by get_config in L267, I am going to set connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d host_device.  This will remove redundancies in the dict.  Also, connection_info[\u0027data\u0027][\u0027device_path\u0027] is used by volume encryptors, so connection_info[\u0027data\u0027][\u0027device_path\u0027] must be set here, otherwise, tempest tests would fail.","commit_id":"1570d818a67cef9a5f78c3c208885befb1f9640f"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"82491c894009d3ecd07d7e0a1f411057f9129dfd","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        connection_info[\u0027data\u0027][\u0027host_device\u0027] \u003d host_device"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # Set device_path so connection_info it is consistent with other"},{"line_number":341,"context_line":"        # drivers"},{"line_number":342,"context_line":"        connection_info[\u0027data\u0027][\u0027device_path\u0027] \u003d host_device"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_6d20274a","line":340,"in_reply_to":"baa201ad_cd3113ee","updated":"2014-09-30 18:32:24.000000000","message":"Yes. Woops.","commit_id":"1570d818a67cef9a5f78c3c208885befb1f9640f"}]}
