Bug #26185
Tracer rex templates don't handle reboot properly
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1534967
Calling reboot directly causes troubles both in ssh and ansible templates. Rex has special templates for dealing with it better
in in ssh templates, and in ansible, we should probably be using `reboot` module.
Steps to Reproduce:
1. Have system registered with remote execution SSH key deployed and with updated kernel
2. Go to Content host details -> Traces -> check "kernel" -> Restart Selected
Actual results:
System is restarted, but ReX job fails
Expected results:
Job should pass if restart worked (it worked for me) and trace item should go away.
Associated revisions
Fixes #26185 - remove sending traces after reboot and keep ssh
History
#1
Updated by The Foreman Bot about 3 years ago
- Assignee set to Ivan Necas
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7990 added
#2
Updated by Ivan Necas about 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|0432d0ec16772dfd4eddf0adb9b79a426fd94e69.
#3
Updated by John Mitsch about 3 years ago
- Triaged changed from No to Yes
- Target version set to Katello 3.12.0
- Category set to Hosts
- Subject changed from Tracer rex templates don't handle reboot properly to Tracer rex templates don't handle reboot properly
Fixes #26185 - fix traces action when upgrading kernel
Calling reboot directly doesn't play nicely in SSH neither does in
Ansible.
In SSH scripts, we need to call the power template to let the rex know
we expect the reboot. Although, even after that the traces would not
be updated until katello-tracer-upload is called.
Ansible allows us to reboot and call katello-tracer-upload afterwards,
therefore it should be our default preference for performing the tracing
actions. For this reason, I've added a migration to use the Ansible
template.
After this, I was able to upgrade new kernel, see the traces and after
using the UI to restart, I've eventually saw getting the traces away.