Bug 1335013

Summary: Hammer fails when trying to create a libvirt VM host but you don't include a MAC address
Product: Red Hat Satellite Reporter: Dan Macpherson <dmacpher>
Component: HammerAssignee: Marek Hulan <mhulan>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, cwelton, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
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-09-01 11:19:11 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 Dan Macpherson 2016-05-11 07:04:21 UTC
Description of problem:
Creating a libvirt VM does not require a MAC address when creating a new host, as per hammer's help:

 --mac MAC     required for managed host that is bare metal, not required if it&#39;s a virtual machine

However, when you try to provision a host on a libvirt compute resource, hammer returns the following message:

Could not create the host:
  Invalid MAC 


Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli.noarch   0.5.1.5-1.el7sat 

How reproducible:
Always

Steps to Reproduce:

[root@sat62 ~]# hammer host create --name "libvirt-test1" \
--organization "ACME" --location "New York" \
--hostgroup "Base" --compute-resource "Libvirt" \
--build true --enabled true \
--interface "managed=true,primary=true,provision=true,compute_type=network,compute_network=danssat.net" \
--compute-attributes "cpus=1,memory=1073741824"
--volume "pool_name=default,capacity=20G,format_type=qcow2" \


Actual results:

The following error...
Could not create the host:
  Invalid MAC 

Expected results:

Create a VM successfully without the MAC.

Additional info:

I tried the equivalent process in Satellite's Web UI and it succeeded without needing a MAC address. The Libvirt server auto assigned the MAC address and the Satellite Server was able to provision it successfully.

Comment 2 Tomas Strachota 2016-09-01 11:19:11 UTC
It's a duplicate of 1332186. The error actually occurs on the server side.

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