Bug 1335553

Summary: Creating a host via hammer on libvirt compute-resource raises error UnknownTypeExeption]: Unknown interface type
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: inecas
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-17 11:46:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sachin Ghai 2016-05-12 13:32:24 UTC
Description of problem:

I was trying to create a host via hammer on libvirt compute-resource. I've passed all required options, however I always ended-up with following error:

Could not create the host:
  ERF13-6594 [InterfaceTypeMapper::UnknownTypeExeption]: Unknown interface type, must be one of [interface, bmc, bond, bridge]


Here are the options, I've been using:

# hammer -u admin -p changeme --output=csv host create --medium-id="9" --root-pass='foobarbaz' --organization-id="1" --location-id="2" --architecture-id="1" --operatingsystem-id="2" --name="ham-host3" --environment-id="1" --domain-id="1" --puppet-proxy-id="1" --partition-table-id="61" --hostgroup-id 1 --compute-attributes="cpus=1, memory=2147483648," --volume="capacity=10G,format_type=qcow" --compute-resource-id=1 --interface="type='Virtual (NAT)', network=foreman"

compute-resource-id set to "1" as below:

]# hammer -u admin -p changeme compute-resource list
---|---------|---------
ID | NAME    | PROVIDER
---|---------|---------
1  | libvirt | Libvirt 


Now, if I change the type of interface as per error like below then raises error:   Invalid MAC 


~]# hammer -u admin -p changeme --output=csv host create --medium-id="9" --root-pass='foobarbaz' --organization-id="1" --location-id="2" --architecture-id="1" --operatingsystem-id="2" --name="ham-host3" --environment-id="1" --domain-id="1" --puppet-proxy-id="1" --partition-table-id="61" --hostgroup-id 1 --compute-attributes="cpus=1, memory=2147483648," --volume="capacity=10G,format_type=qcow" --compute-resource-id=1 --interface="type='interface', network=foreman"
Could not create the host:
  Invalid MAC 


Looks like, hammer is trying to create a "Bare Metal" host and expecting mac. I tried same command in sat6.1 and it works and I was able to create host on libvirt without passing mac and that interface error.


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

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
hammer doesn't create virtual host on 'Libvirt' compute-resource and consider the 

Expected results:
It should create host without expecting mac

Additional info:

The compute-resource-id I passed is of 'Libvirt', so not sure why its considering host as 'baremetal' host. If its a configuration issue, I'll close this bz.

Comment 2 Ivan Necas 2016-05-17 11:46:43 UTC
The issue described here has been resolved in snap 11 as https://bugzilla.redhat.com/show_bug.cgi?id=1332186 (ON_QA right now)

*** This bug has been marked as a duplicate of bug 1332186 ***