Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1296877

Summary: Host creation failed with the following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS entry ([RestClient::BadRequest]: 400 Bad Request)
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: DHCP & DNSAssignee: Lukas Zapletal <lzap>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: mmccune
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-12 00:19:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1177570, 1281350    
Attachments:
Description Flags
foreman-debug none

Description Sachin Ghai 2016-01-08 10:18:34 UTC
Description of problem:
On submitting the edit host form, UI failed with error:

Unable to save

Create DNS record for sathost.idmqe.lab.eng.bos.redhat.com task failed with the following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://cloud-qe-9.idmqe.lab.eng.bos.redhat.com:9090/dns

Looks like satellite server is not creating a DNS record for newly created host

Version-Release number of selected component (if applicable):
satellite 6.1.6 compose 4

How reproducible:
always

Steps to Reproduce:
1. create a new host
2.
3.

Actual results:
Create DNS record for sathost.idmqe.lab.eng.bos.redhat.com task failed with the following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://cloud-qe-9.idmqe.lab.eng.bos.redhat.com:9090/dns

Expected results:
host create should work

Additional info:

2016-01-08 05:15:02 [I] Processing by HostsController#create as */*
2016-01-08 05:15:02 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"kUWt0y71R4fCViwX+/ScELdQJWkVmRrN79J+YGfzXfM=", "host"=>{"name"=>"sathost", "organization_id"=>"1", "location_id"=>"2", "hostgroup_id"=>"2", "compute_resource_id"=>"1", "compute_profile_id"=>"4", "environment_id"=>"3", "content_source_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "compute_attributes"=>{"cpus"=>"1", "memory"=>"1073741824", "nics_attributes"=>{"new_nics"=>{"type"=>"bridge", "_delete"=>"", "bridge"=>"enp0s29u1u1u5", "model"=>"virtio"}, "0"=>{"type"=>"network", "_delete"=>"", "network"=>"foreman", "model"=>"virtio"}}, "volumes_attributes"=>{"new_volumes"=>{"pool_name"=>"default", "capacity"=>"10G", "allocation"=>"0G", "format_type"=>"raw", "_delete"=>""}, "0"=>{"pool_name"=>"default", "capacity"=>"10G", "allocation"=>"0G", "format_type"=>"raw", "_delete"=>""}}, "start"=>"1"}, "domain_id"=>"1", "realm_id"=>"", "mac"=>"", "subnet_id"=>"1", "ip"=>"192.168.100.3", "interfaces_attributes"=>{"new_interfaces"=>{"_destroy"=>"false", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "managed"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"build", "build"=>"1", "medium_id"=>"", "ptable_id"=>"7", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "hostgroup"=>{"lifecycle_environment_id"=>"2", "content_view_id"=>"2"}, "capabilities"=>"build image", "provider"=>"Libvirt"}
2016-01-08 05:15:02 [I] Adding Compute instance for sathost.idmqe.lab.eng.bos.redhat.com
2016-01-08 05:15:02 [I] Create DHCP reservation for sathost.idmqe.lab.eng.bos.redhat.com-52:54:00:a3:2c:8b/192.168.100.3
2016-01-08 05:15:02 [I] Add DNS A record for sathost.idmqe.lab.eng.bos.redhat.com/192.168.100.3
2016-01-08 05:15:03 [W] Create DNS record for sathost.idmqe.lab.eng.bos.redhat.com task failed with the following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://cloud-qe-9.idmqe.lab.eng.bos.redhat.com:9090/dns/usr/share/foreman/lib/proxy_api/dns.rb:15:in `rescue in set'
/usr/share/foreman/lib/proxy_api/dns.rb:13:in `set'
/usr/share/foreman/lib/net/dns/a_record.rb:21:in `create'
/usr/share/foreman/app/models/concerns/orchestration/dns.rb:30:in `set_dns_a_record'
/usr/share/foreman/app/models/concerns/orchestration.rb:137:in `execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:85:in `block in process'
/usr/share/foreman/app/models/concerns/orchestration.rb:77:in `each'
/usr/share/foreman/app/models/concerns/orchestration.rb:77:in `process'
/usr/share/foreman/app/models/concerns/orchestration.rb:18:in `on_save'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:671:in `_run__2154991002288679617__save__3719715628232933379__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in `save'
/usr/share/foreman/app/models/concerns/foreman/sti.rb:29:in `save_with_type'
/usr/share/foreman/app/controllers/hosts_controller.rb:85:in `create'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:593:in `block (3 levels) in _run__3963152792051938922__process_action__8175062736620166__callbacks'

Comment 3 Sachin Ghai 2016-01-08 10:33:43 UTC
Created attachment 1112845 [details]
foreman-debug

Comment 4 Sachin Ghai 2016-01-08 10:49:16 UTC
Proxy.log:

10.16.xx.xx - - [08/Jan/2016 05:23:33] "POST /dns/ HTTP/1.1" 400 206 0.0202

Comment 6 Mike McCune 2016-01-12 00:18:01 UTC
marking this

Comment 7 Mike McCune 2016-01-12 00:19:09 UTC
Closing as a dupe of https://bugzilla.redhat.com/show_bug.cgi?id=1215659 as this is a transient issue that should be covered in testing of the above bug. If you feel we should re-open and keep as a separate bug feel free.

*** This bug has been marked as a duplicate of bug 1215659 ***