Description of problem: With the discovery image v3.4.4-1, even with v3.5.1, fact upload failed with below error: Validation failed: Name has already been taken, Discovery attributes set can't be blank. The error is caused by a blank attribute. See the following entries in production.log 2018-11-20 13:22:45 6fd4ba75 [app] [I] Started POST "/api/v2/discovered_hosts/facts" for 10.32.10.136 at 2018-11-20 13:22:45 +0100 2018-11-20 13:22:45 6fd4ba75 [app] [I] Processing by Api::V2::DiscoveredHostsController#facts as JSON 2018-11-20 13:22:45 6fd4ba75 [app] [I] Parameters: {"facts"=>"[FILTERED]", "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}} 2018-11-20 13:22:45 6fd4ba75 [app] [I] Current user: foreman_admin (administrator) 2018-11-20 13:22:45 6fd4ba75 [audit] [I] [mac005056aa94cf] deleted 0 (3.5ms) 2018-11-20 13:22:45 6fd4ba75 [audit] [I] [mac005056aa94cf] added 132 (345.2ms) 2018-11-20 13:22:45 6fd4ba75 [app] [W] Host discovery failed, facts: {"lib"=>"/usr/share/fdi/facts:/opt/extension/facts", --- --- "discovery_netmask"=>"255.255.255.0", "discovery_gateway"=>"xx.xx.xx.x", "discovery_dns"=>"xx.xx.xx.x", ""=>"", As you can see, for some reason, the facts has an empty attribute. Version-Release number of selected component (if applicable): 6.3.4 How reproducible: Hard as this is only observed in one customer's env Steps to Reproduce: use foreman-discovery-image-3.4.4 image for PXE-less discovery Actual results: Can't provision a host. Expected results: Can provision a host. Additional info: I think empty attributes(still not sure how this happens) should be automatically removed from the discovered facts before sending to the Satellite server.