Bug 1553625 - ifcfg files of bond+vlan device are incorrect when configured via network cmd in kickstart file
Summary: ifcfg files of bond+vlan device are incorrect when configured via network cmd...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: pre-dev-freeze
: ---
Assignee: Ryan Barry
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: ovirt-node-ng-43-el76-platform
TreeView+ depends on / blocked
 
Reported: 2018-03-09 08:27 UTC by jiachen zhang
Modified: 2019-04-24 20:56 UTC (History)
20 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-16 15:05:25 UTC
Target Upstream Version:


Attachments (Terms of Use)
/var/log /tmp network-scripts (440.50 KB, application/x-gzip)
2018-03-09 08:27 UTC, jiachen zhang
no flags Details
/var/log for rhvh-4.1-20180307.0 (308.70 KB, application/x-gzip)
2018-03-28 07:25 UTC, jiachen zhang
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1493545 None CLOSED Enable initscripts' services by default 2019-10-24 14:01:20 UTC

Internal Links: 1493545

Description jiachen zhang 2018-03-09 08:27:27 UTC
Created attachment 1406175 [details]
/var/log /tmp network-scripts

Description of problem:

Configure bond+vlan device in kickstart file as:
 
network --device=bond0 --bootproto=dhcp --bondslaves=em3,em4 --bondopts=mode=active-backup,primary=em3,miimon=100 --vlanid=50
 
After installation finished, there is no bond0 device, bond0.50 is there, but without IP.
 
[root@test ~]# ip addr
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: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 24:6e:96:19:bb:70 brd ff:ff:ff:ff:ff:ff
    inet 10.73.131.63/23 brd 10.73.131.255 scope global noprefixroute dynamic em1
       valid_lft 43077sec preferred_lft 43077sec
    inet6 2620:52:0:4982:f9b6:560f:188f:6ee5/64 scope global noprefixroute dynamic
       valid_lft 2591878sec preferred_lft 604678sec
    inet6 fe80::fa95:b7cc:aeb1:b8a8/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 24:6e:96:19:bb:71 brd ff:ff:ff:ff:ff:ff
4: p5p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether a0:36:9f:ae:9f:54 brd ff:ff:ff:ff:ff:ff
5: em3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 24:6e:96:19:bb:72 brd ff:ff:ff:ff:ff:ff
6: em4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 24:6e:96:19:bb:73 brd ff:ff:ff:ff:ff:ff
7: p7p1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether a0:36:9f:9d:37:12 brd ff:ff:ff:ff:ff:ff
8: p7p2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether a0:36:9f:9d:37:13 brd ff:ff:ff:ff:ff:ff
9: p5p2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether a0:36:9f:ae:9f:56 brd ff:ff:ff:ff:ff:ff
20: bond0.50: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 5e:07:3c:86:14:b4 brd ff:ff:ff:ff:ff:ff
 
 
The ifcfg files are:
 
[root@test network-scripts]# ll
total 292
-rw-r--r--. 1 root root   390 Mar  9 15:19 ifcfg-bond0.50
-rw-r--r--. 1 root root   127 Mar  9 15:19 ifcfg-bond0.50_slave_1
-rw-r--r--. 1 root root   127 Mar  9 15:19 ifcfg-bond0.50_slave_2
-rw-r--r--. 1 root root   306 Mar  9 15:19 ifcfg-em1
-rw-r--r--. 1 root root   275 Mar  9 15:19 ifcfg-em2
-rw-r--r--. 1 root root   254 Jan  3 00:29 ifcfg-lo
-rw-r--r--. 1 root root   277 Mar  9 15:19 ifcfg-p5p1
-rw-r--r--. 1 root root   277 Mar  9 15:19 ifcfg-p5p2
-rw-r--r--. 1 root root   277 Mar  9 15:19 ifcfg-p7p1
-rw-r--r--. 1 root root   277 Mar  9 15:19 ifcfg-p7p2
 
[root@test network-scripts]# cat ifcfg-bond0.50
BONDING_OPTS="miimon=100 mode=active-backup primary=em3"
TYPE="Bond"
BONDING_MASTER="yes"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="bond0.50"
UUID="c8ced0e7-0aab-45b5-a8fe-a88899b3643a"
DEVICE="bond0.50"
ONBOOT="yes"
 
