Bug 1124749 - Staypuft: failed to unassigned a host, Validation failed: Conflict DHCP records
Summary: Staypuft: failed to unassigned a host, Validation failed: Conflict DHCP records
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: foreman-proxy
Version: 5.0 (RHEL 7)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Installer
Assignee: Mike Burns
QA Contact: Alexander Chuzhoy
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-30 08:37 UTC by Yogev Rabl
Modified: 2018-12-09 18:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-30 16:23:30 UTC


Attachments (Terms of Use)

Description Yogev Rabl 2014-07-30 08:37:31 UTC
Description of problem:
After a failed deployment I've tried to remove the assignment of the hosts and move it to a new deployment that I've created. 
The unassaignment of the host fails with the output:

Error

Validation failed: Conflict DHCP records -a2:54:00:86:80:92/192.168.0.7 already exists

ActiveRecord::RecordInvalid
Validation failed: Conflict DHCP records -a2:54:00:86:80:92/192.168.0.7 already exists
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
Version-Release number of selected component (if applicable):

I'm not sure which log provides additional info, if you need more info, please direct me. 


How reproducible:
unknown

Steps to Reproduce:
1. Run a deployment 
2. try to unassign the Neutron host

Actual results:
The unassignment fails

Expected results:
the action succeeds 

Additional info:

Comment 2 Yogev Rabl 2014-07-30 08:54:50 UTC
from the /var/log/foreman/production.log : 

Started POST "/deployments/1/unassign_host" for 10.35.3.165 at 2014-07-30 04:53:55 -0400
Processing by Staypuft::DeploymentsController#unassign_host as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"J8I87X71q4PLvC7eNxBDcPw24QewcYEd7M5OMH/qL5M=", "commit"=>"Unassign Hosts", "hostgroup_id"=>"5", "host_ids"=>["4"], "id"=>"1"}
DHCP records -a2:54:00:86:80:92/192.168.0.7 already exists
Operation FAILED: Validation failed: Conflict DHCP records -a2:54:00:86:80:92/192.168.0.7 already exists
  Rendered common/500.html.erb within staypuft/layouts/staypuft (145.9ms)
  Rendered layouts/base.html.erb (3.2ms)
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/staypuft-0.1.21/app/views/staypuft/layouts/application.html.erb (5.8ms)
Completed 500 Internal Server Error in 3054ms (Views: 310.5ms | ActiveRecord: 46.6ms)


Started GET "/assets/staypuft/staypuft-704afdc8a5b25362c6d5cecac9777092.js" for 10.35.3.165 at 2014-07-30 04:53:58 -0400


Started GET "/assets/staypuft/staypuft-d6b29eb43942298baa46ef6a62f53222.css" for 10.35.3.165 at 2014-07-30 04:53:58 -0400

Comment 4 Mike Burns 2015-04-30 16:23:30 UTC
This does not reproduce in current builds


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