Bug 2178995 - [RFE] Extend the ("Install Errata - Katello SSH Default") job template to identify services that needs to be restarted after installing patches
Summary: [RFE] Extend the ("Install Errata - Katello SSH Default") job template to ide...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.10.7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-16 12:07 UTC by momran
Modified: 2023-08-09 13:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-19459 0 None None None 2023-08-09 13:01:42 UTC

Description momran 2023-03-16 12:07:24 UTC
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

Comment 1 Adam Ruzicka 2023-03-17 10:42:16 UTC
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


Note You need to log in before you can comment on or make changes to this bug.