Description of problem: On Red Hat Satellite 6.10, customer is using the ("Install Errata - Katello SSH Default") job template to patch their content hosts. After the patches have been installed, customer uses the following command to identify the services that need to be restarted: ~~~ # hammer host traces resolve --async --host-id ${HOST_ID} --trace-ids ${TRACE_IDS} ~~~ Customer requests that the ("Install Errata - Katello SSH Default") job template be extended so that it is capable of: 1. Identifying the services that need to be restarted after patching the host, and restart them. Similarly to: ~~~ # TRACE_IDS_LIST=( $(hammer --output=csv --no-headers host traces list --host-id "${HOST_ID}") ) # TRACE_IDS="$(echo ${TRACE_IDS_LIST[@]} | tr '[[:space:]]' ',' | sed 's/,$//g')" hammer host traces resolve --async --host-id ${HOST_ID} --trace-ids ${TRACE_IDS} ~~~ 2. Recognizing whether a reboot of the patched host is needed or not, and if it is needed, reboot the host. Version-Release number of selected component (if applicable): Red Hat Satellite 6.10
For newer EL*, there's dnf needs-restarting plugin which we could probably use. Considering it comes from dnf-plugins-core package, I'd hope we can rely on it being available