Skip to content

Ansible Reboot Error Messages #64

@0x6d6f7468

Description

@0x6d6f7468

During post-installation Ansible playbook operations, remote installation results in the following errors:

PLAY [RITA Post: Reboot checks.] *************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************************************************************
ok: [143.198.144.80]

TASK [RITA Post: Check if reboot required on rpm-based systems.] *****************************************************************************************************************************************************************************
fatal: [143.198.144.80]: FAILED! => {"changed": true, "cmd": ["needs-restarting", "-r"], "delta": "0:00:00.360450", "end": "2025-07-08 23:02:28.475915", "msg": "non-zero return code", "rc": 1, "start": "2025-07-08 23:02:28.115465", "stder
r": "", "stderr_lines": [], "stdout": "Core libraries or services have been updated since boot-up:\n  * dbus\n  * glibc\n  * kernel\n  * microcode_ctl\n  * systemd\n\nReboot is required to fully utilize these updates.\nMore information: h
ttps://access.redhat.com/solutions/27943", "stdout_lines": ["Core libraries or services have been updated since boot-up:", "  * dbus", "  * glibc", "  * kernel", "  * microcode_ctl", "  * systemd", "", "Reboot is required to fully utilize
 these updates.", "More information: https://access.redhat.com/solutions/27943"]}
...ignoring

TASK [RITA Post: Check if reboot required on Debian/Ubuntu-based systems.] *******************************************************************************************************************************************************************
skipping: [143.198.144.80]

TASK [RITA Post: Rebooting system if needed.] ************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
fatal: [143.198.144.80]: FAILED! => {"changed": false, "msg": "This action (reboot) does not support async."}
...ignoring

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
143.198.144.80             : ok=35   changed=5    unreachable=0    failed=0    skipped=24   rescued=0    ignored=2

Note that the first error above is only relevant for RHEL targets (my understanding is that the output of needs-restarting -r is considered error output when the return code is 1. Mostly cosmetic, but would be cleaner to properly handle that output). The second error, however, prevents systems from being rebooted altogether, which may make this worth addressing sooner rather than later.

Solution for the first error seems to be removing ignore_errors: true and instead adding failed_when: reboot_result.rc is not defined. Solution for the second error seems to be simply removing async: 1, as Ansible documentation states that async is not supported at all for the reboot module.

There is another error that occurs during local installation on a RHEL system:

TASK [RITA Post: Rebooting system if needed.] **********************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "elapsed": 0, "msg": "Running reboot with local connection would reboot the control node.", "rebooted": false}
...ignoring

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=27   changed=3    unreachable=0    failed=0    skipped=31   rescued=0    ignored=2

We may want to catch that in a rescue block and display to users that a reboot may be appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions