Error while adding hosts

Hi,

I updated my gems on the foreman host to the following

gem -v 1.4.2

daemon_controller (1.0.0)
fastthread (1.0.7)
ffi (1.0.11)
json (1.6.6)
mime-types (1.18)
mysql (2.8.1)
net-ldap (0.2.2)
net-ping (1.5.3)
passenger (3.0.11)
rack (1.4.1)
rack-protection (1.2.0)
rack-test (0.6.1)
rake (0.9.2.2)
rest-client (1.6.7)
ruby-libvirt (0.4.0)
rubygems-update (1.8.21, 1.4.2, 1.3.7)
sinatra (1.3.2)
tilt (1.3.3)

After updating i restarted the foreman-proxy and got the following
error

Starting foreman-proxy: :public is no longer used to avoid overloading
Module#public, use :public_folder instead
from /usr/share/foreman-proxy/bin/smart-proxy:21

So i changed :public to :public_folder - set :public_folder, APP_ROOT

  • '/public'

and Foremanproxy works.

After which i tried to add the hosts a error in the Frontend

Unable to save
DHCP Settings for obi.domain.local task failed with the following
error: No Subnet detected for: "192.168.122.0192.168.122.0"

I see the following in the proxy.log

D, [2012-04-04T14:47:25.113519 #3094] DEBUG – : Loading subnets for
127.0.0.1
D, [2012-04-04T14:47:25.113740 #3094] DEBUG – : Added
192.168.122.0/255.255.255.0 to 127.0.0.1
D, [2012-04-04T14:47:25.121569 #3094] DEBUG – : Loading subnet data
for 192.168.122.0/255.255.255.0
D, [2012-04-04T14:47:25.122208 #3094] DEBUG – : Added
zak.domain.local (192.168.122.2 / 52:54:00:72:97:33) to
192.168.122.0/255.255.255.0
I, [2012-04-04T14:47:25.122292 #3094] INFO – : Enumerated hosts on
192.168.122.0
D, [2012-04-04T14:47:25.122367 #3094] DEBUG – : Lazy loaded
192.168.122.0/255.255.255.0 records
D, [2012-04-04T14:47:25.122598 #3094] DEBUG – : Searching for free ip

  • pinging 192.168.122.1
    I, [2012-04-04T14:47:25.123800 #3094] INFO – : Found a pingable
    IP(192.168.122.1) address which does not have a Proxy::DHCP record
    D, [2012-04-04T14:47:25.123966 #3094] DEBUG – : Searching for free ip
  • pinging 192.168.122.3
    D, [2012-04-04T14:47:27.149201 #3094] DEBUG – : Found free ip
    192.168.122.3 out of a total of 253 free ips
    D, [2012-04-04T14:47:35.268955 #3094] DEBUG – : nsupdate: executed -
    update add testvm.domain.local. 86400 A 192.168.122.3
    D, [2012-04-04T14:47:35.439948 #3094] DEBUG – : nsupdate: executed -
    update add 3.122.168.192.in-addr.arpa. 86400 IN PTR
    testvm.domain.local
    D, [2012-04-04T14:47:35.594008 #3094] DEBUG – : Loading subnets for
    127.0.0.1
    D, [2012-04-04T14:47:35.594205 #3094] DEBUG – : Added
    192.168.122.0/255.255.255.0 to 127.0.0.1
    E, [2012-04-04T14:47:35.594824 #3094] ERROR – : No Subnet detected
    for: "192.168.122.0192.168.122.0"

D, [2012-04-04T14:37:15.027150 #2476] DEBUG – : /usr/share/foreman-
proxy/bin/…/lib/proxy/dhcp/server.rb:96:in addRecord' /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:26:inaddRecord'
/usr/share/foreman-proxy/bin/…/lib/dhcp_api.rb:91:in POST / dhcp/:network' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb: 1211:incall'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:
1211:in compile!' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in[]'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in
route!' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:inroute_eval'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in
route!' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:inprocess_route'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in
catch' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:inprocess_route'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in
route!' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:ineach'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in
route!' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:indispatch!'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in
call!' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:ininvoke'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in
catch' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:ininvoke'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in
call!' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:incall'
/usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/methodoverride.rb:
21:in call' /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/ protection/xss_header.rb:22:incall'
/usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/
protection/path_traversal.rb:16:in call' /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/ protection/json_csrf.rb:17:incall'
/usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/
protection/base.rb:47:in call' /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/ protection/xss_header.rb:22:incall'
/usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/logger.rb:15:in
call' /usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/head.rb:9:incall'
/usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/
showexceptions.rb:21:in call' /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb: 1334:incall'
/usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:
59:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:ineach'
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart'
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb: 13:inrun'
/usr/share/foreman-proxy/bin/…/lib/sinatra-patch.rb:32:in `run!'
/usr/share/foreman-proxy/bin/smart-proxy:102

Is this an issue with the sinatra package or something else?. This was
working before i updated the gems to a new version.

Regards,
Kevin

> Hi,
>
> I updated my gems on the foreman host to the following
>
> gem -v 1.4.2
>
> daemon_controller (1.0.0)
> fastthread (1.0.7)
> ffi (1.0.11)
> json (1.6.6)
> mime-types (1.18)
> mysql (2.8.1)
> net-ldap (0.2.2)
> net-ping (1.5.3)
> passenger (3.0.11)
> rack (1.4.1)
> rack-protection (1.2.0)
> rack-test (0.6.1)
> rake (0.9.2.2)
> rest-client (1.6.7)
> ruby-libvirt (0.4.0)
> rubygems-update (1.8.21, 1.4.2, 1.3.7)
> sinatra (1.3.2)
> tilt (1.3.3)
>
> After updating i restarted the foreman-proxy and got the following
> error
>
> Starting foreman-proxy: :public is no longer used to avoid overloading
> Module#public, use :public_folder instead
> from /usr/share/foreman-proxy/bin/smart-proxy:21
>
> So i changed :public to :public_folder - set :public_folder, APP_ROOT
> + '/public'
>
> and Foremanproxy works.
>
> After which i tried to add the hosts a error in the Frontend
>
> Unable to save
> DHCP Settings for obi.domain.local task failed with the following
> error: No Subnet detected for: "192.168.122.0192.168.122.0"
>
> I see the following in the proxy.log
>
> D, [2012-04-04T14:47:25.113519 #3094] DEBUG – : Loading subnets for
> 127.0.0.1
> D, [2012-04-04T14:47:25.113740 #3094] DEBUG – : Added
> 192.168.122.0/255.255.255.0 to 127.0.0.1
> D, [2012-04-04T14:47:25.121569 #3094] DEBUG – : Loading subnet data
> for 192.168.122.0/255.255.255.0
> D, [2012-04-04T14:47:25.122208 #3094] DEBUG – : Added
> zak.domain.local (192.168.122.2 / 52:54:00:72:97:33) to
> 192.168.122.0/255.255.255.0
> I, [2012-04-04T14:47:25.122292 #3094] INFO – : Enumerated hosts on
> 192.168.122.0
> D, [2012-04-04T14:47:25.122367 #3094] DEBUG – : Lazy loaded
> 192.168.122.0/255.255.255.0 records
> D, [2012-04-04T14:47:25.122598 #3094] DEBUG – : Searching for free ip
> - pinging 192.168.122.1
> I, [2012-04-04T14:47:25.123800 #3094] INFO – : Found a pingable
> IP(192.168.122.1) address which does not have a Proxy::DHCP record
> D, [2012-04-04T14:47:25.123966 #3094] DEBUG – : Searching for free ip
> - pinging 192.168.122.3
> D, [2012-04-04T14:47:27.149201 #3094] DEBUG – : Found free ip
> 192.168.122.3 out of a total of 253 free ips
> D, [2012-04-04T14:47:35.268955 #3094] DEBUG – : nsupdate: executed -
> update add testvm.domain.local. 86400 A 192.168.122.3
> D, [2012-04-04T14:47:35.439948 #3094] DEBUG – : nsupdate: executed -
> update add 3.122.168.192.in-addr.arpa. 86400 IN PTR
> testvm.domain.local
> D, [2012-04-04T14:47:35.594008 #3094] DEBUG – : Loading subnets for
> 127.0.0.1
> D, [2012-04-04T14:47:35.594205 #3094] DEBUG – : Added
> 192.168.122.0/255.255.255.0 to 127.0.0.1
> E, [2012-04-04T14:47:35.594824 #3094] ERROR – : No Subnet detected
> for: "192.168.122.0192.168.122.0"
>
> D, [2012-04-04T14:37:15.027150 #2476] DEBUG – : /usr/share/foreman-
> proxy/bin/…/lib/proxy/dhcp/server.rb:96:in addRecord' > /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:26:in >addRecord'
> /usr/share/foreman-proxy/bin/…/lib/dhcp_api.rb:91:in POST / > dhcp/:network' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb: > 1211:incall'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:
> 1211:in compile!' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in >[]'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in
> route!' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in >route_eval'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in
> route!' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in >process_route'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in
> catch' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in >process_route'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in
> route!' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in >each'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in
> route!' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in >dispatch!'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in
> call!' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in >invoke'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in
> catch' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in >invoke'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in
> call!' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in >call'
> /usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/methodoverride.rb:
> 21:in call' > /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/ > protection/xss_header.rb:22:incall'
> /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/
> protection/path_traversal.rb:16:in call' > /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/ > protection/json_csrf.rb:17:incall'
> /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/
> protection/base.rb:47:in call' > /usr/lib64/ruby/gems/1.8/gems/rack-protection-1.2.0/lib/rack/ > protection/xss_header.rb:22:incall'
> /usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/logger.rb:15:in
> call' > /usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/head.rb:9:incall'
> /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/
> showexceptions.rb:21:in call' > /usr/lib64/ruby/gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb: > 1334:incall'
> /usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:
> 59:in service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice'
> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' > /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread'
> /usr/lib/ruby/1.8/webrick/server.rb:162:in start' > /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread'
> /usr/lib/ruby/1.8/webrick/server.rb:95:in start' > /usr/lib/ruby/1.8/webrick/server.rb:92:ineach'
> /usr/lib/ruby/1.8/webrick/server.rb:92:in start' > /usr/lib/ruby/1.8/webrick/server.rb:23:instart'
> /usr/lib/ruby/1.8/webrick/server.rb:82:in start' > /usr/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb: > 13:inrun'
> /usr/share/foreman-proxy/bin/…/lib/sinatra-patch.rb:32:in `run!'
> /usr/share/foreman-proxy/bin/smart-proxy:102
>
> Is this an issue with the sinatra package or something else?. This was
> working before i updated the gems to a new version.

yeah sinatra 1.3.2 is broken, see https://github.com/sinatra/sinatra/issues/452

··· On Wed, Apr 4, 2012 at 5:51 PM, linuxbsdfreak wrote:

Regards,
Kevin


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.