Skip to content

fix: use the right systemd service for remediations in EL 10+#209

Merged
richm merged 1 commit intolinux-system-roles:mainfrom
ptoscano:insights-rhc-service
Jan 24, 2025
Merged

fix: use the right systemd service for remediations in EL 10+#209
richm merged 1 commit intolinux-system-roles:mainfrom
ptoscano:insights-rhc-service

Conversation

@ptoscano
Copy link
Collaborator

EL 10 has a newer yggdrasil service for remediations, so instead of 'rhcd' the upstream name 'yggdrasil' is used.

Hence:

  • create an helper variable for the service name depending on the EL version; since Insights is specific to RHEL, it is possible to assume the name based on the major version of the distribution
  • use the new variable when enabling or disabling the service for remediations
  • in the test case for remediation:
    • export the variables of the role as public, so the new private variable can be used
    • set an helper fact with the systemd service including the '.service' extension

Fixes: CCT-1057

EL 10 has a newer yggdrasil service for remediations, so instead of
'rhcd' the upstream name 'yggdrasil' is used.

Hence:
- create an helper variable for the service name depending on the EL
  version; since Insights is specific to RHEL, it is possible to assume
  the name based on the major version of the distribution
- use the new variable when enabling or disabling the service for
  remediations
- in the test case for remediation:
  - export the variables of the role as public, so the new private
    variable can be used
  - set an helper fact with the systemd service including the '.service'
    extension

Fixes: CCT-1057

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
@ptoscano ptoscano force-pushed the insights-rhc-service branch from 6e4ead4 to d3fc6de Compare January 20, 2025 17:21
@richm
Copy link
Contributor

richm commented Jan 20, 2025

[citest]

@ptoscano ptoscano marked this pull request as ready for review January 24, 2025 17:08
@subpop
Copy link

subpop commented Jan 24, 2025

This LGTM. Thanks @ptoscano!

Copy link
Contributor

@richm richm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

el10 podman issues are known and unrelated

@richm richm merged commit 1d23e90 into linux-system-roles:main Jan 24, 2025
13 of 15 checks passed
@ptoscano ptoscano deleted the insights-rhc-service branch January 27, 2025 07:31
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

Successfully merging this pull request may close these issues.

3 participants

Comments