[root@test network-scripts]# cat ifcfg-bond0.50_slave_1
TYPE=Ethernet
NAME="bond0.50 slave 1"
UUID=842c9042-71df-4b22-a8cc-be9ee7491834
DEVICE=em3
ONBOOT=no
MASTER=bond0.50
SLAVE=yes
 
It seems ifcfg-bond0.50, which should be the configuration file of the vlan device, is the configuration file of bond0. And there is no ifcfg file for vlan device.



Version-Release number of selected component (if applicable):
RHVH-4.2-20180305.0-RHVH-x86_64-dvd1.iso


How reproducible:
100%

Steps:
1. Create a kickstart file with bond+vlan configuration as above, and other neccessary configurations.
2. After installation finished, check IP and ifcfg files.
 
Actual Results:
1. No IP with the shown vlan device.
2. Missing ifcfg-bond0 file
3. ifcfg-bond0.50 is the configuration of bond device, not vlan device.
 
Expected Results:
1. Vlan device can get IP.
2. ifcfg files for bond and vlan device should be correct.

Comment 1 Ryan Barry 2018-03-09 12:41:08 UTC
Isn't this a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1553595 ?

Comment 3 jiachen zhang 2018-03-12 02:01:30 UTC
It's not a duplicate. Although two bugs appeared when creating bond+vlan, the phenomenon is not the same.

Comment 4 Sandro Bonazzola 2018-03-13 10:50:26 UTC
Ryan can we have a workaround in RHV-H while platform fixes this?

Comment 5 cshao 2018-03-13 10:56:43 UTC
Vlan device can get IP after restar NetworkManager. But after reboot host, vlan device still can't get IP.

