Description of problem: I registered a host with satellite6.2 via puppet and later I tried to update facts, but when I ran "puppet agent -t" on host, following exception raised on host: 2016-04-15 07:58:45 [app] [I] Started GET "/node/cloud-qe-19.idmqe.lab.eng.bos.redhat.com?format=yml" for 10.16.96.112 at 2016-04-15 07:58:45 -0400 2016-04-15 07:58:45 [app] [I] Processing by HostsController#externalNodes as YML 2016-04-15 07:58:45 [app] [I] Parameters: {"name"=>"cloud-qe-19.idmqe.lab.eng.bos.redhat.com"} 2016-04-15 07:58:45 [app] [I] Rendered text template (0.0ms) 2016-04-15 07:58:45 [app] [I] Completed 200 OK in 178ms (Views: 0.4ms | ActiveRecord: 7.0ms) 2016-04-15 07:58:46 [app] [I] Started POST "/api/hosts/facts" for 10.16.96.112 at 2016-04-15 07:58:46 -0400 2016-04-15 07:58:46 [app] [I] Processing by Api::V2::HostsController#facts as JSON 2016-04-15 07:58:46 [app] [I] Parameters: {"facts"=>"[FILTERED]", "name"=>"cloud-qe-19.idmqe.lab.eng.bos.redhat.com", "certname"=>"cloud-qe-19.idmqe.lab.eng.bos.redhat.com", "apiv"=>"v2", :host=>{"name"=>"cloud-qe-19.idmqe.lab.eng.bos.redhat.com", "certname"=>"cloud-qe-19.idmqe.lab.eng.bos.redhat.com"}} 2016-04-15 07:58:46 [app] [W] Action failed | ActiveRecord::RecordInvalid: Validation failed: Fact name has already been taken | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/validations.rb:57:in `save!' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods/dirty.rb:29:in `save!' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:273:in `block in save!' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status' Version-Release number of selected component (if applicable): sat6.2 beta snap8.1 How reproducible: Steps to Reproduce: 1. register host via puppet 2. run puppet agent -t on host 3. Actual results: ActiveRecord::RecordInvalid: Validation failed: Fact name has already been taken Expected results: facts should be updated successfully Additional info: I register host via puppet and later I updated some interfaces manually on host and tan puppet agent -t to see the updated facts on webUI under host details -> NIC section but got exception mentioned in bz.
This fails before we even parse the facts to create network interfaces. It seems as there are some conflicting facts of a different type, probably from a plugin (subscription manager facts?). It seems to be reported as http://projects.theforeman.org/issues/13819 already.
Upstream bug component is Provisioning
Raising the severity as its affecting verification of ON_QA bugs.
Moving to POST since upstream bug http://projects.theforeman.org/issues/13819 has been closed
Verified with sat62 GA snap10.1 On updating facts of un-managed hosts, I don't see reported issue. 2016-05-13 05:34:57 [app] [I] Started POST "/api/hosts/facts" for 10.16.96.112 at 2016-05-13 05:34:57 -0400 2016-05-13 05:34:57 [app] [I] Processing by Api::V2::HostsController#facts as JSON 2016-05-13 05:34:57 [app] [I] Parameters: {"facts"=>"[FILTERED]", "name"=>"cloud-qe-15.idmqe.lab.eng.bos.redhat.com", "certname"=>"cloud-qe-15.idmqe.lab.eng.bos.redhat.com", "apiv"=>"v2", :host=>{"name"=>"cloud-qe-15.idmqe.lab.eng.bos.redhat.com", "certname"=>"cloud-qe-15.idmqe.lab.eng.bos.redhat.com"}} 2016-05-13 05:34:58 [app] [I] Import facts for 'cloud-qe-15.idmqe.lab.eng.bos.redhat.com' completed. Added: 110, Updated: 0, Deleted 0 facts 2016-05-13 05:34:59 [app] [I] Completed 201 Created in 1525ms (Views: 5.8ms | ActiveRecord: 932.1ms) 2016-05-13 05:34:59 [app] [I] Started GET "/node/cloud-qe-15.idmqe.lab.eng.bos.redhat.com?format=yml" for 10.16.96.112 at 2016-05-13 05:34:59 -0400 2016-05-13 05:34:59 [app] [I] Processing by HostsController#externalNodes as YML 2016-05-13 05:34:59 [app] [I] Parameters: {"name"=>"cloud-qe-15.idmqe.lab.eng.bos.redhat.com"} 2016-05-13 05:34:59 [app] [I] Rendered text template (0.0ms) 2016-05-13 05:34:59 [app] [I] Completed 200 OK in 115ms (Views: 0.7ms | ActiveRecord: 16.4ms) 2016-05-13 05:34:59 [app] [I] Started POST "/api/reports" for 10.16.96.112 at 2016-05-13 05:34:59 -0400 2016-05-13 05:34:59 [app] [I] Processing by Api::V2::ReportsController#create as JSON 2016-05-13 05:34:59 [app] [I] Parameters: {"report"=>"[FILTERED]", "apiv"=>"v2"} 2016-05-13 05:34:59 [app] [I] processing report for cloud-qe-15.idmqe.lab.eng.bos.redhat.com 2016-05-13 05:34:59 [app] [I] Imported report for cloud-qe-15.idmqe.lab.eng.bos.redhat.com in 0.17 seconds 2016-05-13 05:34:59 [app] [I] Rendered api/v2/reports/create.json.rabl (21.0ms) 2016-05-13 05:34:59 [app] [I] Completed 201 Created in 283ms (Views: 28.4ms | ActiveRecord: 143.1ms)
Validated this with sat6.2 GA snap11. Issue has been fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501