Bug 1095838 - [Rubygem-Staypuft]: DHCP conflict preventing to Assign hosts to host-groups (Warning!ERF Unable to retrieve DHCP -Net::LeaseConflict ).
Summary: [Rubygem-Staypuft]: DHCP conflict preventing to Assign hosts to host-groups (...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: rubygem-staypuft
Version: 4.0
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: z4
: 4.0
Assignee: Mike Burns
QA Contact: Omri Hochman
URL:
Whiteboard:
Depends On: 1097829
Blocks: 1093126
TreeView+ depends on / blocked
 
Reported: 2014-05-08 15:53 UTC by Omri Hochman
Modified: 2014-07-29 19:22 UTC (History)
6 users (show)

See Also:
Fixed In Version: foreman-1.6.0.9-1.el6sat foreman-proxy-1.6.0.6-1.el6sat
Doc Type: Bug Fix
Doc Text:
Not required -- docs will be part of the catch-all bugzilla (1093126) Cause: Consequence: Fix: Result:
Clone Of:
: 1097829 (view as bug list)
Environment:
Last Closed: 2014-07-15 16:59:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Omri Hochman 2014-05-08 15:53:26 UTC
[Rubygem-Staypuft]: DHCP conflict preventing to Assign hosts to host-groups (Warning!ERF  Unable to retrieve DHCP -Net::LeaseConflict ).
 

Environment  (puddle : OpenStack/Foreman/2014-05-06.6/) 
-------------------------------------------------------
ruby193-rubygem-staypuft-0.0.12-1.el6ost.noarch
foreman-installer-staypuft-0.0.10-1.el6ost.noarch
openstack-puppet-modules-2013.2-9.1.el6ost.noarch
puppet-server-3.3.2-2.el6.noarch
puppet-3.3.2-2.el6.noarch
foreman-1.5.0.22-1.el6sat.noarch

Steps
------
(1) Using Staypuft - Create any new deployment. 
(2) Attempt to assign hosts to host-groups.

Results:
--------
- Assign action failed with the following Error:  
" Warning!ERF12-4395  [ProxyAPI::ProxyException]: Unable to retrieve DHCP entry for  00:1a:4a:16:98:8e ([Net::LeaseConflict]: 00:1a:4a:16:98:8e/192.168.0.4)  for proxy https://oh-havana-foreman.scl.lab.tlv.redhat.com:8443/dhcp"

Comment 2 Omri Hochman 2014-05-08 16:01:18 UTC
/var/log/foreman/production.log:
---------------------------------

Started GET "/assets/staypuft/staypuft-64ffbed937f81dccea29fd6f68e1ab2d.js" for 10.36.4.114 at 2014-05-08 01:01:56 +0300
Fog is not installed - unable to manage compute resources
Client connected.
Connected to server.
Client disconnected.


Started PUT "/deployment_steps/services_configuration" for 10.36.4.114 at 2014-05-08 01:09:33 +0300
Processing by Staypuft::DeploymentStepsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"0egQELfArHir9zSPJQ5Xj0PKvG1s6AITw3AeNG9usEE=", "staypuft_deployment"=>{"hostgroup_params"=>{"3"=>{"puppetclass_params"=>{"184"=>{"ceilometer_metering_secret"=>"
[FILTERED]", "ceilometer_user_password"=>"[FILTERED]", "cinder_backend_gluster"=>"false", "cinder_backend_iscsi"=>"false", "cinder_db_password"=>"[FILTERED]", "cinder_gluster_servers"=>"192.168.0.4, 192.168.0.5,
 192.168.0.6", "cinder_gluster_volume"=>"cinder", "cinder_user_password"=>"[FILTERED]", "glance_db_password"=>"[FILTERED]", "glance_user_password"=>"[FILTERED]", "heat_cfn"=>"false", "heat_cloudwatch"=>"false", 
"heat_db_password"=>"[FILTERED]", "heat_user_password"=>"[FILTERED]", "heat_auth_encrypt_key"=>"b01b8c5f7753531fd9ae252100e8fbd3", "keystone_admin_token"=>"a508f16a546b0606348010df2f2db61e", "keystone_db_passwor
d"=>"[FILTERED]", "mysql_ca"=>"/etc/ipa/ca.crt", "mysql_cert"=>"/etc/pki/tls/certs/PRIV_HOST-mysql.crt", "mysql_host"=>"192.168.0.5", "mysql_key"=>"/etc/pki/tls/private/PRIV_HOST-mysql.key", "mysql_root_password
"=>"[FILTERED]", "admin_email"=>"admin.tlv.redhat.com", "admin_password"=>"[FILTERED]", "auto_assign_floating_ip"=>"True", "controller_priv_host"=>"192.168.0.5", "controller_pub_host"=>"192.168.0.5", "fr
eeipa"=>"false", "horizon_ca"=>"/etc/ipa/ca.crt", "horizon_cert"=>"/etc/pki/tls/certs/PUB_HOST-horizon.crt", "horizon_key"=>"/etc/pki/tls/private/PUB_HOST-horizon.key", "horizon_secret_key"=>"[FILTERED]", "nova_
db_password"=>"[FILTERED]", "nova_user_password"=>"[FILTERED]", "ssl"=>"false", "swift_admin_password"=>"[FILTERED]", "swift_ringserver_ip"=>"192.168.0.5", "swift_shared_secret"=>"[FILTERED]", "swift_storage_dev
ice"=>"device1", "swift_storage_ips"=>"192.168.203.2, 192.168.203.3, 192.168.203.4", "qpid_ca"=>"/etc/ipa/ca.crt", "qpid_cert"=>"/etc/pki/tls/certs/PRIV_HOST-qpid.crt", "qpid_host"=>"192.168.0.5", "qpid_key"=>"/
etc/pki/tls/private/PRIV_HOST-qpid.key", "qpid_nssdb_password"=>"[FILTERED]"}}}, "6"=>{"puppetclass_params"=>{"185"=>{"admin_password"=>"[FILTERED]", "auto_assign_floating_ip"=>"True", "ceilometer"=>"true", "cei
lometer_host"=>"false", "ceilometer_metering_secret"=>"[FILTERED]", "ceilometer_user_password"=>"[FILTERED]", "cinder_backend_gluster"=>"false", "controller_priv_host"=>"192.168.0.5", "controller_pub_host"=>"192
.168.0.5", "mysql_ca"=>"/etc/ipa/ca.crt", "mysql_host"=>"192.168.0.5", "nova_db_password"=>"[FILTERED]", "network_private_iface"=>"eth0", "network_private_network"=>"192.168.200.0", "network_public_iface"=>"eth0
", "network_public_network"=>"192.168.0.5", "nova_user_password"=>"[FILTERED]", "qpid_host"=>"192.168.0.5", "ssl"=>"false", "verbose"=>"true", "use_qemu_for_poc"=>"false"}}}, "5"=>{"puppetclass_params"=>{"150"=>
{"swift_all_ips"=>"192.168.203.1, 192.168.203.2, 192.168.203.3, 192.168.203.4", "swift_ext4_device"=>"/dev/sdc2", "swift_local_interface"=>"eth0", "swift_local_network"=>"", "swift_loopback"=>"true", "swift_ring
_server"=>"192.168.0.5", "swift_shared_secret"=>"[FILTERED]"}}}}}, "id"=>"services_configuration"}
Redirected to https://oh-havana-foreman.scl.lab.tlv.redhat.com/deployment_steps/wicked_finish
Completed 302 Found in 2104ms (ActiveRecord: 471.0ms)


Started GET "/deployment_steps/wicked_finish" for 10.36.4.114 at 2014-05-08 01:09:37 +0300
Processing by Staypuft::DeploymentStepsController#show as HTML
  Parameters: {"id"=>"wicked_finish"}
Redirected to https://oh-havana-foreman.scl.lab.tlv.redhat.com/deployments/1
Completed 302 Found in 9ms (ActiveRecord: 0.9ms)

Started GET "/deployments/1" for 10.36.4.114 at 2014-05-08 01:09:38 +0300
Processing by Staypuft::DeploymentsController#show as HTML
  Parameters: {"id"=>"1"}
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/staypuft-0.0.12/app/views/staypuft/deployments/show.html.erb within staypuft/layouts/staypuft (773.7ms)
ESC[1;32mDeface:ESC[0m 2 overrides found for 'layouts/application'
ESC[1;32mDeface:ESC[0m 'title_branding' matched 0 times with 'html > head > title > code[erb-silent]:contains('title =')'
ESC[1;32mDeface:ESC[0m 'header_branding' matched 0 times with '.logo-bar > .container > code[erb-loud]:contains('image_tag')'
ESC[1;32mDeface:ESC[0m 3 overrides found for 'home/_topbar'
ESC[1;32mDeface:ESC[0m 'disable_statistics' matched 0 times with 'code[erb-loud]:contains("menu 'statistics'")'
ESC[1;32mDeface:ESC[0m 'disable_trends' matched 0 times with 'code[erb-loud]:contains("menu 'trends'")'
ESC[1;32mDeface:ESC[0m 'disable_audits' matched 0 times with 'code[erb-loud]:contains("menu 'audits'")'
Read fragment views/tabs_and_title_records-1 (0.4ms)
  Rendered home/_topbar.html.erb (27.0ms)
  Rendered layouts/base.html.erb (224.6ms)
  Rendered layouts/application.html.erb (228.9ms)
Completed 200 OK in 1476ms (Views: 1425.4ms | ActiveRecord: 43.0ms)


Started GET "/assets/staypuft/staypuft-58e58f3440e3be708fe6b6250f712e5d.css" for 10.36.4.114 at 2014-05-08 01:09:40 +0300


Started GET "/assets/staypuft/staypuft-64ffbed937f81dccea29fd6f68e1ab2d.js" for 10.36.4.114 at 2014-05-08 01:09:40 +0300


Started POST "/deployments/associate_host" for 10.36.4.114 at 2014-05-08 01:09:49 +0300
Processing by Staypuft::DeploymentsController#associate_host as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"0egQELfArHir9zSPJQ5Xj0PKvG1s6AITw3AeNG9usEE=", "commit"=>"Assign", "hostgroup_id"=>"3", "host_ids"=>["3"]}
Operation FAILED: ERF12-4395 [ProxyAPI::ProxyException]: Unable to retrieve DHCP entry for 00:1a:4a:16:98:8e ([Net::LeaseConflict]: 00:1a:4a:16:98:8e/192.168.0.3) for proxy https://oh-havana-foreman.scl.lab.tlv.redhat.com:8443/dhcp
  Rendered common/500.html.erb within staypuft/layouts/staypuft (11.5ms)
  Rendered layouts/base.html.erb (1.9ms)
  Rendered layouts/application.html.erb (2.7ms)
Completed 500 Internal Server Error in 2948ms (Views: 61.1ms | ActiveRecord: 30.9ms)

Comment 3 Omri Hochman 2014-05-08 16:04:47 UTC
Workarounds: 
------------
(1) Clear the DHCP leases and restart dhcpd and foreman-proxy by: 
 echo "" > /var/lib/dhcpd/dhcpd.leases && service dhcpd restart &&  /etc/init.d/foreman-proxy restart
(2) Change the file /usr/share/foreman-proxy/lib/proxy/dhcp/subnet.rb  (two lines) according to  http://paste.openstack.org/show/79607/ +  /etc/init.d/foreman-proxy restart

Comment 5 Mike Burns 2014-05-08 16:11:49 UTC
blocked on upstream foreman issue:  http://theforeman.org/issues/5637

Comment 7 Arthur Berezin 2014-05-08 21:42:02 UTC
Yes, this breaks Staypuft main flow.
Ohad, according to Foreman upstream issue tracker this issue is due to be fixed next week?

Comment 10 Mike Burns 2014-05-16 14:43:09 UTC
answering needinfo -- patches posted and in review, very close to final versions.  Should turn into an internal build either today or monday

Comment 13 Omri Hochman 2014-05-27 17:44:04 UTC
Verified ruby193-rubygem-staypuft-0.0.16-1.el6ost.noarch.

(puddle: /OpenStack/Foreman/2014-05-22.2 )


Note You need to log in before you can comment on or make changes to this bug.