From 06eabc9783f76fcc6503d87dc83477f1b02f4d5a Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 18 Oct 2018 20:42:39 +0200 Subject: [PATCH] reboot: Add timeout in error to help troubleshooting (#47216) * reboot: Add timeout in error to help troubleshooting So we've been hit by 'Timed out waiting for boot_time check' and it was unclear what timeout was used for the boot_time check. By adding the timeout value it is easier to understand the used value, and verify if a change to the timeout is reflected in the output. * Add changelog fragment --- changelogs/fragments/reboot-show-timeout.yaml | 2 ++ lib/ansible/plugins/action/reboot.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/reboot-show-timeout.yaml diff --git a/changelogs/fragments/reboot-show-timeout.yaml b/changelogs/fragments/reboot-show-timeout.yaml new file mode 100644 index 0000000000..440560c7f8 --- /dev/null +++ b/changelogs/fragments/reboot-show-timeout.yaml @@ -0,0 +1,2 @@ +minor_changes: +- reboot - Expose timeout value in error message diff --git a/lib/ansible/plugins/action/reboot.py b/lib/ansible/plugins/action/reboot.py index 5d49d60978..7607517567 100644 --- a/lib/ansible/plugins/action/reboot.py +++ b/lib/ansible/plugins/action/reboot.py @@ -204,7 +204,7 @@ class ActionModule(ActionBase): fail_count += 1 time.sleep(fail_sleep) - raise TimedOutException('Timed out waiting for %s' % (action_desc)) + raise TimedOutException('Timed out waiting for %s (timeout=%s)' % (action_desc, reboot_timeout)) def perform_reboot(self): display.debug("%s: rebooting server" % self._task.action)