Bug 1193460
Summary: | while adding alias interface, mac should be auto populated based on attached_to interface | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> | ||||||||
Component: | Provisioning | Assignee: | Marek Hulan <mhulan> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Sachin Ghai <sghai> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 6.1.0 | CC: | bkearney, jmontleo, sghai, sthirugn | ||||||||
Target Milestone: | Unspecified | Keywords: | Reopened, Triaged | ||||||||
Target Release: | Unused | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
URL: | http://projects.theforeman.org/issues/9615 | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2016-07-27 11:02:24 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: | 1193023, 1193987 | ||||||||||
Attachments: |
|
Description
Sachin Ghai
2015-02-17 11:48:56 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. Created redmine issue http://projects.theforeman.org/issues/9615 from this bug Moving to POST since upstream bug http://projects.theforeman.org/issues/9615 has been closed ------------- Marek Hulán Applied in changeset commit:5ad3c4f34b50fb1ac6d9f26e71e183813ab1c96f. 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. Since I didn't specify the mac, the interface automatically removed. I can't see it on edit host after host provisioning succeed. Moving back to ON_QA as it's a separate issue tracked as https://bugzilla.redhat.com/show_bug.cgi?id=1191913 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 -- 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. Created attachment 1022667 [details]
alias config file created with incorrect name
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
--
I specified the interface identifier as eth0:0 and attached to interface as eth0. 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? 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. 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 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 Accidentally closed with 6.1.1 errata Upstream bug component is Provisioning Moving to POST again since upstream bug http://projects.theforeman.org/issues/9615 has been closed 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. Created attachment 1145924 [details]
virtual interfaces configured on rhel7 host
Created attachment 1145925 [details]
virtual interfaces configured on rhel6 host
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 |