Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1335553 - Creating a host via hammer on libvirt compute-resource raises error UnknownTypeExeption]: Unknown interface type
Summary: Creating a host via hammer on libvirt compute-resource raises error UnknownTy...
Keywords:
Status: CLOSED DUPLICATE of bug 1332186
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-12 13:32 UTC by Sachin Ghai
Modified: 2019-04-01 20:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-17 11:46:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


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