Openscap not uploading reports - no proxy defined

Problem:

Reports are not uploading:

2018-05-07 14:25:09 85185f89 [app] [E] Failed to upload Arf Report, no OpenSCAP proxy set for host bootsrv1-test.

I have a smart proxy that has openscap proxy plugin and is refreshed so OpenSCAP shows up in smart proxy feature list.

irb(main):002:0> SmartProxy.find_by(name: ‘bootsrv1-test.DOMAIN’).features
=> #<ActiveRecord::Associations::CollectionProxy [#<Feature id: 2, name: “TFTP”, created_at: “2016-04-18 14:43:44”, updated_at: “2016-04-18 14:43:44”>, #<Feature id: 4, name: “DHCP”, created_at: “2016-04-18 14:43:44”, updated_at: “2016-04-18 14:43:44”>, #<Feature id: 7, name: “BMC”, created_at: “2016-04-18 14:43:44”, updated_at: “2016-04-18 14:43:44”>, #<Feature id: 10, name: “Logs”, created_at: “2016-04-18 14:43:44”, updated_at: “2016-04-18 14:43:44”>, #<Feature id: 11, name: “Openscap”, created_at: “2018-05-07 15:19:05”, updated_at: “2018-05-07 15:19:05”>]>

I used documented rake task to add default SCAP contents and created a single policy that I applied to client’s hostgroup. I event added the policy to the host via host’s index page.

Expected outcome:

I’d expect reports to be uploaded. Maybe I missed a step that associates a host to a openscap proxy? Right now it’s empty:

irb(main):001:0> Host.find_by(name: ‘bootsrv1-test.DOMAIN’).openscap_proxy
=> nil

Foreman and Proxy versions:

foreman-1.15.6-1.el7.noarch
foreman-proxy-1.15.6-1.el7.noarch

Foreman and Proxy plugin versions:

tfm-rubygem-foreman_openscap-0.7.13-1.fm1_15.el7.noarch
rubygem-smart_proxy_openscap-0.6.8-1.el7.noarch

Resolved this by editing my base hostgroup and assigning the OpenSCAP Proxy there. This wasn’t mentioned in the documentation so was easily missed. Opened issue for documentation.

https://projects.theforeman.org/issues/23540

1 Like