Bug 1194627

Summary: User shouldn't be allowed to create bond interface without specifying identifier when it is set to managed
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: high    
Priority: unspecified CC: bkearney, jmontleo, omaciel, sghai
Version: 6.1.0Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9495
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:26:36 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:    
Bug Blocks: 1193987    
Attachments:
Description Flags
UI raises error when creating a bond interface without identifier none

Description Sachin Ghai 2015-02-20 12:13:53 UTC
Description of problem:
when user add bond interface and without specifying mac, the new host form was submitted successfully. Ideally UI should auto pick the mac based on the 'attached_device'. or should throw validation error when user tries to create bond interface without specifying mac address.

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 an bond interface when creating new host and do not specify mac address
2.
3.

Actual results:
form was submitted successfully however provisioning template doesn't show bond interface configuration

Expected results:
As soon as user submits the from, UI should raise an error. as mac was not associated with bond interface

OR

UI should auto pick the mac based on attached_device selection.

Additional info:

Comment 1 Marek Hulan 2015-02-22 08:20:20 UTC
Created redmine issue http://projects.theforeman.org/issues/9495 from this bug

Comment 2 Marek Hulan 2015-02-22 09:06:29 UTC
Mac is not mandatory even for managed bond. We don't set it anywhere, it's not part of bond config file. When bond is created on host, it get's MAC of one of bonded interface automatically. We don't even know which one it will be. We get the MAC reported back with first puppet facts upload. On the other hand, identifier is needed. Sachin, are you OK with changing the subject to add presence validation on identifier for managed bonds?

Comment 3 Sachin Ghai 2015-02-23 07:24:14 UTC
(In reply to Marek Hulan from comment #2)
> Mac is not mandatory even for managed bond. We don't set it anywhere, it's
> not part of bond config file. When bond is created on host, it get's MAC of
> one of bonded interface automatically. We don't even know which one it will
> be. We get the MAC reported back with first puppet facts upload.

Ok, Thanks Marek for explaining this info. Its really helps and I strongly feel we should document this too.

But would like to know why we need mac for Bond field when we know that its auto picked from one of attached_devices. So we should disable the mac field and filled it with mac of any of attached_devices while adding bond interface ?

I still don't understand what would be the use case when user will fill mac while created bond interface.


> On the
> other hand, identifier is needed. Sachin, are you OK with changing the
> subject to add presence validation on identifier for managed bonds?

Yeah..thanks for pointing this. I'm fine with anyway. if you want I can open another bug for validating identifier presence.

Comment 4 Marek Hulan 2015-02-23 07:33:53 UTC
> I still don't understand what would be the use case when user will fill mac while created bond interface.

One use case is documentation purposes when user don't set bond to be managed. Second is using the bond information in puppet module (not provisioning template) since the all bond attributes are part of ENC. Users may have various reasons to specify the MAC in this case.

> Yeah..thanks for pointing this. I'm fine with anyway. if you want I can open another bug for validating identifier presence.

No, I'll just change the name so we keep the history of this issue on one place (plus it's already synced to redmine issue)

Comment 5 Bryan Kearney 2015-02-26 15:05:23 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9495 has been closed
-------------
Marek Hulán
Applied in changeset commit:e329155b185e3be5863bfd79582b61a6ecc9ae9a.

Comment 8 Bryan Kearney 2015-03-03 15:05:38 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9495 has been closed
-------------
Marek Hulán
Applied in changeset commit:e329155b185e3be5863bfd79582b61a6ecc9ae9a.

Comment 11 Sachin Ghai 2015-03-17 07:17:23 UTC
verified with:

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

Now if user creates managed bond interfaces without specifying
identifier, UI throws error that identifier can't be blank. Thanks for fixing
this. Please see the screenshot for verification.

Comment 12 Sachin Ghai 2015-03-17 07:18:17 UTC
Created attachment 1002670 [details]
UI raises error when creating a bond interface without identifier

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

Comment 14 errata-xmlrpc 2015-08-12 05:26:36 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