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

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

Merged
merged 1 commit into from
Jan 24, 2025

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 <[email protected]>
@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