Bug 1293423 - Satellite fail to configure secondary network interfaces on VM
Satellite fail to configure secondary network interfaces on VM
Status: CLOSED WORKSFORME
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning Templates (Show other bugs)
6.1.5
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-21 13:05 EST by David Juran
Modified: 2017-05-10 06:57 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-10 06:57:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Juran 2015-12-21 13:05:30 EST
Description of problem:
When provisioning a virtual machine using Satellite 6, the MAC addresses of the interfaces are not known when the host is created and can therefore not be entered in the dialog box where the secondary (all but eth0) are defined.

This leads to Satellite failing to configuring these interfaces as the kickstart_network_setup snippet does a grep for 

interface.respond_to?(:inheriting_mac) ? interface.inheriting_mac : interface.mac

which apparently works out to an empty string

Version-Release number of selected component (if applicable):
Satellite 6.1.5

Steps to Reproduce:
1. Provision a host using a libvirt compute provider
2. Give it more then one interface
3. Define the secondary interfaces from internal DB with a static IP
4. Watch the result on the provisioned machine
Comment 1 Bryan Kearney 2016-07-26 15:07:38 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 2 Lukas Zapletal 2017-05-10 06:57:22 EDT
Hello, this was fixed in Satellite 6.2, just tested it and here is what it renders to:

#  interface
real=`ip -o link | grep 52:54:00:8e:c2:2f | awk '{print $2;}' | sed s/:$//`

# ifcfg files are ignored by NM if their name contains colons so we convert colons to underscore
sanitized_real=$real

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="dhcp"
DEVICE=$real
HWADDR="52:54:00:8e:c2:2f"
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
EOF




# eth1 interface
real=`ip -o link | grep 52:54:00:22:11:ee | awk '{print $2;}' | sed s/:$//`

# ifcfg files are ignored by NM if their name contains colons so we convert colons to underscore
sanitized_real=$real

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="dhcp"
DEVICE=$real
HWADDR="52:54:00:22:11:ee"
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
EOF

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