Bug #5675

DNS Proxy Issues

Added by Mike McRill over 3 years ago. Updated about 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Dominic Cleal
Category:DNS
Target version:Foreman - Sprint 25
Difficulty: Bugzilla link:1107700
Found in release:1.5.0 Pull request:
Story points-
Velocity based estimate-
Release1.5.2Release relationshipAuto

Description

I'm having issues registering DNS using 1.5.0-1. I'm using a smart-proxy configured with nsupdate-tsig. It worked perfectly prior to 1.5.0-1, now I'm getting this error:

Failed to save: Create DNS record for test1111111.mydomain.com task failed with the following error: ERF12-2357 [ProxyA PI::ProxyException]: Unable to set DNS entry ([RestClient::Bad Request]: 400 Bad Request) for proxy https://puppet.mydomain.com: 8443/dns
Rendered hosts/_progress.html.erb (0.2ms)
Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
Rendered puppetclasses/_classes_in_groups.html.erb (0.0ms)
Rendered puppetclasses/_classes.html.erb (31.5ms)
Rendered puppetclasses/_class_selection.html.erb (80.5ms)
Rendered hosts/_compute.html.erb (5.4ms)
Rendered common/_domain.html.erb (5.9ms)
Rendered hosts/_interfaces.html.erb (7.1ms)
Rendered common/os_selection/_architecture.html.erb (3.7ms)
Rendered common/os_selection/_operatingsystem.html.erb (7.1m s)
Rendered hosts/_operating_system.html.erb (16.8ms)
Rendered hosts/_unattended.html.erb (43.5ms)
Rendered puppetclasses/_class_parameters.html.erb (240.0ms)
Rendered puppetclasses/_classes_parameters.html.erb (249.2ms )
Rendered common_parameters/_inherited_parameters.html.erb (0 .1ms)
Rendered common_parameters/_puppetclass_parameter.html.erb ( 3.4ms)
Rendered common_parameters/_puppetclasses_parameters.html.er b (5.1ms)
Rendered common_parameters/_parameter.html.erb (2.5ms)
Rendered common_parameters/_parameters.html.erb (24.4ms)
Rendered hosts/_form.html.erb (455.3ms)
Rendered hosts/new.html.erb within layouts/application (456. 8ms)
Rendered home/_user_dropdown.html.erb (1.3ms)
Read fragment views/tabs_and_title_records-2 (0.1ms)
Rendered home/_topbar.html.erb (2.4ms)
Rendered layouts/base.html.erb (3.8ms)
Completed 200 OK in 15095ms (Views: 435.0ms | ActiveRecord: 43 .6ms)

Associated revisions

Revision 62c7320b
Added by Dominic Cleal over 3 years ago

fixes #5675 - expect dns_key setting to be nil if not set

History

#1 Updated by Dominic Cleal over 3 years ago

  • Project changed from Foreman to Smart Proxy
  • Category set to DNS
  • Status changed from New to Need more information

Can you check /var/log/foreman-proxy/proxy.log? (You may also want to try with :log_level: DEBUG in the proxy settings.yml)

#2 Updated by Mike McRill over 3 years ago

Here is the output:

E, [2014-05-12T08:54:05.982995 #18598] ERROR -- : can't convert nil into String
D, [2014-05-12T08:54:05.983154 #18598] DEBUG -- : /usr/share/foreman-proxy/bin/../lib/proxy/dns/nsupdate.rb:12:in `exists?'
/usr/share/foreman-proxy/bin/../lib/proxy/dns/nsupdate.rb:12:in `initialize'
/usr/share/foreman-proxy/bin/../lib/proxy/dns/nsupdate_gss.rb:15:in `initialize'
/usr/share/foreman-proxy/bin/../lib/dns_api.rb:19:in `new'
/usr/share/foreman-proxy/bin/../lib/dns_api.rb:19:in `dns_setup'
/usr/share/foreman-proxy/bin/../lib/dns_api.rb:42:in `POST /dns/'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `route'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in `run'
/usr/share/foreman-proxy/bin/../lib/sinatra-patch.rb:42:in `run!'
/usr/share/foreman-proxy/bin/smart-proxy:44

#3 Updated by Dominic Cleal over 3 years ago

  • Status changed from Need more information to Ready For Testing
  • Assigned To set to Dominic Cleal
  • Target version set to Sprint 23
  • Release set to 1.5.1
  • Found in release set to 1.5.0

Regression from 3824d18, as the default for a setting changed from false to nil, so the check at the top of nsupdate.rb for SETTING.dns_key == false is no longer correct.

https://github.com/theforeman/smart-proxy/pull/156

#4 Updated by Mike McRill over 3 years ago

Changing dns_key to false in settings.yaml resolved the issue, thank you!

#5 Updated by Dominic Cleal over 3 years ago

Ah, that's a good workaround!

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 23 to Sprint 24

#7 Updated by Bryan Kearney over 3 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1107700

#8 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 24 to Sprint 25

#9 Updated by Dominic Cleal over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#10 Updated by Dominic Cleal about 3 years ago

  • Release changed from 1.5.1 to 1.5.2

Missed 1.5-stable.

#11 Updated by Dominic Cleal about 3 years ago

Mike McRill wrote:

Changing dns_key to false in settings.yaml resolved the issue, thank you!

As we just discovered via foreman-users, this workaround causes a problem with the fix here (and in 1.5.2) as it doesn't expect a boolean value. Apologies for the incompatibilities.

Users should remove dns_key from their config files.

Also available in: Atom PDF