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 1193460 - while adding alias interface, mac should be auto populated based on attached_to interface
Summary: while adding alias interface, mac should be auto populated based on attached_...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On: 1191913
Blocks: 1193023 1193987
TreeView+ depends on / blocked
 
Reported: 2015-02-17 11:48 UTC by Sachin Ghai
Modified: 2019-09-26 17:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:02:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
alias config file created with incorrect name (27.42 KB, image/png)
2015-05-06 13:16 UTC, Sachin Ghai
no flags Details
virtual interfaces configured on rhel7 host (60.91 KB, image/png)
2016-04-11 11:19 UTC, Sachin Ghai
no flags Details
virtual interfaces configured on rhel6 host (90.44 KB, image/png)
2016-04-11 11:20 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9615 0 None None None 2016-04-22 15:14:58 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Sachin Ghai 2015-02-17 11:48:56 UTC
Description of problem:
We don't have any validation around mac while adding an interface. I got to know we don't need mac when we add virtual interface.

Now let's say I've to configure alias of eth0, so in this case mac of alias would be same as of eth0. So UI should auto populate same mac as of attached_to interface i.e. eth0.

Or user should restrict to input mac address while defining new alias interface.

I can create alias interface without defining mac and add_interface form saved successfully. But if I do that then interface won't be configured at provisioned node.

In short, we should either of these:

1) either we should restrict user to input mac while alias interface via some validation/warning

2) Or UI should auto populate the mac of attached-to interface.


Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-6-20150210.0
Sat6.1.0 beta snap2

How reproducible:
always

Steps to Reproduce:
1. while creating new host, add alias interface without defining mac
2.
3.

Actual results:
alias interface won't be configured on provisioned node

Expected results:
UI should auto pick the mac of main interface to which we are attaching the alias.

Additional info:

Comment 4 Marek Hulan 2015-02-26 14:10:28 UTC
Alternative solution could be - change the config template so it uses MAC of interface that Alias or VLAN is attached to if the MAC is missing. The MAC should not be mandatory.

Comment 5 Marek Hulan 2015-03-03 11:36:37 UTC
Created redmine issue http://projects.theforeman.org/issues/9615 from this bug

Comment 7 Bryan Kearney 2015-03-04 15:05:28 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9615 has been closed
-------------
Marek Hulán
Applied in changeset commit:5ad3c4f34b50fb1ac6d9f26e71e183813ab1c96f.

Comment 10 Sachin Ghai 2015-03-17 08:22:35 UTC
Verified with:

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

As per comment 4, I tried to create an alias interface without specifying mac while host provisioning. But I couldn't see configured alias interface on provisioned host.

So as per comment 4, I believe config template should auto pick the mac of interface that Alias interface is attached to. 

Moving this back to assigned.

Comment 11 Sachin Ghai 2015-03-17 08:24:21 UTC
Since I didn't specify the mac, the interface automatically removed. I can't see it on edit host after host provisioning succeed.

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

Comment 13 Sachin Ghai 2015-05-06 12:10:08 UTC
Verified with sat6.1 snap2 (Satellite-6.1.0-RHEL-7-20150429.2)


I can provision a instance with alias interface and without defining mac. If I didn't specify mac, interface is getting configured on provisioned host without any issue.

here is snippet from provisioning template:

--
# eth0:0 interface
real=`ip -o link | grep  | awk '{print $2;}' | sed s/:$//`
  real=`echo eth0:0 | sed s/eth0/$real/`

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$real
BOOTPROTO="none"
IPADDR="192.168.100.124"
NETMASK="255.255.255.248"
DEVICE="$real"
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
TYPE=Alias
EOF
--

Comment 14 Sachin Ghai 2015-05-06 13:15:10 UTC
Sorry, I was bit quick.. I just checked on provisioned host. The aliased interface is not configured properly. 

The interface created with file ifcfg-:0. I think that's the issue. Please see the screenshot.

Comment 15 Sachin Ghai 2015-05-06 13:16:17 UTC
Created attachment 1022667 [details]
alias config file created with incorrect name

Comment 16 Sachin Ghai 2015-05-06 13:59:26 UTC
In below snippet: looks like mac is missing :

>> real=`ip -o link | grep  | awk '{print $2;}' | sed s/:$//`

--
# eth0:0 interface
real=`ip -o link | grep  | awk '{print $2;}' | sed s/:$//`
  real=`echo eth0:0 | sed s/eth0/$real/`

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$real
BOOTPROTO="none"
IPADDR="192.168.100.124"
NETMASK="255.255.255.248"
DEVICE="$real"
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
TYPE=Alias
EOF
--

Comment 17 Sachin Ghai 2015-05-07 05:52:47 UTC
I specified the interface identifier as eth0:0 and attached to interface as eth0.

Comment 18 Marek Hulan 2015-05-07 06:33:37 UTC
Sachin, the snippet is correct, Alias interface does not have MAC in it's configuration. The thing here is that eth0 had a MAC that was not found on the host. Therefore the $real was empty. This happens if you provision a virtual host where you don't know the MAC before the host is physically created. Could you please share information what values you used for host primary interface and all additional interfaces and on which compute resource did you provision the host?

Comment 19 Sachin Ghai 2015-05-08 05:47:56 UTC
Hey Marek.

I was using libvirt compute resource and I was trying to create aliase interface by attaching it to primary interface eth0. I didn't created any additional interface.

But I'll test this change with discovery and will update here.

Comment 20 Sachin Ghai 2015-05-08 13:07:22 UTC
I tried alias configuration on discovered host without defining mac and this time interface configuration fails with same issue. Interface file created with name: ifcfg-:0  and value of DEVICE set like DEVICE=:0

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

Comment 24 sthirugn@redhat.com 2015-08-14 20:47:29 UTC
Accidentally closed with 6.1.1 errata

Comment 25 Bryan Kearney 2015-08-25 18:34:01 UTC
Upstream bug component is Provisioning

Comment 26 Marek Hulan 2015-08-27 08:43:42 UTC
Moving to POST again since upstream bug http://projects.theforeman.org/issues/9615 has been closed

Comment 28 Sachin Ghai 2016-04-11 11:19:15 UTC
Verified with sat6.2 beta snap6.2

I can define virtual interfaces like alias and vlan, without explicitly defining the mac address.



[root@mac525400e6005b ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0_0 
BOOTPROTO="none"
IPADDR="192.168.100.120"
NETMASK="255.255.255.248"
DEVICE=eth0:0
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
TYPE=Alias
[root@mac525400e6005b ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0.1 
BOOTPROTO="none"
IPADDR="192.168.100.122"
NETMASK="255.255.255.248"
DEVICE=eth0.1
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
VLAN=yes


Please see the attached screenshots for verification.

Comment 29 Sachin Ghai 2016-04-11 11:19:55 UTC
Created attachment 1145924 [details]
virtual interfaces configured on rhel7 host

Comment 30 Sachin Ghai 2016-04-11 11:20:30 UTC
Created attachment 1145925 [details]
virtual interfaces configured on rhel6 host

Comment 31 Bryan Kearney 2016-07-27 11:02:24 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/RHBA-2016:1501


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