Comment 6 Qin Yuan 2018-03-13 13:58:23 UTC
(In reply to cshao from comment #5)
> Vlan device can get IP after restar NetworkManager. But after reboot host,
> vlan device still can't get IP.

You may mix up this bug with Bug 1553595, for this one, there is no vlan device, although bond0.50 is shown, it's a bond device actually. Restart NetworkManager cannot change anything.

Comment 7 Ryan Barry 2018-03-13 14:52:47 UTC
No workaround, and like the other, I am not sure one is possible

Comment 8 jiachen zhang 2018-03-19 09:06:36 UTC
The same issues occurs in redhat-virtualization-host-4.1-20180307.0

Comment 10 Radek Vykydal 2018-03-27 08:28:18 UTC
The suspicious thing here is that ifcfg files for the network command are not created in initramfs (or not transferred to installer root). 

Anaconda is not able to create all the required files correctly in stage2 then. The situation is equivalent to defining the networking in %pre section (where ifcfg files are not created in initramfs as well). I think for this case (vlan over bond) we are not able to deal with the configuration. What might help would be to try to create the devices in two steps:

network --device=bond0 --noipv4 --bondslaves=em3,em4 --bondopts=mode=active-backup,primary=em3,miimon=100 
network --device=bond0 --bootproto=dhcp --vlanid=50

but I am not sure if it actually works.

To investigate more I'd need a link to RHEV iso I could use to reproduce the issue. Also the complete kickstart used for installation could be useful.

Comment 15 Radek Vykydal 2018-03-27 14:55:38 UTC
Could you try to reproduce with rd.debug installer boot option added and attach the logs?

Comment 16 Radek Vykydal 2018-03-27 15:26:51 UTC
(In reply to Radek Vykydal from comment #15)
> Could you try to reproduce with rd.debug installer boot option added and
> attach the logs?

No more needed. I've reproduced the issue with RHVH-4.2-20180305.0-RHVH-x86_64-dvd1.iso locally.
It seems that importing of the state (ifcfg files in this case) from initramfs is broken.

Comment 18 Radek Vykydal 2018-03-28 06:08:08 UTC
(In reply to Radek Vykydal from comment #16)
> No more needed. I've reproduced the issue with
> RHVH-4.2-20180305.0-RHVH-x86_64-dvd1.iso locally.
> It seems that importing of the state (ifcfg files in this case) from
> initramfs is broken.

rhel-import-state.service is not enabled which reminds me of bug #1537977 on Fedora.

(In reply to jiachen zhang from comment #8)
> The same issues occurs in redhat-virtualization-host-4.1-20180307.0

On http://download.englab.brq.redhat.com/released/RHV-4.1/RHVH-builds/RHVH-4.1-20180315.0/compose/RHVH/x86_64/os/ the service is enabled so I am surprised that you are seeing the problem here. Could you please provide anaconda logs for this case? There may be some additional problem and need to handle that as well.

Comment 19 jiachen zhang 2018-03-28 07:25:25 UTC
Created attachment 1414020 [details]
/var/log for rhvh-4.1-20180307.0

Comment 20 jiachen zhang 2018-03-28 07:40:56 UTC
So sorry for deleteing the needinfo accidentally.

Comment 21 jiachen zhang 2018-03-28 07:41:37 UTC
So sorry for deleteing the needinfo accidentally.

Comment 22 Radek Vykydal 2018-03-28 08:04:00 UTC
/usr/lib/systemd/system-preset/90-default.preset used for RHEV 4.2 doesn't seem to have the update from bug 1493545 which went into redhat-release-server package. Maybe the file in redhat-virtualization-host-productimg needs update?

Comment 23 Radek Vykydal 2018-03-28 08:09:38 UTC
(In reply to jiachen zhang from comment #19)
> Created attachment 1414020 [details]
> /var/log for rhvh-4.1-20180307.0

Thank you. The problem here is the same as with 4.2 - rhel-import-state service not enabled.

Comment 24 jiachen zhang 2018-03-28 08:41:54 UTC
(In reply to Radek Vykydal from comment #10)
> The suspicious thing here is that ifcfg files for the network command are
> not created in initramfs (or not transferred to installer root). 
> 
> Anaconda is not able to create all the required files correctly in stage2
> then. The situation is equivalent to defining the networking in %pre section
> (where ifcfg files are not created in initramfs as well). I think for this
> case (vlan over bond) we are not able to deal with the configuration. What
> might help would be to try to create the devices in two steps:
> 
> network --device=bond0 --noipv4 --bondslaves=em3,em4
> --bondopts=mode=active-backup,primary=em3,miimon=100 
> network --device=bond0 --bootproto=dhcp --vlanid=50
> 
> but I am not sure if it actually works.
> 
> To investigate more I'd need a link to RHEV iso I could use to reproduce the
> issue. Also the complete kickstart used for installation could be useful.

I tried this in redhat-virtualization-host-4.2-20180326.0 and add "--noipv6" in the first command "network --device=bond0 --noipv4 --noipv6 --bondslaves=em3,em4 --bondopts=mode=active-backup,primary=em3,miimon=100". Actually, this time I can get bond0,bond0.50 and their ifcfg files, but still cannot get the Vlan ip. So I don't think this method works.

Comment 25 Yuval Turgeman 2018-03-28 12:48:21 UTC
So we need to add all of the following presets to our productimg (or just rhel-import-state) ?

# https://bugzilla.redhat.com/show_bug.cgi?id=1493545
enable rhel-autorelabel.service
enable rhel-autorelable-mark.service
enable rhel-configure.service
enable rhel-dmesg.service
enable rhel-import-state.service
enable rhel-loadmodules.service
enable rhel-readonly.service

Comment 26 Radek Vykydal 2018-03-28 13:02:54 UTC
I guess all of them (or those in https://bugzilla.redhat.com/show_bug.cgi?id=1493545#c15, ie containing also rhel-domainname.service - this is what RHEL7.5 has) but I'd rather ask dkaspar who handled the 1493545.

Comment 27 Radek Vykydal 2018-03-28 13:05:35 UTC
Also accidentally cleared needinfo.

Comment 28 Radek Vykydal 2018-03-28 13:06:37 UTC
Also accidentally cleared needinfo.

Comment 41 Qin Yuan 2018-04-04 09:13:53 UTC
For RHVH-4.1-20180331.1-RHVH-x86_64-dvd1.iso, when configure bond+vlan in kickstart file, the bond+vlan device and ifcfg files are normal now.


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