Bug 1159000
| Summary: | netcf ignores any IPv4 address past the first one | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Laine Stump <laine> |
| Component: | netcf | Assignee: | Laine Stump <laine> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | dgilbert, dyuan, honzhang, jsuchane, mzhan, virt-bugs |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | netcf-0.2.8-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1147650 | Environment: | |
| Last Closed: | 2015-11-19 08:58:21 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: | 1147650 | ||
| Bug Blocks: | |||
|
Description
Laine Stump
2014-10-30 16:33:52 UTC
The grammars for the <interface> xml in netcf and libvirt already support multiple <ip> elements, so all that is needed for this is to make redhat-(get|put).xsl recognize and emit IPADDRn/PREFIXn/NETMASKn/GATEWAYn. This cries out for someone with a better understanding of xslt than me. Fix pushed upstream:
commit 4b4193c6d0bdbf96f63473a90d65bb4480c14aef
Author: Laine Stump <laine>
Date: Mon Mar 16 10:50:33 2015 -0400
support multiple IPv4 addresses in redhat driver
Verified as below:
[root@localhost ~]# rpm -q libvirt netcf
libvirt-1.2.15-2.el7.x86_64
netcf-0.2.8-1.el7.x86_64
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp2s0
DEVICE="enp2s0"
ONBOOT="no"
BOOTPROTO="none"
IPADDR="192.168.1.22"
NETMASK="255.255.255.0"
IPADDR1="192.168.1.88"
NETMASK1="255.255.255.0"
GATEWAY="192.168.1.1"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
DHCPV6C="no"
[root@localhost ~]# virsh iface-dumpxml enp2s0
<interface type='ethernet' name='enp2s0'>
<protocol family='ipv4'>
<ip address='192.168.1.22' prefix='24'/>
<ip address='192.168.1.88' prefix='24'/>
</protocol>
<link speed='100' state='up'/>
<mac address='00:1b:21:27:4e:ce'/>
</interface>
[root@localhost ~]# ip ad show enp2s0
3: enp2s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
link/ether 00:1b:21:27:4e:ce brd ff:ff:ff:ff:ff:ff
inet 192.168.1.22/24 brd 192.168.1.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet 192.168.1.88/24 brd 192.168.1.255 scope global secondary enp2s0
valid_lft forever preferred_lft forever
[root@localhost ~]# virsh iface-bridge enp2s0 br66 --no-stp
Created bridge br66 with attached device enp2s0
Bridge interface br66 started
[root@localhost ~]# virsh iface-dumpxml br66
<interface type='bridge' name='br66'>
<protocol family='ipv4'>
<ip address='192.168.1.22' prefix='24'/>
<ip address='192.168.1.88' prefix='24'/>
</protocol>
<protocol family='ipv6'>
<ip address='fe80::7c2b:bff:fef0:fe1f' prefix='64'/>
</protocol>
<bridge>
</bridge>
</interface>
[root@localhost ~]# virsh iface-list --all
Name State MAC Address
---------------------------------------------------
br66 active 7e:2b:0b:f0:fe:1f
eno1 active 24:be:05:18:81:ce
[root@localhost ~]# ip ad show br66
148: br66: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 7e:2b:0b:f0:fe:1f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.22/24 brd 192.168.1.255 scope global br66
valid_lft forever preferred_lft forever
inet 192.168.1.88/24 brd 192.168.1.255 scope global secondary br66
valid_lft forever preferred_lft forever
inet6 fe80::7c2b:bff:fef0:fe1f/64 scope link
valid_lft forever preferred_lft forever
[root@localhost ~]# virsh iface-unbridge br66
Device enp2s0 un-attached from bridge br66
Interface enp2s0 started
[root@localhost libvirt-1.2.15]# virsh iface-list --all
Name State MAC Address
---------------------------------------------------
eno1 active 24:be:05:18:81:ce
enp2s0 active 00:1b:21:27:4e:ce
[root@localhost ~]# virsh iface-dumpxml enp2s0
<interface type='ethernet' name='enp2s0'>
<protocol family='ipv4'>
<ip address='192.168.1.22' prefix='24'/>
<ip address='192.168.1.88' prefix='24'/>
</protocol>
<link speed='100' state='up'/>
<mac address='00:1b:21:27:4e:ce'/>
</interface>
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp2s0
DEVICE="enp2s0"
ONBOOT="no"
BOOTPROTO="none"
IPADDR="192.168.1.22"
NETMASK="255.255.255.0"
IPADDR1="192.168.1.88"
NETMASK1="255.255.255.0"
GATEWAY="192.168.1.1"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
DHCPV6C="no"
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://rhn.redhat.com/errata/RHSA-2015-2248.html |