Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needs-restarting should be checked for before installing packages? #68

Open
voiprodrigo opened this issue Aug 3, 2020 · 0 comments
Open

Comments

@voiprodrigo
Copy link

Hi,

For CentOS/RHEL systems, needs-restarting of the yum-utils package is used to evaluate if the system needs to be rebooted. However, at this stage, updates were already launched. I think it would be useful to check first and only launch the update task if needs-restarting is available, as the normal plan workflow will not attempt reboot if there's no updates to install.

The error in question:

...
Starting: task patching::reboot_required on 192.168.58.129
Finished: task patching::reboot_required with 1 failure in 1.59 sec
Finished: plan patching::reboot_required in 1.64 sec
Finished: plan test_patching in 4 min, 58 sec
Failed on 192.168.58.129:
  The task failed with exit code 4:
  ERROR - /usr/bin/needs-restarting isn't present on a RedHat/CentOS host. You probably need to install the package: yum-utils
Failed on 1 target: 192.168.58.129

If I then try a rerun:

...
Starting: task patching::update_history on 192.168.58.129
Finished: task patching::update_history with 0 failures in 0.66 sec
host                           | upgraded | installed
-----------------------------------------------------
192.168.58.129                 | 150      | 0
Finished: plan patching::update_history in 0.75 sec
Finished: plan test_patching in 5.19 sec
Plan completed successfully with no result

Any thoughts on this?

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant