Compliance policy without scap content raise an error "undefined method digest for nil:NilClass"
Environment
- Red Hat Satellite 6.2
Issue
-
Creating compliance policy without "Scap Content" should not be allowed but it's allowed in satellite 6.2
See upstream BZ. -
Running puppet agent on client will fail to generate ENC and raise below error in prodution.log
Failed to generate external nodes for scapclient.example.tst
| NoMethodError: undefined method `digest' for nil:NilClass
| /home/ares/Projekty/Zdrojaky/foreman_openscap/app/models/foreman_openscap/policy.rb:168:in `to_enc'
| /home/ares/Projekty/Zdrojaky/foreman_openscap/app/models/concerns/foreman_openscap/host_extensions.rb:68:in `map'
| /home/ares/Projekty/Zdrojaky/foreman_openscap/app/models/concerns/foreman_openscap/host_extensions.rb:68:in `policies_enc'
Resolution
- Login to Satellite webui and go to
Hosts -> Policies
- Look for policy where
Scap Content
is blank - Edit the policy, set correct
Scap Content
and Submit
Root Cause
- Compliance policy created without
Scap Content
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments