Bug 1361332 - Hypervisor host fails to convert to managed host during RHEV deployment
Summary: Hypervisor host fails to convert to managed host during RHEV deployment
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: Installation - RHEV
Version: 1.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
: 1.2
Assignee: Jason Montleon
QA Contact: Dave Johnson
Derek
URL:
Whiteboard:
Depends On: 1367549
Blocks: 1367898
TreeView+ depends on / blocked
 
Reported: 2016-07-28 20:51 UTC by Tasos Papaioannou
Modified: 2019-02-25 17:28 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1367898 (view as bug list)
Environment:
Last Closed: 2019-02-25 17:28:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1360422 0 unspecified CLOSED [Docs] Need to explicitly document that use of DHCP any other interface will cause problems for QCI provisioning. 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1367549 0 high CLOSED When a Discovered Host is converted to a Managed Host the IP address is not changed to fall within the subnet range 2023-03-24 13:42:05 UTC
Red Hat Bugzilla 1368145 0 unspecified CLOSED Document that DHCP range is split for discovered and managed hosts 2021-02-22 00:41:40 UTC

Internal Links: 1360422 1367549 1368145

Description Tasos Papaioannou 2016-07-28 20:51:55 UTC
Description of problem:

Engine+hypervisor RHEV Deployment w/ one hypervisor fails during the RHEV deployment task at 3.6%. Foreman task error shows that the host failed to be converted to a managed host:

****
Action:

Actions::Fusor::Host::TriggerProvisioning

Input:

{"deployment_id"=>2,
 "hostgroup_name"=>"RHEV-Hypervisor",
 "host_id"=>4,
 "puppet_overrides"=>nil,
 "locale"=>"en"}

Output:

{}

Exception:

RuntimeError: Host with id 4 was not converted to a managed host.

Backtrace:

/opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/host/trigger_provisioning.rb:116:in `block in assign_host_to_hostgroup'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
/usr/share/foreman/app/models/host.rb:15:in `method_missing'
/opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/host/trigger_provisioning.rb:93:in `assign_host_to_hostgroup'
/opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/host/trigger_provisioning.rb:34:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:506:in `block (3 levels) in execute_run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action/progress.rb:16:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:22:in `call'
****

Version-Release number of selected component (if applicable):

QCI-1.0-RHEL-7-20160727.t.0

How reproducible:

100%

Steps to Reproduce:
1.) Start deployment for 1 hypervisor + engine.
2.) Get error at 3.6% during the RHEV deployment.


Actual results:

Failed deployment.

Expected results:

Successful deployment.

Additional info:

Comment 1 John Matthews 2016-08-01 18:35:11 UTC
Closing, please re-open if you hit this again at which point please include the satellite logs.

We need the foreman/production.log to be able to debug this further.

Comment 4 Antonin Pagac 2016-08-16 13:51:44 UTC
For me, this was solved by adding Satellite IP as a DNS server to /etc/resolv.conf. The file got changed because I had another NIC up where DHCP was running. For more, look at bug 1360422.

Comment 5 Thom Carlin 2016-08-16 16:51:53 UTC
Also seen deploying: RHV Engine + Hypervisor + CloudForms at 46.4%

Comment 7 Thom Carlin 2016-08-16 17:13:34 UTC
Excerpt from deployment.log:
D, [2016-08-16T12:43:55.875677 #19999] DEBUG -- : ================ Finished validating discovered host facts ====================
D, [2016-08-16T12:43:55.934445 #19999] DEBUG -- : assignee host type is now: Host::Managed
D, [2016-08-16T12:43:55.934793 #19999] DEBUG -- : saving host of type: Host::Managed
D, [2016-08-16T12:43:55.935116 #19999] DEBUG -- : calling save

production.log
2016-08-16 12:43:55 [app] [I] Waiting for host <<hypervisor_fqdn>>'s puppet run to complete
2016-08-16 12:43:55 [app] [I] Starting host 24 deployment...
2016-08-16 12:43:56 [foreman-tasks/action] [E] Host with id 24 was not converted to a managed host. (RuntimeError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.1/app/lib/actions/fusor/host/trigger_provisioning.rb:116:in `block in assign_host_to_hostgroup'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
 | /usr/share/foreman/app/models/host.rb:15:in `method_missing'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.1/app/lib/actions/fusor/host/trigger_provisioning.rb:93:in `assign_host_to_hostgroup'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.1/app/lib/actions/fusor/host/trigger_provisioning.rb:34:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:506:in `block (3 levels) in execute_run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action/progress.rb:16:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:22:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.70/app/lib/actions/middleware/keep_locale.rb:11:in `block in run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.70/app/lib/actions/middleware/keep_locale.rb:22:in `with_locale'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.70/app/lib/actions/middleware/keep_locale.rb:11:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:22:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass'
[snip]

Host 24 is not in "hammer list" but is in "hammer discovery list".  The MAC address of host 24 and 25 is the same -- all facts are the same.  The ID, name, and Last report differ.

Host names are fdi.cfme.lab.eng.rdu2.redhat.com

"hammer discovery facts" also displays "Error: undefined method `meta' for #<Array:0x0000000462a580>"

Comment 9 Thom Carlin 2016-08-16 19:20:39 UTC
Possibly tied to DHCP/Discovery/Subnet.  

Workaround:
hammer host list
hammer host delete --id=x 
where x > 1

^^^^ Use with extreme caution

Comment 11 Thom Carlin 2016-08-17 13:02:23 UTC
May also need:
* Infrastructure > Subnet
* Select "default"
* Change Start of IP range/End of IP range so it does not overlap the pool in /etc/dhcp/dhcpd.conf

Comment 15 John Matthews 2016-12-05 20:21:16 UTC
Moving to 1.2 release as this BZ depends on a fix to Satellite we expect to be in Sat 6.3.

Comment 19 Sudhir Mallamprabhakara 2019-02-25 17:28:56 UTC
QCI has sunset. Closing the BZ's


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