Bug 1194641

Summary: User shouldn't be allowed to create BMC interface without mac
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: Marek Hulan <mhulan>
WebUI sub component: Foreman QA Contact: Sachin Ghai <sghai>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bkearney, jmontleo, mhulan, sthirugn
Version: 6.1.0Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9497
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:26:38 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:
Bug Depends On: 1191913    
Bug Blocks: 1193987    
Attachments:
Description Flags
BMC interface is configured without defining mac
none
I can see BMC tab and power-cycle options on right
none
valiadation error while configurating managed BMC without mac none

Description Sachin Ghai 2015-02-20 12:45:05 UTC
Description of problem:
I tried to create BMC interface and didn't specify the mac. I marked it as managed too. I think UI should validate the form. Form was submitted successfully. I believe BMC interfaces should have mac as physical network interfaces.


Version-Release number of selected component (if applicable):
sat6.1 beta snap3
Satellite-6.1.0-RHEL-6-20150217.0

How reproducible:
always

Steps to Reproduce:
1. Add BMC interface without specifying mac
2.
3.

Actual results:
No error on UI

Expected results:
UI should raise validation error.

Additional info:

Comment 1 Marek Hulan 2015-02-22 09:51:30 UTC
Created redmine issue http://projects.theforeman.org/issues/9497 from this bug

Comment 2 Bryan Kearney 2015-02-26 15:05:24 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9497 has been closed
-------------
Marek Hulán
Applied in changeset commit:6a2fce1fa6a80865bb8292e76a8bd285e714a5c8.

Comment 5 Bryan Kearney 2015-03-03 15:05:40 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9497 has been closed
-------------
Marek Hulán
Applied in changeset commit:6a2fce1fa6a80865bb8292e76a8bd285e714a5c8.

Comment 8 Sachin Ghai 2015-03-17 11:38:26 UTC
Verified with: 

sat6.1 beta snap6 compose2 (Satellite-6.1.0-RHEL-6-20150311.1).


I didn't see any change after fix. If I didn't specify mac of BMC interface then nothig happens on UI, new host form was submitted and BMC doesn't configured. so it is still failing silently. 

I was expecting an error message like 'can't be blank' if I don't specify mac. Moving back to assigned.

Comment 9 Marek Hulan 2015-03-19 14:55:33 UTC
Moving back to ON_QA as it's blocker by a separate issue tracked as https://bugzilla.redhat.com/show_bug.cgi?id=1191913

Comment 10 Sachin Ghai 2015-05-08 12:09:22 UTC
Found different behaviour with sat6.1 GA snap3.

I really not sure what should be the intended behaviour here.

When I filed this bz then I defined the BMC interface without mac and provisioned the host. Host was provisioned successfully. But later when I checked the BMC interface then it was not configured. It means that BMC configuration fails silently without throwing any error on UI. This is very annoying situation where you get to know something is failing at the end of workflow instead of beginning.

Now, if I didn't specify the mac for BMC interface, UI actually configure it. Is it expected ?  If that's the case then I'm assuming mac is not a mandatory option for BMC configuration ?

Comment 11 Sachin Ghai 2015-05-08 12:11:48 UTC
Created attachment 1023461 [details]
BMC interface is configured without defining mac

Comment 12 Sachin Ghai 2015-05-08 12:12:33 UTC
Created attachment 1023462 [details]
I can see BMC tab and power-cycle options on right

Comment 13 Marek Hulan 2015-05-11 11:29:47 UTC
The MAC for BMC is only required if the BMC is managed so it can create DHCP reservation (and I see validation error). If you choose to have BMC unmanaged then no MAC is needed and BMC is saved. If host has BMC you can see the BMC tab displaying data from BMC (no MAC is needed for this) so I think the behaviour is correct.

Comment 14 Sachin Ghai 2015-05-11 12:14:09 UTC
@Marek.. Thanks for reply.

I just tried configuring Managed BMC interface without mac and this time I got validation error: mac can't be blank" thanks.

Comment 15 Sachin Ghai 2015-05-11 12:15:19 UTC
Created attachment 1024201 [details]
valiadation error while configurating managed BMC without mac

Comment 16 Marek Hulan 2015-05-11 12:20:34 UTC
Thanks for retesting.

Comment 17 Sachin Ghai 2015-05-11 12:22:26 UTC
Verified with sat6.1 GA snap3.

Based on comments 10-15. Moving this to verified. thanks for fixing the issue.

Comment 18 Bryan Kearney 2015-08-11 13:18:28 UTC
This bug is slated to be released with Satellite 6.1.

Comment 19 errata-xmlrpc 2015-08-12 05:26:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592