)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e5f63a28b7eb72659d1ba68e10f15f883628de9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Change an argument to a BDM object in the swap_volume method"},{"line_number":10,"context_line":"of LibvirtDriver in order to use a correct BDM object."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact"},{"line_number":13,"context_line":"Change-Id: I86b8fbb09b0f1ed4c667683de3827cd9b63bca7f"},{"line_number":14,"context_line":"Closes-Bug: #1490236"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a740942_f18d7731","line":12,"updated":"2015-12-14 07:50:53.000000000","message":"You should state the virt API here is changed.","commit_id":"03ab1046add77e8c96548ce79d40766e9c46dc9d"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"01c9d3d2fb9851cf9c0ca1f8ab88a346aebec43f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Change an argument to a BDM object in the swap_volume method"},{"line_number":10,"context_line":"of LibvirtDriver in order to use a correct BDM object."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact"},{"line_number":13,"context_line":"Change-Id: I86b8fbb09b0f1ed4c667683de3827cd9b63bca7f"},{"line_number":14,"context_line":"Closes-Bug: #1490236"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a7e1126_fcf295d1","line":12,"in_reply_to":"7a740942_f18d7731","updated":"2015-12-17 23:40:08.000000000","message":"Done","commit_id":"03ab1046add77e8c96548ce79d40766e9c46dc9d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fffee721c9baf598c7b23e42cd873e5615ca29cf","unresolved":false,"context_lines":[{"line_number":22,"context_line":"This patch changes an argument to a BDM object"},{"line_number":23,"context_line":"in the swap_volume method of LibvirtDriver."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"DocImpact: The swap_volume method\u0027s signature of virt drivers"},{"line_number":26,"context_line":"           (ComputeDriver) was changed."},{"line_number":27,"context_line":"           Change \u0027mountpoint\u0027 to \u0027bdm\u0027(Block Device Mapping)."},{"line_number":28,"context_line":"Change-Id: I86b8fbb09b0f1ed4c667683de3827cd9b63bca7f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a18252c_cfbb05e4","line":25,"updated":"2016-04-14 13:33:10.000000000","message":"We don\u0027t need the DocImpact tag for this, the virt driver API is unversioned and not made public. If anything, you\u0027d just want to inform out of tree drivers like powervm or lxd that the method signature is going to change.","commit_id":"3b204bbc1cbd11a2d4112c33d66bb4b5418d32ee"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"341ff56646ad94d1430d9d9a4a63c508aed88b11","unresolved":false,"context_lines":[{"line_number":22,"context_line":"This patch changes an argument to a BDM object"},{"line_number":23,"context_line":"in the swap_volume method of LibvirtDriver."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"DocImpact: The swap_volume method\u0027s signature of virt drivers"},{"line_number":26,"context_line":"           (ComputeDriver) was changed."},{"line_number":27,"context_line":"           Change \u0027mountpoint\u0027 to \u0027bdm\u0027(Block Device Mapping)."},{"line_number":28,"context_line":"Change-Id: I86b8fbb09b0f1ed4c667683de3827cd9b63bca7f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"5a18252c_cc592a90","line":25,"in_reply_to":"5a18252c_cfbb05e4","updated":"2016-04-15 05:51:22.000000000","message":"Done","commit_id":"3b204bbc1cbd11a2d4112c33d66bb4b5418d32ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6b6cf2757f7dee9c9a0b6e9ee86283396c7b7c35","unresolved":false,"context_lines":[{"line_number":17,"context_line":"It works fine in the case that cinder initiates swapping volumes"},{"line_number":18,"context_line":"because the ID of the attached volume isn\u0027t changed after"},{"line_number":19,"context_line":"swapping volumes."},{"line_number":20,"context_line":"But in the case that nova initiates swapping volumes,"},{"line_number":21,"context_line":"the ID of the attached volume is changed."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"So in the case that nova initiated swapping volumes,"},{"line_number":24,"context_line":"after swap volume function was performed once,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":45,"id":"fa7ab95a_c59c9a6c","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":41},"updated":"2016-09-02 13:44:45.000000000","message":"swap volume in nova really only exists for the cinder volume migration / retype operation, and we made swap volume an admin-only API in nova by default in mitaka, so in what case would someone want to run swap volume outside of volume migration / retype initiated by cinder? There might be a reason, and it doesn\u0027t mean we shouldn\u0027t fix this, I just wonder because it seems weird.","commit_id":"0c39ce7596d042454d39c09760075295c81ef4cc"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ef3ba2591b887ec6cf79c38366f2c1502bb793c","unresolved":false,"context_lines":[{"line_number":4890,"context_line":"                                                          connector)"},{"line_number":4891,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4892,"context_line":"        if old_cinfo and \u0027serial\u0027 not in old_cinfo:"},{"line_number":4893,"context_line":"            old_cinfo[\u0027serial\u0027] \u003d old_volume_id"},{"line_number":4894,"context_line":"        new_cinfo[\u0027serial\u0027] \u003d old_cinfo[\u0027serial\u0027]"},{"line_number":4895,"context_line":"        return (old_cinfo, new_cinfo)"},{"line_number":4896,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_dd329f0f","line":4893,"range":{"start_line":4893,"start_character":12,"end_line":4893,"end_character":47},"updated":"2016-04-14 14:04:24.000000000","message":"I asked this in Ryan\u0027s change https://review.openstack.org/#/c/304714/ but why don\u0027t we just always set this?\n\n  old_cinfo[\u0027serial\u0027] \u003d old_volume_id\n\nWouldn\u0027t that also fix this bug and then we don\u0027t have to change what\u0027s passed to the virt driver?","commit_id":"3b204bbc1cbd11a2d4112c33d66bb4b5418d32ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"68d17c1941d670d85d046639f9a4d3de3f444250","unresolved":false,"context_lines":[{"line_number":4891,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4892,"context_line":"        if old_cinfo and \u0027serial\u0027 not in old_cinfo:"},{"line_number":4893,"context_line":"            old_cinfo[\u0027serial\u0027] \u003d old_volume_id"},{"line_number":4894,"context_line":"        new_cinfo[\u0027serial\u0027] \u003d old_cinfo[\u0027serial\u0027]"},{"line_number":4895,"context_line":"        return (old_cinfo, new_cinfo)"},{"line_number":4896,"context_line":""},{"line_number":4897,"context_line":"    def _swap_volume(self, context, instance, bdm, connector,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_ef0ec18a","line":4894,"range":{"start_line":4894,"start_character":8,"end_line":4894,"end_character":49},"updated":"2016-04-14 13:44:59.000000000","message":"Is this even needed anymore? What worries me is we set this in new_cinfo which is returned from _swap_volume to swap_volume where it\u0027s used to update the (old) BDM, which seems wrong.\n\nThis is probably all old latent design, but it seems odd to me that we don\u0027t have 2 BDMs for this operation, one for the existing old attachment and one that we create for the new attachment, and then delete the old BDM once we\u0027ve swapped to the new one.","commit_id":"3b204bbc1cbd11a2d4112c33d66bb4b5418d32ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75c1d9ca3462a3c11646416c2e8a11c602c33215","unresolved":false,"context_lines":[{"line_number":4891,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4892,"context_line":"        if old_cinfo and \u0027serial\u0027 not in old_cinfo:"},{"line_number":4893,"context_line":"            old_cinfo[\u0027serial\u0027] \u003d old_volume_id"},{"line_number":4894,"context_line":"        new_cinfo[\u0027serial\u0027] \u003d old_cinfo[\u0027serial\u0027]"},{"line_number":4895,"context_line":"        return (old_cinfo, new_cinfo)"},{"line_number":4896,"context_line":""},{"line_number":4897,"context_line":"    def _swap_volume(self, context, instance, bdm, connector,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_7d2f0b88","line":4894,"range":{"start_line":4894,"start_character":8,"end_line":4894,"end_character":49},"in_reply_to":"5a18252c_ef0ec18a","updated":"2016-04-14 13:56:03.000000000","message":"I suppose we don\u0027t have 2 BDMs for swapping volumes because the BDMs are supposedly supposed to be unique based on the device_name (mountpoint) and instance uuid:\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L4327\n\nAnd in the case of swap volume we\u0027re trying to swap to a new volume but preserve the device_name.","commit_id":"3b204bbc1cbd11a2d4112c33d66bb4b5418d32ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7ebfe7abc491ffa97e0fcff263b32b0c894197b","unresolved":false,"context_lines":[{"line_number":4889,"context_line":"                                                          new_volume_id,"},{"line_number":4890,"context_line":"                                                          connector)"},{"line_number":4891,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4892,"context_line":"        if old_cinfo and \u0027serial\u0027 not in old_cinfo:"},{"line_number":4893,"context_line":"            old_cinfo[\u0027serial\u0027] \u003d old_volume_id"},{"line_number":4894,"context_line":"        new_cinfo[\u0027serial\u0027] \u003d old_cinfo[\u0027serial\u0027]"},{"line_number":4895,"context_line":"        return (old_cinfo, new_cinfo)"},{"line_number":4896,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a122d0e_54ad5830","line":4893,"range":{"start_line":4892,"start_character":8,"end_line":4893,"end_character":47},"updated":"2016-04-15 16:22:05.000000000","message":"Should we always just set serial in old_cinfo to the old_volume_id? Or is that dangerous in case they are different values?","commit_id":"d5122413f409a5f008045bee07543b7e0600000b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"4e099c7c92197eb4f4c232cf507cbb426b005e00","unresolved":false,"context_lines":[{"line_number":4889,"context_line":"                                                          new_volume_id,"},{"line_number":4890,"context_line":"                                                          connector)"},{"line_number":4891,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4892,"context_line":"        if old_cinfo and \u0027serial\u0027 not in old_cinfo:"},{"line_number":4893,"context_line":"            old_cinfo[\u0027serial\u0027] \u003d old_volume_id"},{"line_number":4894,"context_line":"        new_cinfo[\u0027serial\u0027] \u003d old_cinfo[\u0027serial\u0027]"},{"line_number":4895,"context_line":"        return (old_cinfo, new_cinfo)"},{"line_number":4896,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a122d0e_d5f30109","line":4893,"range":{"start_line":4892,"start_character":8,"end_line":4893,"end_character":47},"in_reply_to":"1a122d0e_54ad5830","updated":"2016-04-18 04:27:54.000000000","message":"If \u0027serial\u0027 does not exist in connection_info, \u0027serial\u0027 is set to volume ID.\nBut if \u0027serial\u0027 exists, it is left as it is.\nSo it is not dangerous.","commit_id":"d5122413f409a5f008045bee07543b7e0600000b"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"7b4bce298c9449a708bf05d29ce39508ef04f4f5","unresolved":false,"context_lines":[{"line_number":4889,"context_line":"                                                          new_volume_id,"},{"line_number":4890,"context_line":"                                                          connector)"},{"line_number":4891,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4892,"context_line":"        if old_cinfo and \u0027serial\u0027 not in old_cinfo:"},{"line_number":4893,"context_line":"            old_cinfo[\u0027serial\u0027] \u003d old_volume_id"},{"line_number":4894,"context_line":"        new_cinfo[\u0027serial\u0027] \u003d old_cinfo[\u0027serial\u0027]"},{"line_number":4895,"context_line":"        return (old_cinfo, new_cinfo)"},{"line_number":4896,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a122d0e_a8729547","line":4893,"range":{"start_line":4892,"start_character":8,"end_line":4893,"end_character":47},"in_reply_to":"1a122d0e_d5f30109","updated":"2016-04-21 16:25:14.000000000","message":"Will we run into issues in places like https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L1956 if we don\u0027t update the new connection_info serial to be equal the new_volume_id","commit_id":"d5122413f409a5f008045bee07543b7e0600000b"},{"author":{"_account_id":12184,"name":"Weiwei Gu","email":"gu.weiwei@zte.com.cn","username":"guweiwei"},"change_message_id":"5ac3c48bdae838bb61b1e450b74cfec94cc42ef3","unresolved":false,"context_lines":[{"line_number":4799,"context_line":"    def _init_volume_connection(self, context, new_volume_id,"},{"line_number":4800,"context_line":"                                old_volume_id, connector, instance, bdm):"},{"line_number":4801,"context_line":""},{"line_number":4802,"context_line":"        new_cinfo \u003d self.volume_api.initialize_connection(context,"},{"line_number":4803,"context_line":"                                                          new_volume_id,"},{"line_number":4804,"context_line":"                                                          connector)"},{"line_number":4805,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4806,"context_line":"        if \u0027serial\u0027 not in new_cinfo:"},{"line_number":4807,"context_line":"            new_cinfo[\u0027serial\u0027] \u003d new_volume_id"}],"source_content_type":"text/x-python","patch_set":36,"id":"1aa78d24_b037044c","line":4804,"range":{"start_line":4802,"start_character":0,"end_line":4804,"end_character":68},"updated":"2016-07-12 01:01:42.000000000","message":"Could return \u0027serial\u0027 from self.volume_api.initialize_connection.","commit_id":"ea071d38b2414d52a58f44934713d2002ce9fd3a"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"58eaaa5ec1dfd04a4f9f41001b7eaf0c0721457b","unresolved":false,"context_lines":[{"line_number":4799,"context_line":"    def _init_volume_connection(self, context, new_volume_id,"},{"line_number":4800,"context_line":"                                old_volume_id, connector, instance, bdm):"},{"line_number":4801,"context_line":""},{"line_number":4802,"context_line":"        new_cinfo \u003d self.volume_api.initialize_connection(context,"},{"line_number":4803,"context_line":"                                                          new_volume_id,"},{"line_number":4804,"context_line":"                                                          connector)"},{"line_number":4805,"context_line":"        old_cinfo \u003d jsonutils.loads(bdm[\u0027connection_info\u0027])"},{"line_number":4806,"context_line":"        if \u0027serial\u0027 not in new_cinfo:"},{"line_number":4807,"context_line":"            new_cinfo[\u0027serial\u0027] \u003d new_volume_id"}],"source_content_type":"text/x-python","patch_set":36,"id":"1aa78d24_307cb4b4","line":4804,"range":{"start_line":4802,"start_character":0,"end_line":4804,"end_character":68},"in_reply_to":"1aa78d24_b037044c","updated":"2016-07-12 01:14:42.000000000","message":"It is not related with this bug fix, I will change it in another patch.","commit_id":"ea071d38b2414d52a58f44934713d2002ce9fd3a"}],"nova/virt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"68d17c1941d670d85d046639f9a4d3de3f444250","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                    instance, bdm, resize_to):"},{"line_number":472,"context_line":"        \"\"\"Replace the volume attached to the given `instance`."},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"        :param dict old_connection_info:"},{"line_number":475,"context_line":"            The volume for this connection gets detached from the given"},{"line_number":476,"context_line":"            `instance`."},{"line_number":477,"context_line":"        :param dict new_connection_info:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_126c06cf","line":474,"updated":"2016-04-14 13:44:59.000000000","message":"Couldn\u0027t we also remove this and just get it from the bdm that\u0027s passed in now? I guess the issue would be it might not have \u0027serial\u0027 set into it for the old volume ID which is what the compute manager code is doing, but we could get the old volume ID from the bdm.volume_id value if we needed it.","commit_id":"3b204bbc1cbd11a2d4112c33d66bb4b5418d32ee"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e5f63a28b7eb72659d1ba68e10f15f883628de9","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"            self._host.write_instance_config(xml)"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"    def swap_volume(self, old_connection_info,"},{"line_number":1180,"context_line":"                    new_connection_info, instance, bdm, resize_to):"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        guest \u003d self._host.get_guest(instance)"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_91975339","line":1180,"updated":"2015-12-14 07:50:53.000000000","message":"is this bdm from the admin context? or was that just due to the fact that the context was never passed to this method?","commit_id":"03ab1046add77e8c96548ce79d40766e9c46dc9d"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"2e1911890c3da3527b6887aa1f3414181859ed2a","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"            self._host.write_instance_config(xml)"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"    def swap_volume(self, old_connection_info,"},{"line_number":1180,"context_line":"                    new_connection_info, instance, bdm, resize_to):"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        guest \u003d self._host.get_guest(instance)"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a710552_50e75c40","line":1180,"in_reply_to":"7a740942_91975339","updated":"2015-12-15 02:14:00.000000000","message":"The bdm is got by using the admin context in swap_volume method of ComputeManager in nova/compute/manager.py.\ncontext.elevated() is executed before the bdm is got.","commit_id":"03ab1046add77e8c96548ce79d40766e9c46dc9d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d26d3ee11e2c0b8a832d51c2adc32d5cb1e438d","unresolved":false,"context_lines":[{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"        guest \u003d self._host.get_guest(instance)"},{"line_number":1397,"context_line":""},{"line_number":1398,"context_line":"        disk_dev \u003d bdm.device_name.rpartition(\"/\")[2]"},{"line_number":1399,"context_line":"        if not guest.get_disk(disk_dev):"},{"line_number":1400,"context_line":"            raise exception.DiskNotFound(location\u003ddisk_dev)"},{"line_number":1401,"context_line":"        disk_info \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a061dce_66ec1790","line":1398,"updated":"2016-04-08 21:34:39.000000000","message":"So the mountpoint before was coming from the old (attached) volume, and now you\u0027re getting the mountpoint from the new (not yet attached) volume, are the mountpoints guaranteed to be the same?","commit_id":"b4516533a5f38eb7bc49623f37418585caff73ed"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0ba9fd0c5f2d41e10d427f16bbe8a8c75ca59a64","unresolved":false,"context_lines":[{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"        guest \u003d self._host.get_guest(instance)"},{"line_number":1397,"context_line":""},{"line_number":1398,"context_line":"        disk_dev \u003d bdm.device_name.rpartition(\"/\")[2]"},{"line_number":1399,"context_line":"        if not guest.get_disk(disk_dev):"},{"line_number":1400,"context_line":"            raise exception.DiskNotFound(location\u003ddisk_dev)"},{"line_number":1401,"context_line":"        disk_info \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_7823b0a7","line":1398,"in_reply_to":"9a061dce_66ec1790","updated":"2016-04-14 10:44:20.000000000","message":"\u003e  and now you\u0027re getting the mountpoint from the new (not yet attached) volume\n\nIt is not correct. The mountpoint is still got from old bdm.","commit_id":"b4516533a5f38eb7bc49623f37418585caff73ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d26d3ee11e2c0b8a832d51c2adc32d5cb1e438d","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"            raise NotImplementedError(_(\"Swap only supports host devices\"))"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"        # Save updates made in connection_info when connect_volume was called"},{"line_number":1414,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"},{"line_number":1415,"context_line":"        driver_bdm[\u0027connection_info\u0027] \u003d new_connection_info"},{"line_number":1416,"context_line":"        driver_bdm.save()"},{"line_number":1417,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a061dce_c66c0339","line":1414,"range":{"start_line":1414,"start_character":65,"end_line":1414,"end_character":68},"updated":"2016-04-08 21:34:39.000000000","message":"I guess the point is to use this bdm rather than whatever was retrieved before?  Please update the commit message to explain what the bug is and how this fixes it.","commit_id":"b4516533a5f38eb7bc49623f37418585caff73ed"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0ba9fd0c5f2d41e10d427f16bbe8a8c75ca59a64","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"            raise NotImplementedError(_(\"Swap only supports host devices\"))"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"        # Save updates made in connection_info when connect_volume was called"},{"line_number":1414,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"},{"line_number":1415,"context_line":"        driver_bdm[\u0027connection_info\u0027] \u003d new_connection_info"},{"line_number":1416,"context_line":"        driver_bdm.save()"},{"line_number":1417,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a18252c_a2b4ee81","line":1414,"range":{"start_line":1414,"start_character":65,"end_line":1414,"end_character":68},"in_reply_to":"9a061dce_c66c0339","updated":"2016-04-14 10:44:20.000000000","message":"Done","commit_id":"b4516533a5f38eb7bc49623f37418585caff73ed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"68d17c1941d670d85d046639f9a4d3de3f444250","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"            raise NotImplementedError(_(\"Swap only supports host devices\"))"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"        # Save updates made in connection_info when connect_volume was called"},{"line_number":1414,"context_line":"        volume_id \u003d new_connection_info.get(\u0027serial\u0027)"},{"line_number":1415,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("},{"line_number":1416,"context_line":"            nova_context.get_admin_context(), volume_id, instance.uuid)"},{"line_number":1417,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_32e66215","side":"PARENT","line":1414,"updated":"2016-04-14 13:44:59.000000000","message":"How is this any different from what the code is doing before this change? Before this change, the new_connection_info[\u0027serial\u0027] is set to the old_connection_info[\u0027serial\u0027] which is the old volume ID (from _init_volume_connection in the compute manager), and the bdm passed in now in this new change is the BDM for the old volume, so what\u0027s the difference?","commit_id":"b335318a6254e0e4752bcf0665579527b628c963"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb2ed960d639889c5a1b828bbe0e0c3d343d36ec","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"            raise NotImplementedError(_(\"Swap only supports host devices\"))"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"        # Save updates made in connection_info when connect_volume was called"},{"line_number":1414,"context_line":"        volume_id \u003d new_connection_info.get(\u0027serial\u0027)"},{"line_number":1415,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("},{"line_number":1416,"context_line":"            nova_context.get_admin_context(), volume_id, instance.uuid)"},{"line_number":1417,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a18252c_1de537db","side":"PARENT","line":1414,"in_reply_to":"5a18252c_32e66215","updated":"2016-04-14 13:59:53.000000000","message":"OK, I think I understand the issue now after looking at Ryan McNair\u0027s version of this fix:\n\nhttps://review.openstack.org/#/c/304714/2/nova/virt/libvirt/driver.py\n\nThe issue is that on the first swap volume operation, the new connection info serial is populated with the old connection info serial for the first time (in _init_volume_connection in the compute manager), but on the second swap volume, it won\u0027t update the old connection info serial because it\u0027s already set from the first swap volume operation, and will point at the original volume, which by this time will be wrong.","commit_id":"b335318a6254e0e4752bcf0665579527b628c963"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9064436b7912541a4e08b3bfb45e01816b04c4c7","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            raise NotImplementedError(_(\"Swap only supports host devices\"))"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Save updates made in connection_info when connect_volume was called"},{"line_number":1228,"context_line":"        volume_id \u003d old_connection_info.get(\u0027serial\u0027)"},{"line_number":1229,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("},{"line_number":1230,"context_line":"            nova_context.get_admin_context(), volume_id, instance.uuid)"},{"line_number":1231,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7aa08908_e64d9b9a","line":1228,"range":{"start_line":1228,"start_character":20,"end_line":1228,"end_character":39},"updated":"2016-06-06 20:06:11.000000000","message":"this seems important enough to warrant tests","commit_id":"4ff1cd687bea2350078c17f3354f60c07e33fce9"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"954d29452ed5fdf44fc735aee85a0f8b242476b8","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            raise NotImplementedError(_(\"Swap only supports host devices\"))"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"        # Save updates made in connection_info when connect_volume was called"},{"line_number":1228,"context_line":"        volume_id \u003d old_connection_info.get(\u0027serial\u0027)"},{"line_number":1229,"context_line":"        bdm \u003d objects.BlockDeviceMapping.get_by_volume_and_instance("},{"line_number":1230,"context_line":"            nova_context.get_admin_context(), volume_id, instance.uuid)"},{"line_number":1231,"context_line":"        driver_bdm \u003d driver_block_device.DriverVolumeBlockDevice(bdm)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7aa08908_37cc4888","line":1228,"range":{"start_line":1228,"start_character":20,"end_line":1228,"end_character":39},"in_reply_to":"7aa08908_e64d9b9a","updated":"2016-06-09 05:25:33.000000000","message":"Done","commit_id":"4ff1cd687bea2350078c17f3354f60c07e33fce9"}]}
