)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"7b84f657c32cd0c87d5fce9ab0308e626c342940","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware: use hard reboot if soft reboot fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are edeg cases when a soft reboot will throw an exception. This"},{"line_number":10,"context_line":"may happen when the kernel hangs. In this case the instance is unable"},{"line_number":11,"context_line":"to be rebooted via a soft reboot and the tenant will be unable to"},{"line_number":12,"context_line":"reboot the instance."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a2fa921_db7b92f3","line":9,"updated":"2015-10-11 03:05:05.000000000","message":"small nit: edge","commit_id":"91385e897d95342b612fee9df817499518eff41d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a68af31e3cc0fc7dbb92e7847495606c14d82e51","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware: use hard reboot if soft reboot fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are edeg cases when a soft reboot will throw an exception. This"},{"line_number":10,"context_line":"may happen when the kernel hangs. In this case the instance is unable"},{"line_number":11,"context_line":"to be rebooted via a soft reboot and the tenant will be unable to"},{"line_number":12,"context_line":"reboot the instance."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a2fa921_1b926af6","line":9,"in_reply_to":"7a2fa921_db7b92f3","updated":"2015-10-11 03:58:51.000000000","message":"Done","commit_id":"91385e897d95342b612fee9df817499518eff41d"}],"nova/tests/unit/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"cf680de679a3c40da6d72f28881efd1e7442ac2c","unresolved":false,"context_lines":[{"line_number":2292,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":2293,"context_line":"            return {\u0027runtime.powerState\u0027: \u0027poweredOn\u0027,"},{"line_number":2294,"context_line":"                    \u0027summary.guest.toolsStatus\u0027: \u0027toolsOk\u0027,"},{"line_number":2295,"context_line":"                    \u0027summary.guest.toolsRunningStatus\u0027: \u0027guestToolsRunning\u0027}"},{"line_number":2296,"context_line":""},{"line_number":2297,"context_line":"        with contextlib.nested("},{"line_number":2298,"context_line":"                mock.patch.object(self._session, \"_call_method\","}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_8d47074b","line":2295,"updated":"2015-10-12 12:33:01.000000000","message":"nit: you could just use return_value parameter when making the _call_method mock","commit_id":"544b6442290de7716d087253f83f034d12ab4577"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"edbfe9aeb624fe72e73bce3963a48ebadef4357b","unresolved":false,"context_lines":[{"line_number":2292,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":2293,"context_line":"            return {\u0027runtime.powerState\u0027: \u0027poweredOn\u0027,"},{"line_number":2294,"context_line":"                    \u0027summary.guest.toolsStatus\u0027: \u0027toolsOk\u0027,"},{"line_number":2295,"context_line":"                    \u0027summary.guest.toolsRunningStatus\u0027: \u0027guestToolsRunning\u0027}"},{"line_number":2296,"context_line":""},{"line_number":2297,"context_line":"        with contextlib.nested("},{"line_number":2298,"context_line":"                mock.patch.object(self._session, \"_call_method\","}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_de76e005","line":2295,"in_reply_to":"7a2fa921_8d47074b","updated":"2015-10-13 08:49:18.000000000","message":"Done","commit_id":"544b6442290de7716d087253f83f034d12ab4577"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"cf680de679a3c40da6d72f28881efd1e7442ac2c","unresolved":false,"context_lines":[{"line_number":2300,"context_line":"                mock.patch.object(self._vmops, \u0027_soft_reboot\u0027,"},{"line_number":2301,"context_line":"                                  side_effect\u003dvexc.VimException),"},{"line_number":2302,"context_line":"                mock.patch.object(self._vmops, \u0027_hard_reboot\u0027)"},{"line_number":2303,"context_line":"        ) as (_call_method, _soft_reboot, _hard_reboot):"},{"line_number":2304,"context_line":"            self._vmops.reboot(self._instance, self.network_info, \u0027SOFT\u0027)"},{"line_number":2305,"context_line":"            _soft_reboot.assert_called_once_with(\u0027fake-ref\u0027, self._instance)"},{"line_number":2306,"context_line":"            _hard_reboot.assert_called_once_with(\u0027fake-ref\u0027, self._instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_4d51ef0d","line":2303,"updated":"2015-10-12 12:33:01.000000000","message":"nit: rather than use contextlib.nested we can use an inner function with decorators, it looks a bit nicer","commit_id":"544b6442290de7716d087253f83f034d12ab4577"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"edbfe9aeb624fe72e73bce3963a48ebadef4357b","unresolved":false,"context_lines":[{"line_number":2300,"context_line":"                mock.patch.object(self._vmops, \u0027_soft_reboot\u0027,"},{"line_number":2301,"context_line":"                                  side_effect\u003dvexc.VimException),"},{"line_number":2302,"context_line":"                mock.patch.object(self._vmops, \u0027_hard_reboot\u0027)"},{"line_number":2303,"context_line":"        ) as (_call_method, _soft_reboot, _hard_reboot):"},{"line_number":2304,"context_line":"            self._vmops.reboot(self._instance, self.network_info, \u0027SOFT\u0027)"},{"line_number":2305,"context_line":"            _soft_reboot.assert_called_once_with(\u0027fake-ref\u0027, self._instance)"},{"line_number":2306,"context_line":"            _hard_reboot.assert_called_once_with(\u0027fake-ref\u0027, self._instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_1e545852","line":2303,"in_reply_to":"7a2fa921_4d51ef0d","updated":"2015-10-13 08:49:18.000000000","message":"if possible i prefer to leave it like this","commit_id":"544b6442290de7716d087253f83f034d12ab4577"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0ebe58c5ed374c7febfa926b1d748967c27b36e7","unresolved":false,"context_lines":[{"line_number":1000,"context_line":"                reboot_type \u003d\u003d \"SOFT\"):"},{"line_number":1001,"context_line":"            try:"},{"line_number":1002,"context_line":"                self._soft_reboot(vm_ref, instance)"},{"line_number":1003,"context_line":"            except Exception as e:"},{"line_number":1004,"context_line":"                LOG.warning(_LW(\u0027Unable to soft reboot instance. \u0027"},{"line_number":1005,"context_line":"                                \u0027Exception: %s. Hard rebooting!\u0027),"},{"line_number":1006,"context_line":"                            e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_69136d0e","line":1003,"updated":"2015-10-12 19:31:24.000000000","message":"Surely you can catch something more specific here, right? Maybe even a vmware base class? With this, if we introduce a typo into the soft reboot path, we\u0027ll (almost) silently ignore and just start hard rebooting everything.","commit_id":"544b6442290de7716d087253f83f034d12ab4577"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"edbfe9aeb624fe72e73bce3963a48ebadef4357b","unresolved":false,"context_lines":[{"line_number":1000,"context_line":"                reboot_type \u003d\u003d \"SOFT\"):"},{"line_number":1001,"context_line":"            try:"},{"line_number":1002,"context_line":"                self._soft_reboot(vm_ref, instance)"},{"line_number":1003,"context_line":"            except Exception as e:"},{"line_number":1004,"context_line":"                LOG.warning(_LW(\u0027Unable to soft reboot instance. \u0027"},{"line_number":1005,"context_line":"                                \u0027Exception: %s. Hard rebooting!\u0027),"},{"line_number":1006,"context_line":"                            e, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_feee3cb3","line":1003,"in_reply_to":"7a2fa921_69136d0e","updated":"2015-10-13 08:49:18.000000000","message":"Done","commit_id":"544b6442290de7716d087253f83f034d12ab4577"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"322fe89fbfa699b7b7175f1b9cfd556d7f23a531","unresolved":false,"context_lines":[{"line_number":965,"context_line":"    def _soft_reboot(self, vm_ref, instance):"},{"line_number":966,"context_line":"        LOG.debug(\"Rebooting guest OS of VM\", instance\u003dinstance)"},{"line_number":967,"context_line":"        self._session._call_method(self._session.vim, \"RebootGuest\","},{"line_number":968,"context_line":"                                   vm_ref)"},{"line_number":969,"context_line":"        LOG.debug(\"Rebooted guest OS of VM\", instance\u003dinstance)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def _hard_reboot(self, vm_ref, instance):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_14cd7784","line":968,"updated":"2015-10-22 16:12:58.000000000","message":"Looking at the definition of RebootGuest there are a bunch of reasons a soft reboot might fail:\n\nhttp://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/vim.VirtualMachine.html#rebootGuest\n\nReasons it might which might surprise a user include... well all of them tbh. Not having VMware Tools installed on a particular guest, for eg, or a transient issue in vSphere.\n\nThe character of a hard reboot is quite different to a soft reboot. I still don\u0027t think this is a good idea.","commit_id":"13741d65f96e50d9efa806ab381b35da0b854e14"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"25add75fdbda46402b73ae22e3ed22537e0558ee","unresolved":false,"context_lines":[{"line_number":1043,"context_line":"            except vexc.VMwareDriverException:"},{"line_number":1044,"context_line":"                LOG.warning(_LW(\u0027Unable to soft reboot instance. \u0027"},{"line_number":1045,"context_line":"                                \u0027Hard rebooting!\u0027),"},{"line_number":1046,"context_line":"                            instance\u003dinstance)"},{"line_number":1047,"context_line":"                self._hard_reboot(vm_ref, instance)"},{"line_number":1048,"context_line":"        else:"},{"line_number":1049,"context_line":"            self._hard_reboot(vm_ref, instance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5aef4532_d8a4e758","line":1046,"updated":"2016-03-07 23:40:23.000000000","message":"Matt i understand your concern, except that if soft reboot fails, what will the user do besides go and do a hard reboot.  they don\u0027t really have a choice if they want to reboot and cannot soft reboot for whatever reason.","commit_id":"b13597bd7ed01179c1e46b54a8d69b8f0c3b51e6"}]}
