)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Force iSCSI disconnect after timeout"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to the async nature of Libvirt detachDeviceFlags[1] call, nova"},{"line_number":10,"context_line":"libvirt driver shouldn\u0027t simply assume device detach is always succeed"},{"line_number":11,"context_line":"after when detachDeviceFlags() returns. Instead, it needs to check the"},{"line_number":12,"context_line":"domain XML to verify if the device is really detached or not."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5afe65bd_5a9d0058","line":10,"updated":"2015-06-03 17:10:17.000000000","message":"s/is always succeed/always succeeds/","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Force iSCSI disconnect after timeout"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to the async nature of Libvirt detachDeviceFlags[1] call, nova"},{"line_number":10,"context_line":"libvirt driver shouldn\u0027t simply assume device detach is always succeed"},{"line_number":11,"context_line":"after when detachDeviceFlags() returns. Instead, it needs to check the"},{"line_number":12,"context_line":"domain XML to verify if the device is really detached or not."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5afe65bd_5d45fa14","line":10,"in_reply_to":"5afe65bd_5a9d0058","updated":"2015-06-03 18:31:01.000000000","message":"Done","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to the async nature of Libvirt detachDeviceFlags[1] call, nova"},{"line_number":10,"context_line":"libvirt driver shouldn\u0027t simply assume device detach is always succeed"},{"line_number":11,"context_line":"after when detachDeviceFlags() returns. Instead, it needs to check the"},{"line_number":12,"context_line":"domain XML to verify if the device is really detached or not."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change added a `libvirt_wait_detach_volume_seconds` option,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5afe65bd_5ab4e0cf","line":11,"updated":"2015-06-03 17:10:17.000000000","message":"s/after when/when/","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to the async nature of Libvirt detachDeviceFlags[1] call, nova"},{"line_number":10,"context_line":"libvirt driver shouldn\u0027t simply assume device detach is always succeed"},{"line_number":11,"context_line":"after when detachDeviceFlags() returns. Instead, it needs to check the"},{"line_number":12,"context_line":"domain XML to verify if the device is really detached or not."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change added a `libvirt_wait_detach_volume_seconds` option,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5afe65bd_3d047e48","line":11,"in_reply_to":"5afe65bd_5ab4e0cf","updated":"2015-06-03 18:31:01.000000000","message":"Done","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"after when detachDeviceFlags() returns. Instead, it needs to check the"},{"line_number":12,"context_line":"domain XML to verify if the device is really detached or not."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change added a `libvirt_wait_detach_volume_seconds` option,"},{"line_number":15,"context_line":"so that after this timeout value, libvirt volume driver will try to"},{"line_number":16,"context_line":"force disconnect the volume."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5afe65bd_5a02a070","line":14,"updated":"2015-06-03 17:10:17.000000000","message":"If you add a configuration option, Please prefix this particular paragraph with:\n\n DocImpact:\n\nto alert our excellent doc team about the change.","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":11,"context_line":"after when detachDeviceFlags() returns. Instead, it needs to check the"},{"line_number":12,"context_line":"domain XML to verify if the device is really detached or not."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change added a `libvirt_wait_detach_volume_seconds` option,"},{"line_number":15,"context_line":"so that after this timeout value, libvirt volume driver will try to"},{"line_number":16,"context_line":"force disconnect the volume."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5afe65bd_fdfdc63a","line":14,"in_reply_to":"5afe65bd_5a02a070","updated":"2015-06-03 18:31:01.000000000","message":"Done","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c32220451f8cf48376421ebb98f2c79c22f0032a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Qiu Yu \u003cqiuyu@ebaysf.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-10 15:02:15 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Force iSCSI disconnect after timeout"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to the async nature of Libvirt detachDeviceFlags[1] call, nova"},{"line_number":10,"context_line":"libvirt driver shouldn\u0027t simply assume device detach always succeeds"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3afb71cf_21d3ae61","line":7,"updated":"2015-06-11 09:20:36.000000000","message":"Please prefix with libvirt","commit_id":"2b435be2f6ad6796236c5f1ac2f24fe2a64bf0ea"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3edf2b083d8b187ce69188b319dc9d5331bb51","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Qiu Yu \u003cqiuyu@ebaysf.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-10 15:02:15 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Force iSCSI disconnect after timeout"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to the async nature of Libvirt detachDeviceFlags[1] call, nova"},{"line_number":10,"context_line":"libvirt driver shouldn\u0027t simply assume device detach always succeeds"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3afb71cf_6ee3c006","line":7,"in_reply_to":"3afb71cf_21d3ae61","updated":"2015-06-11 17:32:11.000000000","message":"Done","commit_id":"2b435be2f6ad6796236c5f1ac2f24fe2a64bf0ea"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"85bcacf074861e588f3ac67a754cd6800118e4eb","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"[1] http://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDetachDeviceFlags"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact"},{"line_number":24,"context_line":"Closes-Bug: #1436561"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I8426694774e440638967d2f2ca7eca779fab2db3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"da20952f_bbb9d330","line":23,"updated":"2015-08-27 06:38:08.000000000","message":"Please describe the new variable here","commit_id":"011724f03ca001f2e839acd86b2008f8dbbbfc5b"}],"nova/tests/unit/virt/libvirt/fakelibvirt.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":604,"context_line":"    def detachDevice(self, xml):"},{"line_number":605,"context_line":"        disk_info \u003d _parse_disk_info(etree.fromstring(xml))"},{"line_number":606,"context_line":"        disk_info[\u0027_attached\u0027] \u003d True"},{"line_number":607,"context_line":"        return disk_info in self._def[\u0027devices\u0027][\u0027disks\u0027]"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"    def detachDeviceFlags(self, xml, _flags):"},{"line_number":610,"context_line":"        self.detachDevice(xml)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_3a6fe42c","side":"PARENT","line":607,"updated":"2015-06-03 17:10:17.000000000","message":"Hmm, how exactly was this code working at all .... :(","commit_id":"498fab3111e642fdf4d0f5f19067e8de8f110fde"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":604,"context_line":"    def detachDevice(self, xml):"},{"line_number":605,"context_line":"        disk_info \u003d _parse_disk_info(etree.fromstring(xml))"},{"line_number":606,"context_line":"        disk_info[\u0027_attached\u0027] \u003d True"},{"line_number":607,"context_line":"        return disk_info in self._def[\u0027devices\u0027][\u0027disks\u0027]"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"    def detachDeviceFlags(self, xml, _flags):"},{"line_number":610,"context_line":"        self.detachDevice(xml)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_4e41bea8","side":"PARENT","line":607,"in_reply_to":"5afe65bd_3a6fe42c","updated":"2015-06-03 18:31:01.000000000","message":"seems to be doing nothing.","commit_id":"498fab3111e642fdf4d0f5f19067e8de8f110fde"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":605,"context_line":"        def _same_disk(disk1, disk2):"},{"line_number":606,"context_line":"            if len(disk1) !\u003d len(disk2):"},{"line_number":607,"context_line":"                return False"},{"line_number":608,"context_line":"            for (k, v) in disk1.iteritems():"},{"line_number":609,"context_line":"                if disk2.get(k) !\u003d v:"},{"line_number":610,"context_line":"                    return False"},{"line_number":611,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_7a0d5c8f","line":608,"updated":"2015-06-03 17:10:17.000000000","message":"Please use six.iteritems(), since \u003cdict\u003e.iteritems() is not Python3-compatible.","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":605,"context_line":"        def _same_disk(disk1, disk2):"},{"line_number":606,"context_line":"            if len(disk1) !\u003d len(disk2):"},{"line_number":607,"context_line":"                return False"},{"line_number":608,"context_line":"            for (k, v) in disk1.iteritems():"},{"line_number":609,"context_line":"                if disk2.get(k) !\u003d v:"},{"line_number":610,"context_line":"                    return False"},{"line_number":611,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_7d45566e","line":608,"in_reply_to":"5afe65bd_7a0d5c8f","updated":"2015-06-03 18:31:01.000000000","message":"Done","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":4678,"context_line":""},{"line_number":4679,"context_line":"        def side_effect(*args, **kwargs):"},{"line_number":4680,"context_line":"            return get_disk_xml_return_values.pop()"},{"line_number":4681,"context_line":"        mock_get_disk_xml.side_effect \u003d side_effect"},{"line_number":4682,"context_line":""},{"line_number":4683,"context_line":"        connection_info \u003d {\"driver_volume_type\": \"fake\","},{"line_number":4684,"context_line":"                           \"data\": {\"device_path\": \"/fake\","}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_5ad500b7","line":4681,"updated":"2015-06-03 17:10:17.000000000","message":"You can just do this instead of lines 4676-4681:\n\n # NOTE(qiuyu): return None after volume detached to emulate libvirt\n mock_get_disk_xml.side_effect \u003d (None, mock_xml, None, mock_xml)","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":4678,"context_line":""},{"line_number":4679,"context_line":"        def side_effect(*args, **kwargs):"},{"line_number":4680,"context_line":"            return get_disk_xml_return_values.pop()"},{"line_number":4681,"context_line":"        mock_get_disk_xml.side_effect \u003d side_effect"},{"line_number":4682,"context_line":""},{"line_number":4683,"context_line":"        connection_info \u003d {\"driver_volume_type\": \"fake\","},{"line_number":4684,"context_line":"                           \"data\": {\"device_path\": \"/fake\","}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_500de135","line":4681,"in_reply_to":"5afe65bd_5ad500b7","updated":"2015-06-03 18:31:01.000000000","message":"hmm, didn\u0027t know that. This version looks much cleaner! Thanks!\nActually with this form, I have to reverse the order of mocked result as well.\n\nDone.","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":4699,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4700,"context_line":"                mock_dom.detachDeviceFlags.assert_called_with(mock_xml, flags)"},{"line_number":4701,"context_line":"                mock_get_disk_xml.assert_called_with(mock_dom.XMLDesc(0),"},{"line_number":4702,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4703,"context_line":"                mock_disconnect_volume.assert_called_with("},{"line_number":4704,"context_line":"                    connection_info, \u0027vdc\u0027, force\u003dFalse)"},{"line_number":4705,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_9a993822","line":4702,"updated":"2015-06-03 17:10:17.000000000","message":"This is repeated from line 4698-4699. Please remove.","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":4699,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4700,"context_line":"                mock_dom.detachDeviceFlags.assert_called_with(mock_xml, flags)"},{"line_number":4701,"context_line":"                mock_get_disk_xml.assert_called_with(mock_dom.XMLDesc(0),"},{"line_number":4702,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4703,"context_line":"                mock_disconnect_volume.assert_called_with("},{"line_number":4704,"context_line":"                    connection_info, \u0027vdc\u0027, force\u003dFalse)"},{"line_number":4705,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_302825e2","line":4702,"in_reply_to":"5afe65bd_9a993822","updated":"2015-06-03 18:31:01.000000000","message":"no, it is not a duplicate, one for the original get_disk_xml call in detach_volume, another one for the newly introduced check_volume_detach()","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"23a9c0d6978e3c554d12adb1a32881fc060e14f3","unresolved":false,"context_lines":[{"line_number":4733,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4734,"context_line":"                mock_dom.detachDeviceFlags.assert_called_with(mock_xml, flags)"},{"line_number":4735,"context_line":"                mock_get_disk_xml.assert_called_with(mock_dom.XMLDesc(0),"},{"line_number":4736,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4737,"context_line":"                mock_disconnect_volume.assert_called_with("},{"line_number":4738,"context_line":"                    connection_info, \u0027vdc\u0027, force\u003dFalse)"},{"line_number":4739,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_5e0139ae","line":4736,"updated":"2015-06-09 18:26:16.000000000","message":"You can remove the above two lines. It is asserting exactly the same thing as lines 4732-4733 is: that *the last* call to mock_get_disk_xml was called with mock_dom.XMLDesc(0) and \u0027vdc\u0027.\n\nIf you want to verify that there were *two* calls to mock_get_disk_xml, both with the same arguments, you need to remove lines 4732-4733 and instead do this here:\n\n exp_call \u003d mock.call(mock_dom.XMLDesc(0), \u0027vdc\u0027)\n mock_get_disk_xml.assert_has_calls([exp_call, exp_call])","commit_id":"9242a5dfdf0fc824a3cbb58a3416523669b22de6"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"d13aa7610592c37dcb688e66cbfd61bbadb0249a","unresolved":false,"context_lines":[{"line_number":4733,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4734,"context_line":"                mock_dom.detachDeviceFlags.assert_called_with(mock_xml, flags)"},{"line_number":4735,"context_line":"                mock_get_disk_xml.assert_called_with(mock_dom.XMLDesc(0),"},{"line_number":4736,"context_line":"                                                     \u0027vdc\u0027)"},{"line_number":4737,"context_line":"                mock_disconnect_volume.assert_called_with("},{"line_number":4738,"context_line":"                    connection_info, \u0027vdc\u0027, force\u003dFalse)"},{"line_number":4739,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_52bfe8a9","line":4736,"in_reply_to":"3afb71cf_5e0139ae","updated":"2015-06-09 20:01:20.000000000","message":"Done","commit_id":"9242a5dfdf0fc824a3cbb58a3416523669b22de6"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"02935d2c884231fb488583744e9285af2bc07e69","unresolved":false,"context_lines":[{"line_number":5082,"context_line":"\u003c/domain\u003e\"\"\""},{"line_number":5083,"context_line":"        mock_dom \u003d mock.MagicMock()"},{"line_number":5084,"context_line":"        # NOTE(qiuyu): return None after volume detached to emulate libvirt"},{"line_number":5085,"context_line":"        mock_dom.XMLDesc.side_effect \u003d (mock_xml, None, mock_xml, None)"},{"line_number":5086,"context_line":""},{"line_number":5087,"context_line":"        connection_info \u003d {\"driver_volume_type\": \"fake\","},{"line_number":5088,"context_line":"                           \"data\": {\"device_path\": \"/fake\","}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_6c6611ef","line":5085,"updated":"2015-08-27 12:13:37.000000000","message":"This will not work, detach_volume will raise exception. There is special condition to verify output of guest.get_disk(disk_dev)","commit_id":"c80e480556b048298b0731ab78462d2f582764fc"}],"nova/tests/unit/virt/libvirt/test_volume.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"101836efd242eadb2a916b19f629dbac4a9e5968","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        # NOTE(vish) exists is to make driver assume connecting worked"},{"line_number":451,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda x: True)"},{"line_number":452,"context_line":"        libvirt_driver \u003d volume.LibvirtISCSIVolumeDriver(self.fake_conn)"},{"line_number":453,"context_line":"        if transport is not None:"},{"line_number":454,"context_line":"            self.stubs.Set(libvirt_driver, \u0027_get_host_device\u0027,"},{"line_number":455,"context_line":"                           lambda x: self.generate_device(transport, 1, False))"},{"line_number":456,"context_line":"            self.stubs.Set(libvirt_driver, \u0027_validate_transport\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_0ae2ff9f","line":453,"updated":"2015-06-04 20:20:04.000000000","message":"This will obviously never be not None since nothing else calls into this test, which was obviously copied from some other test.  So remove the kwarg.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"fdda403b1b3528f9aeb8dd4628fd7e26269d83fa","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        # NOTE(vish) exists is to make driver assume connecting worked"},{"line_number":451,"context_line":"        self.stubs.Set(os.path, \u0027exists\u0027, lambda x: True)"},{"line_number":452,"context_line":"        libvirt_driver \u003d volume.LibvirtISCSIVolumeDriver(self.fake_conn)"},{"line_number":453,"context_line":"        if transport is not None:"},{"line_number":454,"context_line":"            self.stubs.Set(libvirt_driver, \u0027_get_host_device\u0027,"},{"line_number":455,"context_line":"                           lambda x: self.generate_device(transport, 1, False))"},{"line_number":456,"context_line":"            self.stubs.Set(libvirt_driver, \u0027_validate_transport\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_4ebacec1","line":453,"in_reply_to":"3afb71cf_0ae2ff9f","updated":"2015-06-09 07:15:55.000000000","message":"Done","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint,"},{"line_number":1178,"context_line":"                      encryption\u003dNone):"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"        def _check_volume_detatch(virt_dom, disk_dev):"},{"line_number":1181,"context_line":"            xml \u003d self._get_disk_xml(virt_dom.XMLDesc(0), disk_dev)"},{"line_number":1182,"context_line":"            return True if not xml else False"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_1a5b0856","line":1180,"updated":"2015-06-03 17:10:17.000000000","message":"s/detatch/detach/ :)","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint,"},{"line_number":1178,"context_line":"                      encryption\u003dNone):"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"        def _check_volume_detatch(virt_dom, disk_dev):"},{"line_number":1181,"context_line":"            xml \u003d self._get_disk_xml(virt_dom.XMLDesc(0), disk_dev)"},{"line_number":1182,"context_line":"            return True if not xml else False"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_3056e55c","line":1180,"in_reply_to":"5afe65bd_1a5b0856","updated":"2015-06-03 18:31:01.000000000","message":"oops\n\nDone.","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":1208,"context_line":""},{"line_number":1209,"context_line":"            detach_success \u003d False"},{"line_number":1210,"context_line":"            for x in xrange(CONF.libvirt.wait_detach_volume_seconds):"},{"line_number":1211,"context_line":"                detach_success \u003d _check_volume_detatch(virt_dom, disk_dev)"},{"line_number":1212,"context_line":"                if detach_success:"},{"line_number":1213,"context_line":"                    break"},{"line_number":1214,"context_line":"                greenthread.sleep(1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_9a35b8f8","line":1211,"updated":"2015-06-03 17:10:17.000000000","message":"s/detatch/detach/","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":1208,"context_line":""},{"line_number":1209,"context_line":"            detach_success \u003d False"},{"line_number":1210,"context_line":"            for x in xrange(CONF.libvirt.wait_detach_volume_seconds):"},{"line_number":1211,"context_line":"                detach_success \u003d _check_volume_detatch(virt_dom, disk_dev)"},{"line_number":1212,"context_line":"                if detach_success:"},{"line_number":1213,"context_line":"                    break"},{"line_number":1214,"context_line":"                greenthread.sleep(1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_30602501","line":1211,"in_reply_to":"5afe65bd_9a35b8f8","updated":"2015-06-03 18:31:01.000000000","message":"Done","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"21eb6f96184965b1e84b7ccfade931cfff9721cb","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"                LOG.info(_LI(\"Device detached successfully.\"),"},{"line_number":1217,"context_line":"                         instance\u003dinstance)"},{"line_number":1218,"context_line":"            else:"},{"line_number":1219,"context_line":"                LOG.info(_LI(\"Timeout waiting graceful volume detach\"),"},{"line_number":1220,"context_line":"                         instance\u003dinstance)"},{"line_number":1221,"context_line":"                force_disconnect \u003d True"},{"line_number":1222,"context_line":"        except exception.InstanceNotFound:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_7d0af622","line":1219,"updated":"2015-06-03 17:10:17.000000000","message":"Please change the above log message to this:\n\n \"Timed out waiting for graceful volume detach. Now doing forced disconnect.\"","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3540a7b7319ddd2cc957f0cdbe60873e315935","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"                LOG.info(_LI(\"Device detached successfully.\"),"},{"line_number":1217,"context_line":"                         instance\u003dinstance)"},{"line_number":1218,"context_line":"            else:"},{"line_number":1219,"context_line":"                LOG.info(_LI(\"Timeout waiting graceful volume detach\"),"},{"line_number":1220,"context_line":"                         instance\u003dinstance)"},{"line_number":1221,"context_line":"                force_disconnect \u003d True"},{"line_number":1222,"context_line":"        except exception.InstanceNotFound:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_503f21d6","line":1219,"in_reply_to":"5afe65bd_7d0af622","updated":"2015-06-03 18:31:01.000000000","message":"Done","commit_id":"9345b57ffc8abdf9353e9acf5259cc9a9d3b3096"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"101836efd242eadb2a916b19f629dbac4a9e5968","unresolved":false,"context_lines":[{"line_number":170,"context_line":"               help\u003d\u0027Number of seconds to wait for instance to shut down after\u0027"},{"line_number":171,"context_line":"                    \u0027 soft reboot request is made. We fall back to hard reboot\u0027"},{"line_number":172,"context_line":"                    \u0027 if instance does not shutdown within this window.\u0027),"},{"line_number":173,"context_line":"    cfg.IntOpt(\u0027wait_detach_volume_seconds\u0027,"},{"line_number":174,"context_line":"               default\u003d60,"},{"line_number":175,"context_line":"               help\u003d\u0027Number of seconds to wait for volume to be detached after\u0027"},{"line_number":176,"context_line":"                    \u0027 the libvirt request being made. We fall back to force\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_ea5fa373","line":173,"updated":"2015-06-04 20:20:04.000000000","message":"I wish we could avoid adding yet another wait for thing to happen timeout config option, there are several in the compute manager but they don\u0027t really line up with the case here:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/compute/manager.py?id\u003d2015.1.0#n130\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/compute/manager.py?id\u003d2015.1.0#n204","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"fdda403b1b3528f9aeb8dd4628fd7e26269d83fa","unresolved":false,"context_lines":[{"line_number":170,"context_line":"               help\u003d\u0027Number of seconds to wait for instance to shut down after\u0027"},{"line_number":171,"context_line":"                    \u0027 soft reboot request is made. We fall back to hard reboot\u0027"},{"line_number":172,"context_line":"                    \u0027 if instance does not shutdown within this window.\u0027),"},{"line_number":173,"context_line":"    cfg.IntOpt(\u0027wait_detach_volume_seconds\u0027,"},{"line_number":174,"context_line":"               default\u003d60,"},{"line_number":175,"context_line":"               help\u003d\u0027Number of seconds to wait for volume to be detached after\u0027"},{"line_number":176,"context_line":"                    \u0027 the libvirt request being made. We fall back to force\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_0eecd68d","line":173,"in_reply_to":"3afb71cf_ea5fa373","updated":"2015-06-09 07:15:55.000000000","message":"Agree that we may have too many options. I hope, one more option here is still acceptable to give deployer more choice.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"101836efd242eadb2a916b19f629dbac4a9e5968","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"                      encryption\u003dNone):"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"        def _check_volume_detach(virt_dom, disk_dev):"},{"line_number":1195,"context_line":"            xml \u003d self._get_disk_xml(virt_dom.XMLDesc(0), disk_dev)"},{"line_number":1196,"context_line":"            return True if not xml else False"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_2a581b56","line":1195,"updated":"2015-06-04 20:20:04.000000000","message":"The libvirt docs also talk about registering and waiting for the http://libvirt.org/html/libvirt-libvirt-domain.html#VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event - if it\u0027s already removed that is sent immediately, else you\u0027d have to poll for it (or create an eventlet wait which has the timeout value configured).\n\nMight be cleaner to use the event if that works rather than polling ourselves, but the docs also say that\u0027s a valid option.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"fdda403b1b3528f9aeb8dd4628fd7e26269d83fa","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"                      encryption\u003dNone):"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"        def _check_volume_detach(virt_dom, disk_dev):"},{"line_number":1195,"context_line":"            xml \u003d self._get_disk_xml(virt_dom.XMLDesc(0), disk_dev)"},{"line_number":1196,"context_line":"            return True if not xml else False"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_ce223e01","line":1195,"in_reply_to":"3afb71cf_2a581b56","updated":"2015-06-09 07:15:55.000000000","message":"Yes, according to libvirt doc, either way is a valid option. Given that current implementation has already been verified in our production. I prefer to keep the way it is, and leave it (eventlet wating event) to further optimization if needed. Thoughts?","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca9ebabc7ada5fe90697f69a4cbf6d07a978992","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"                      encryption\u003dNone):"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"        def _check_volume_detach(virt_dom, disk_dev):"},{"line_number":1195,"context_line":"            xml \u003d self._get_disk_xml(virt_dom.XMLDesc(0), disk_dev)"},{"line_number":1196,"context_line":"            return True if not xml else False"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_1546f74e","line":1195,"in_reply_to":"3afb71cf_ce223e01","updated":"2015-06-09 21:11:45.000000000","message":"Works for me.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"101836efd242eadb2a916b19f629dbac4a9e5968","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"                detach_success \u003d _check_volume_detach(virt_dom, disk_dev)"},{"line_number":1226,"context_line":"                if detach_success:"},{"line_number":1227,"context_line":"                    break"},{"line_number":1228,"context_line":"                greenthread.sleep(1)"},{"line_number":1229,"context_line":"            if detach_success:"},{"line_number":1230,"context_line":"                LOG.info(_LI(\"Device detached successfully.\"),"},{"line_number":1231,"context_line":"                         instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_0af9df4d","line":1228,"updated":"2015-06-04 20:20:04.000000000","message":"This should probably be mocked out in the unit test so the test doesn\u0027t actually sleep at all.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"fdda403b1b3528f9aeb8dd4628fd7e26269d83fa","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"                detach_success \u003d _check_volume_detach(virt_dom, disk_dev)"},{"line_number":1226,"context_line":"                if detach_success:"},{"line_number":1227,"context_line":"                    break"},{"line_number":1228,"context_line":"                greenthread.sleep(1)"},{"line_number":1229,"context_line":"            if detach_success:"},{"line_number":1230,"context_line":"                LOG.info(_LI(\"Device detached successfully.\"),"},{"line_number":1231,"context_line":"                         instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_74b8b8c8","line":1228,"in_reply_to":"3afb71cf_0af9df4d","updated":"2015-06-09 07:15:55.000000000","message":"with fake libvirt driver and mocked side effect in libvirt/test_driver.py, detach ing is always success upon first trial. So actually no need to mock sleep out.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"101836efd242eadb2a916b19f629dbac4a9e5968","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"                    break"},{"line_number":1228,"context_line":"                greenthread.sleep(1)"},{"line_number":1229,"context_line":"            if detach_success:"},{"line_number":1230,"context_line":"                LOG.info(_LI(\"Device detached successfully.\"),"},{"line_number":1231,"context_line":"                         instance\u003dinstance)"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                LOG.info(_LI(\"Timed out waiting for graceful volume detach. \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_6ad173fb","line":1230,"updated":"2015-06-04 20:20:04.000000000","message":"Log the device for context.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"101836efd242eadb2a916b19f629dbac4a9e5968","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"                LOG.info(_LI(\"Device detached successfully.\"),"},{"line_number":1231,"context_line":"                         instance\u003dinstance)"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                LOG.info(_LI(\"Timed out waiting for graceful volume detach. \""},{"line_number":1234,"context_line":"                             \"Now doing forced disconnect.\"),"},{"line_number":1235,"context_line":"                         instance\u003dinstance)"},{"line_number":1236,"context_line":"                force_disconnect \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_ca086794","line":1233,"updated":"2015-06-04 20:20:04.000000000","message":"This seems like a warning rather than INFO.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"fdda403b1b3528f9aeb8dd4628fd7e26269d83fa","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"                LOG.info(_LI(\"Device detached successfully.\"),"},{"line_number":1231,"context_line":"                         instance\u003dinstance)"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                LOG.info(_LI(\"Timed out waiting for graceful volume detach. \""},{"line_number":1234,"context_line":"                             \"Now doing forced disconnect.\"),"},{"line_number":1235,"context_line":"                         instance\u003dinstance)"},{"line_number":1236,"context_line":"                force_disconnect \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_b4d99024","line":1233,"in_reply_to":"3afb71cf_ca086794","updated":"2015-06-09 07:15:55.000000000","message":"Done","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"101836efd242eadb2a916b19f629dbac4a9e5968","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                         instance\u003dinstance)"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                LOG.info(_LI(\"Timed out waiting for graceful volume detach. \""},{"line_number":1234,"context_line":"                             \"Now doing forced disconnect.\"),"},{"line_number":1235,"context_line":"                         instance\u003dinstance)"},{"line_number":1236,"context_line":"                force_disconnect \u003d True"},{"line_number":1237,"context_line":"        except exception.InstanceNotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_8a026f6e","line":1234,"updated":"2015-06-04 20:20:04.000000000","message":"Log the device for context.","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"fdda403b1b3528f9aeb8dd4628fd7e26269d83fa","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                         instance\u003dinstance)"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                LOG.info(_LI(\"Timed out waiting for graceful volume detach. \""},{"line_number":1234,"context_line":"                             \"Now doing forced disconnect.\"),"},{"line_number":1235,"context_line":"                         instance\u003dinstance)"},{"line_number":1236,"context_line":"                force_disconnect \u003d True"},{"line_number":1237,"context_line":"        except exception.InstanceNotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_5467fc4c","line":1234,"in_reply_to":"3afb71cf_8a026f6e","updated":"2015-06-09 07:15:55.000000000","message":"Done","commit_id":"7cddda760ef4bde7a941d7a6db7298fcafae6f93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de2537e31d8df00c28cccbeab4040a33f0f08733","unresolved":false,"context_lines":[{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint,"},{"line_number":1177,"context_line":"                      encryption\u003dNone):"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":1180,"context_line":"        force_disconnect \u003d False"},{"line_number":1181,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_eb50c20c","line":1178,"updated":"2015-06-11 16:16:15.000000000","message":"Please remove this unrelated whitespace change when you rebase.","commit_id":"2b435be2f6ad6796236c5f1ac2f24fe2a64bf0ea"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"5f3edf2b083d8b187ce69188b319dc9d5331bb51","unresolved":false,"context_lines":[{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":"    def detach_volume(self, connection_info, instance, mountpoint,"},{"line_number":1177,"context_line":"                      encryption\u003dNone):"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"        disk_dev \u003d mountpoint.rpartition(\"/\")[2]"},{"line_number":1180,"context_line":"        force_disconnect \u003d False"},{"line_number":1181,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_eee0d0ce","line":1178,"in_reply_to":"3afb71cf_eb50c20c","updated":"2015-06-11 17:32:11.000000000","message":"Done","commit_id":"2b435be2f6ad6796236c5f1ac2f24fe2a64bf0ea"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"23ef0dd29241605cd423bd2cdb58c688d8e28587","unresolved":false,"context_lines":[{"line_number":169,"context_line":"               help\u003d\u0027Number of seconds to wait for instance to shut down after\u0027"},{"line_number":170,"context_line":"                    \u0027 soft reboot request is made. We fall back to hard reboot\u0027"},{"line_number":171,"context_line":"                    \u0027 if instance does not shutdown within this window.\u0027),"},{"line_number":172,"context_line":"    cfg.IntOpt(\u0027wait_detach_volume_seconds\u0027,"},{"line_number":173,"context_line":"               default\u003d60,"},{"line_number":174,"context_line":"               help\u003d\u0027Number of seconds to wait for volume to be detached after\u0027"},{"line_number":175,"context_line":"                    \u0027 the libvirt request being made. We fall back to force\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_9c3b6feb","line":172,"updated":"2015-06-16 05:58:58.000000000","message":"could this vary between different backends?","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"89903a9e494c90ef4c242577f9928e659170f47c","unresolved":false,"context_lines":[{"line_number":169,"context_line":"               help\u003d\u0027Number of seconds to wait for instance to shut down after\u0027"},{"line_number":170,"context_line":"                    \u0027 soft reboot request is made. We fall back to hard reboot\u0027"},{"line_number":171,"context_line":"                    \u0027 if instance does not shutdown within this window.\u0027),"},{"line_number":172,"context_line":"    cfg.IntOpt(\u0027wait_detach_volume_seconds\u0027,"},{"line_number":173,"context_line":"               default\u003d60,"},{"line_number":174,"context_line":"               help\u003d\u0027Number of seconds to wait for volume to be detached after\u0027"},{"line_number":175,"context_line":"                    \u0027 the libvirt request being made. We fall back to force\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_9af534ee","line":172,"in_reply_to":"fa32b979_9c3b6feb","updated":"2015-07-15 19:25:16.000000000","message":"For libvirt driver, \"virDomainDetachDeviceFlags\" is asynchronous according to the documentation. So it apply for all backends as long as we\u0027re using libvirt detach device call.","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"23ef0dd29241605cd423bd2cdb58c688d8e28587","unresolved":false,"context_lines":[{"line_number":173,"context_line":"               default\u003d60,"},{"line_number":174,"context_line":"               help\u003d\u0027Number of seconds to wait for volume to be detached after\u0027"},{"line_number":175,"context_line":"                    \u0027 the libvirt request being made. We fall back to force\u0027"},{"line_number":176,"context_line":"                    \u0027 disconnect volume if the device fail to detach within\u0027"},{"line_number":177,"context_line":"                    \u0027 this window.\u0027),"},{"line_number":178,"context_line":"    cfg.StrOpt(\u0027cpu_mode\u0027,"},{"line_number":179,"context_line":"               choices\u003d(\u0027host-model\u0027, \u0027host-passthrough\u0027, \u0027custom\u0027, \u0027none\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_fc34fbfb","line":176,"updated":"2015-06-16 05:58:58.000000000","message":"fail \u003d\u003e fails","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"89903a9e494c90ef4c242577f9928e659170f47c","unresolved":false,"context_lines":[{"line_number":173,"context_line":"               default\u003d60,"},{"line_number":174,"context_line":"               help\u003d\u0027Number of seconds to wait for volume to be detached after\u0027"},{"line_number":175,"context_line":"                    \u0027 the libvirt request being made. We fall back to force\u0027"},{"line_number":176,"context_line":"                    \u0027 disconnect volume if the device fail to detach within\u0027"},{"line_number":177,"context_line":"                    \u0027 this window.\u0027),"},{"line_number":178,"context_line":"    cfg.StrOpt(\u0027cpu_mode\u0027,"},{"line_number":179,"context_line":"               choices\u003d(\u0027host-model\u0027, \u0027host-passthrough\u0027, \u0027custom\u0027, \u0027none\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_3f8dfad5","line":176,"in_reply_to":"fa32b979_fc34fbfb","updated":"2015-07-15 19:25:16.000000000","message":"Done","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9e0f60cc69da0c1d9a3ee1c87fd9b24919acb0ef","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                    encryptor.detach_volume(**encryption)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"            try:"},{"line_number":852,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"},{"line_number":853,"context_line":"            except Exception as exc:"},{"line_number":854,"context_line":"                with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":855,"context_line":"                    if destroy_disks:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_bd018d6c","line":852,"updated":"2015-06-16 07:07:27.000000000","message":"good catch, I think force detach flag here should be set to True.","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"23ef0dd29241605cd423bd2cdb58c688d8e28587","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                    encryptor.detach_volume(**encryption)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"            try:"},{"line_number":852,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"},{"line_number":853,"context_line":"            except Exception as exc:"},{"line_number":854,"context_line":"                with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":855,"context_line":"                    if destroy_disks:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_77c0047d","line":852,"updated":"2015-06-16 05:58:58.000000000","message":"what about here?","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"89903a9e494c90ef4c242577f9928e659170f47c","unresolved":false,"context_lines":[{"line_number":849,"context_line":"                    encryptor.detach_volume(**encryption)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"            try:"},{"line_number":852,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"},{"line_number":853,"context_line":"            except Exception as exc:"},{"line_number":854,"context_line":"                with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":855,"context_line":"                    if destroy_disks:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_ff70ed73","line":852,"in_reply_to":"fa32b979_bd018d6c","updated":"2015-07-15 19:25:16.000000000","message":"Done","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"23ef0dd29241605cd423bd2cdb58c688d8e28587","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"            state \u003d self._get_power_state(guest._domain)"},{"line_number":1212,"context_line":"            live \u003d state in (power_state.RUNNING, power_state.PAUSED)"},{"line_number":1213,"context_line":"            guest.detach_device(conf, persistent\u003dTrue, live\u003dlive)"},{"line_number":1214,"context_line":""},{"line_number":1215,"context_line":"            if encryption:"},{"line_number":1216,"context_line":"                # The volume must be detached from the VM before"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_57faa0be","line":1213,"updated":"2015-06-16 05:58:58.000000000","message":"why do we not do the validation withing the detach_device method. today you have an issue with isci, tomorrow it will be with something else. then you can you have the detach method return whether it has succeeded or not.\n\ni\u0027ll let the libvirt folks chime in on that. i just feel that this is the not the correct way to go at the moment","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"89903a9e494c90ef4c242577f9928e659170f47c","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"            state \u003d self._get_power_state(guest._domain)"},{"line_number":1212,"context_line":"            live \u003d state in (power_state.RUNNING, power_state.PAUSED)"},{"line_number":1213,"context_line":"            guest.detach_device(conf, persistent\u003dTrue, live\u003dlive)"},{"line_number":1214,"context_line":""},{"line_number":1215,"context_line":"            if encryption:"},{"line_number":1216,"context_line":"                # The volume must be detached from the VM before"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_bc4353ae","line":1213,"in_reply_to":"fa32b979_57faa0be","updated":"2015-07-15 19:25:16.000000000","message":"In general, I agree validation within detach_device looks more clean.\n\nBut in reality, inside guest.detach_device it is hard to do the check, because there\u0027s no libvirt method to check existence of a device given xml of that device only. That\u0027s what guest.get_interfaces, guest.get_disk do to parse XML before feeding device_detach. So I tend to think it is better to keep the validation logic outside the device_detach, otherwise it will need a major refactoring for detach_device itself.","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"9e0f60cc69da0c1d9a3ee1c87fd9b24919acb0ef","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"            state \u003d self._get_power_state(guest._domain)"},{"line_number":1212,"context_line":"            live \u003d state in (power_state.RUNNING, power_state.PAUSED)"},{"line_number":1213,"context_line":"            guest.detach_device(conf, persistent\u003dTrue, live\u003dlive)"},{"line_number":1214,"context_line":""},{"line_number":1215,"context_line":"            if encryption:"},{"line_number":1216,"context_line":"                # The volume must be detached from the VM before"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa32b979_5d42c13f","line":1213,"in_reply_to":"fa32b979_57faa0be","updated":"2015-06-16 07:07:27.000000000","message":"guest.detach_device() is just a wrapper of libvirt.detachDeviceFlags().  This call is async and it supports basically all device types, be it iSCSI or rbd or NFS : http://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDetachDeviceFlags\n\nThe async nature also applies to all device types detachDeviceFlags() it supports.\n\nAs for having new change within guest.detach_device() or here, I don\u0027t see much difference.","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"89903a9e494c90ef4c242577f9928e659170f47c","unresolved":false,"context_lines":[{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"            state \u003d self._get_power_state(guest._domain)"},{"line_number":1212,"context_line":"            live \u003d state in (power_state.RUNNING, power_state.PAUSED)"},{"line_number":1213,"context_line":"            guest.detach_device(conf, persistent\u003dTrue, live\u003dlive)"},{"line_number":1214,"context_line":""},{"line_number":1215,"context_line":"            if encryption:"},{"line_number":1216,"context_line":"                # The volume must be detached from the VM before"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_3f9bb567","line":1213,"in_reply_to":"fa32b979_5d42c13f","updated":"2015-07-15 19:25:16.000000000","message":"yup, I agree","commit_id":"c953b0c248b1cae6a87e7e038b6641d03fdabb31"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"02935d2c884231fb488583744e9285af2bc07e69","unresolved":false,"context_lines":[{"line_number":1249,"context_line":""},{"line_number":1250,"context_line":"            state \u003d self._get_power_state(guest._domain)"},{"line_number":1251,"context_line":"            live \u003d state in (power_state.RUNNING, power_state.PAUSED)"},{"line_number":1252,"context_line":"            guest.detach_device(conf, persistent\u003dTrue, live\u003dlive)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"            if encryption:"},{"line_number":1255,"context_line":"                # The volume must be detached from the VM before"}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_ecd54143","side":"PARENT","line":1252,"updated":"2015-08-27 12:13:37.000000000","message":"detach should to return an async object with a method wait. \n\nsomething like:\n\n  async \u003d guest.detach_device(conf...)\n  try:\n    async.wait(timeout\u003dconf...)\n    forced \u003d False\n  except Timeout:\n    forced \u003d True\n\nI will push a patch for implementing this pattern shortly...","commit_id":"e81593b8c2ecf0ad5fab92bca8ac13e6c1d09daa"}],"nova/virt/libvirt/volume/iscsi.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bc44f8853cdbc48944e3141a3f9e851bc78b79af","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \"\"\"Detach the volume from instance_name.\"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        LOG.debug(\"calling os-brick to detach iSCSI Volume\")"},{"line_number":93,"context_line":"        self.connector.disconnect_volume(connection_info[\u0027data\u0027], None, force)"},{"line_number":94,"context_line":"        LOG.debug(\"Disconnected iSCSI Volume %s\", disk_dev)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        super(LibvirtISCSIVolumeDriver,"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba8a016a_c8e9c8b8","line":93,"updated":"2015-11-19 02:31:25.000000000","message":"This is in os-brick now, so none of this actually works since that parameter is not defined in os-brick.","commit_id":"64323ee6addd200cfed8543da10627d075872f96"}]}
