Bug 1630802 - There is no network config/route created for multiple interfaces vmi
Summary: There is no network config/route created for multiple interfaces vmi
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 1.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Kenigsberg
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-19 10:13 UTC by Yan Du
Modified: 2018-09-19 14:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-19 14:06:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vmi yaml (1020 bytes, text/plain)
2018-09-19 10:14 UTC, Yan Du
no flags Details

Description Yan Du 2018-09-19 10:13:49 UTC
Description of problem:
There is no network config/route created for multiple interfaces vmi

Version-Release number of selected component (if applicable):
openshift v3.11.6
kubernetes v1.11.0+d4cacc0
kubevirt-virtctl-0.8.0-20.g99d7ebd.6165ead.x86_64
kubevirt-manifests-0.8.0-20.g99d7ebd.6165ead.noarch
kubevirt-cdi-manifests-1.1.1-4.e6093ee.noarch
ovs-cni-manifests-0.1.1-1.noarch
brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/cnv12-tech-preview/virt-api:1.2

How reproducible:
Always

Steps to Reproduce:
1. Setup OCP cluster and deploy downstream kubevirt
2. Deploy multus/ovs-cni by manifest from the package ovs-cni-manifests-0.1.1-1.noarch
3. Create vmi with multiple interfaces (vmi yaml file has attached)
4. Login the vm and check the interfaces
5. Try to make the eth1 ip
6. Check the ip route


Actual results:
4. The eth1 is in DOWN status
[fedora@vmi-ovs1 ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP group default qlen 1000
    link/ether 0a:58:0a:81:00:0f brd ff:ff:ff:ff:ff:ff
    inet 10.129.0.15/23 brd 10.129.1.255 scope global dynamic eth0
       valid_lft 86312036sec preferred_lft 86312036sec
    inet6 fe80::858:aff:fe81:f/64 scope link tentative dadfailed 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b2:70:9a:7d:c0:dd brd ff:ff:ff:ff:ff:ff
    inet 192.168.123.11/24 scope global eth1
       valid_lft forever preferred_lft forever

5. Fail to up eth1 due to there is no eth1 network config in network-scripts
[root@vmi-ovs1 fedora]# ifup eth1
/sbin/ifup: configuration for eth1 not found.
Usage: ifup <configuration>


6. No route for eth1 
[root@vmi-ovs1 fedora]# ip route
default via 10.129.0.1 dev eth0 
10.128.0.0/14 dev eth0 proto static scope link 
10.129.0.0/23 dev eth0 proto kernel scope link src 10.129.0.15 
224.0.0.0/4 dev eth0 proto static scope link 


Expected results:
The network config/route should be created automatically when eth1 interface added to vmi


Additional info:
After adding the network config in network-scripts manually, eth1 can be up normally, and the ip route is correct too.

Comment 1 Yan Du 2018-09-19 10:14:19 UTC
Created attachment 1484641 [details]
vmi yaml

Comment 2 Petr Horáček 2018-09-19 13:22:40 UTC
Hello Yan, thanks for reporting that.

I believe it is expected, it depends on the way you install RHEL (whether the installer configured secondary interfaces during installation).

If they were not configured, you won't find any ifcfg files.

If you want to set temporary IP on eth0 (like you did in cloud-init), you can use ip address. To turn the interface UP, call (you can add it to cloud-init section):
ip link set up dev eth1

If you want to make this configuration permanent, you can either create the ifcfg config yourself or preferably, use NetworkManager to do that.

If DHCP server is available on the network:
nmcli con add type ethernet ifname eth1

If you want to configure static IP:
nmcli con add type ethernet ifname eth1 ipv4.address 192.168.123.11/24

Comment 3 Yan Du 2018-09-19 14:06:11 UTC
OK, thanks for your detail explanation.


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