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

Ansible playbook fatal error Could not find the requested service systemd-coredump: host" #9815

Closed
mildas opened this issue Nov 14, 2022 · 2 comments · Fixed by #9819
Closed
Assignees
Labels
productization-issue Issue found in upstream stabilization process.

Comments

@mildas
Copy link
Contributor

mildas commented Nov 14, 2022

Description of problem:

ansible-playbook fails on finding systemd-coredump service and exits on fatal error:


TASK [Disable service systemd-coredump] ****************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not find the requested service systemd-coredump: host"}

SCAP Security Guide Version:

4413901

Operating System Version:

RHEL8, RHEL9

Steps to Reproduce:

  1. ansible-playbook -i "localhost," -c local /usr/share/scap-security-guide/ansible/rhel9-playbook-ospp.yml

Actual Results:

TASK [Disable service systemd-coredump] ****************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not find the requested service systemd-coredump: host"}

Expected Results:

ansible-playbook finishes

Additional Information/Debugging Steps:

The problem was introduced by service_disabled alignment to service_enabled - #9806 Where I didn't realized there might be service rules that are for sockets, not for services.

Previously, service_disabled template was doing both, disabling service and disabling socket. Is it correct approach?

Is it expected that both are being disabled if exist? Or every time only a one of them should disable?
If the latter, then rules for sockets should specify the socket suffix in the servicename, for example servicename: systemd-coredump.socket in
https://github.com/ComplianceAsCode/content/blob/master/linux_os/guide/system/permissions/restrictions/coredumps/service_systemd-coredump_disabled/rule.yml#L53

@yuumasato
Copy link
Member

yuumasato commented Nov 14, 2022

I think it makes sense to disable both the service and the socket when it exists, there are services that can be started via socket.

@mildas
Copy link
Contributor Author

mildas commented Nov 14, 2022

Okay, so I have reverted the #9806 alignment in #9819

@mildas mildas added the productization-issue Issue found in upstream stabilization process. label Nov 16, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
productization-issue Issue found in upstream stabilization process.
Projects
None yet
2 participants