Bug 1133540 - "Use Foreman Hosts Providers>Provisioned Hosts" option of "new host" fails
Summary: "Use Foreman Hosts Providers>Provisioned Hosts" option of "new host" fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Yaniv Bronhaim
QA Contact: movciari
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-25 12:17 UTC by Netbulae
Modified: 2016-02-10 19:31 UTC (History)
7 users (show)

Fixed In Version: ovirt-3.5.0_rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:42:22 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 32021 0 master MERGED Checking isProvisioned instead of the redundant entity isDiscovered Never
oVirt gerrit 32206 0 ovirt-engine-3.5 MERGED Checking isProvisioned instead of the redundant entity isDiscovered Never
oVirt gerrit 32250 0 master MERGED webadmin: Fix NPE in Host dialog Never
oVirt gerrit 32267 0 master ABANDONED webadmin: check explicitly if isDiscovered is equal to true Never
oVirt gerrit 32268 0 ovirt-engine-3.5 ABANDONED webadmin: check explicitly if isDiscovered is equal to true Never
oVirt gerrit 32273 0 ovirt-engine-3.5 MERGED webadmin: Fix NPE in Host dialog Never

Description Netbulae 2014-08-25 12:17:18 UTC
Description of problem:

I provision an Centos 7 with vdsm etc. installed. Now I want to add it through the GUI using the "Use Foreman Hosts Providers>Provisioned Hosts" option of the "new host" dialog

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch

How reproducible:
Every time


Actual results:

Started PUT "/api/v2/discovered_hosts/mac*************" for xx.xxx.xxx.xxx at 2014-08-25 13:19:00 +0200
Processing by Api::V2::DiscoveredHostsController#update as JSON
  Parameters: {"discovered_host"=>{"name"=>"node4.test.nu", "hostgroup_id"=>"2", "environment_id"=>"1", "mac"=>"*:*:*:*:*:*", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"xx.xxx.xxx.xxx", "architecture_id"=>"1", "operatingsystem_id"=>"7", "medium_id"=>"1", "ptable_id"=>"12", "root_pass"=>"[FILTERED]", "host_parameters_attributes"=>[{"name"=>"host_ovirt_id", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"compute_resource_id", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"pass", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"management", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}]}, "apiv"=>"v2", "id"=>"mac*************"}
Authorized user admin(Admin User)
DHCP records node4.test.nu-*:*:*:*:*:*/xx.xxx.xxx.xxx already exists
Unprocessable entity Host::Discovered (id: 34):
  Name has already been taken
  IP address has already been taken
  Conflict DHCP records node4.test.nu-*:*:*:*:*:*8/xx.xxx.xxx.xxx already exists
  Medium CentOS mirror does not belong to CentOS 7.0 operating system

  Rendered api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout (4.9ms)
Completed 422 Unprocessable Entity in 1929ms (Views: 9.9ms | ActiveRecord: 46.5ms)

Comment 1 Oved Ourfali 2014-08-26 07:46:16 UTC
The provisioned hosts should show you only hosts that are already provisioned in Foreman.
From the description it is not clear what you see in the UI.
Do you see a list of hosts?

Comment 2 Netbulae 2014-08-26 08:17:58 UTC
The host I already provisioned shows up fine. I can choose one from a list.

The thing that's not working is actually adding the host by pressing OK.

Foreman complains about the name and ip already been taken. That is logical because they are, but foreman shouldn't do anything with it.

The log I see: "discovered_host"=>{"name"=>"node4.test.nu"

But it isn't a discovered host as it's already deployed....

Comment 3 Oved Ourfali 2014-08-26 08:26:13 UTC
(In reply to Netbulae from comment #2)
> The host I already provisioned shows up fine. I can choose one from a list.
> 
> The thing that's not working is actually adding the host by pressing OK.
> 
> Foreman complains about the name and ip already been taken. That is logical
> because they are, but foreman shouldn't do anything with it.
> 
> The log I see: "discovered_host"=>{"name"=>"node4.test.nu"
> 
> But it isn't a discovered host as it's already deployed....

iiuc you're saying that when choosing provisioned hosts, we actually trigger bare-metal provisioning.
If that's the case then it should be handled.

Yaniv - please check that out.

Comment 4 Netbulae 2014-08-26 10:22:22 UTC
Yes that appears to be happening. I just tried it with a freshly deployed host.

Comment 5 Sandro Bonazzola 2014-10-17 12:42:22 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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