[wicked-devel] ifup on macvlan does not start underlying device
Hi list The following might be a non-issue, but I would still like to mention my observations. The reason being that my customer is mainly managing their complex network setup through their own management tools. In testing a macvlan on top of a bond it appears that manually starting the macvlan interface with # wicked ifup macvlan0 does not start the underlying device, it is associated to. When starting the bond device itself, that one starts its slaves correctly as per below : os131b:/etc/wicked/ifconfig # cat ens7.xml <interface> <name>ens7</name> <control> <link-detection> <timeout>10</timeout> <require-link/> </link-detection> </control> <link/> </interface> os131b:/etc/wicked/ifconfig # cat ens8.xml <interface> <name>ens8</name> <control> <link-detection> <timeout>10</timeout> <require-link/> </link-detection> </control> <link/> </interface> os131b:/etc/wicked/ifconfig # cat bond0.xml <interface> <name>bond0</name> <control> <link-detection> <timeout>10</timeout> <require-link/> </link-detection> </control> <bond> <mode>active-backup</mode> <miimon> <frequency>100</frequency> <carrier>netif</carrier> </miimon> <slaves> <slave> <device>ens7</device> </slave> <slave> <device>ens8</device> </slave> </slaves> </bond> <link/> </interface> os131b:/etc/wicked/ifconfig # ip l sh 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens7: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000 link/ether 52:54:00:f0:33:4b brd ff:ff:ff:ff:ff:ff 3: ens8: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000 link/ether 52:54:00:d7:b9:8e brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 52:54:00:93:d2:81 brd ff:ff:ff:ff:ff:ff os131b:/etc/wicked/ifconfig # wicked ifup bond0 bond0: network-up os131b:/etc/wicked/ifconfig # ip l sh 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens7: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000 link/ether 52:54:00:f0:33:4b brd ff:ff:ff:ff:ff:ff 3: ens8: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000 link/ether 52:54:00:f0:33:4b brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 52:54:00:93:d2:81 brd ff:ff:ff:ff:ff:ff 15: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT link/ether 52:54:00:f0:33:4b brd ff:ff:ff:ff:ff:ff os131b:/etc/wicked/ifconfig # wicked ifdown bond0 bond0: device-down os131b:/etc/wicked/ifconfig # cat macvlan0.xml <interface> <name>macvlan0</name> <ipv4:static> <address> <local>172.10.31.4/24</local> </address> </ipv4:static> <macvlan> <device>bond0</device> <mode>bridge</mode> </macvlan> </interface> os131b:/etc/wicked/ifconfig # wicked ifup macvlan0 bond0: device-exists wicked: device macvlan0 failed: operation timed out wicked: device bond0 failed: operation timed out os131b:/etc/wicked/ifconfig # ip l sh 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 52:54:00:f0:33:4b brd ff:ff:ff:ff:ff:ff 3: ens8: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000 link/ether 52:54:00:d7:b9:8e brd ff:ff:ff:ff:ff:ff 4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 52:54:00:93:d2:81 brd ff:ff:ff:ff:ff:ff 9: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT link/ether 76:9a:17:18:79:c3 brd ff:ff:ff:ff:ff:ff 10: macvlan0@bond0: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT link/ether 76:9a:17:18:79:c3 brd ff:ff:ff:ff:ff:ff This also happens if the underlying macvlan device is a regular interface, e.g. ens7 in the above setup. If the underlying device is started before trying to start the macvlan device, it works. Again, when booting the system, the devices are brought up correctly. However post-boot interface management must also work for wicked to be useful to my customer, who is managing interfaces in their SLES based telco systems. They have up to thousands of virtual interfaces defined on a single machine. Researching this I have noticed some syslog messages that appear when down'ing virtual interfaces. Perhaps they can give some hints : 2013-12-30T14:42:35.947330+01:00 linux-vr36 wickedd-dhcp6[592]: unable to open /sys/class/net/bond0/bonding/slaves: No such file or directory 2013-12-30T14:42:35.947644+01:00 linux-vr36 wickedd-dhcp6[592]: bond0: cannot get bonding attribute mode 2013-12-30T14:42:35.948150+01:00 linux-vr36 wickedd-dhcp6[592]: error retrieving bonding attribute from sysfs 2013-12-30T14:42:35.960640+01:00 linux-vr36 wickedd[562]: unable to open /sys/class/net/bond0/bonding/slaves: No such file or directory 2013-12-30T14:42:35.961549+01:00 linux-vr36 wickedd[562]: bond0: cannot get bonding attribute mode 2013-12-30T14:42:35.962277+01:00 linux-vr36 wickedd[562]: error retrieving bonding attribute from sysfs
2013-12-30T14:42:35.968078+01:00 linux-vr36 wickedd[562]: cannot send device-delete event for model "bond0" - no dbus device <<< 2013-12-30T14:43:19.379833+01:00 linux-vr36 kernel: [ 9433.464445] bonding: bond0 is being created... 2013-12-30T14:43:19.435791+01:00 linux-vr36 kernel: [ 9433.520436] device bond0 entered promiscuous mode 2013-12-30T14:43:19.435808+01:00 linux-vr36 kernel: [ 9433.520525] IPv6: ADDRCONF(NETDEV_UP): macvlan0: link is not ready 2013-12-30T14:43:19.435501+01:00 linux-vr36 wickedd-dhcp4[595]: macvlan0: reconfig changes device type! d6 l0 2013-12-30T14:43:39.398381+01:00 linux-vr36 wicked: device macvlan0 failed: operation timed out 2013-12-30T14:43:39.399146+01:00 linux-vr36 wicked: device bond0 failed: operation timed out 2013-12-30T14:44:45.178972+01:00 linux-vr36 kernel: [ 9519.263529] device bond0 left promiscuous mode 2013-12-30T14:44:45.220664+01:00 linux-vr36 avahi-daemon[555]: Withdrawing workstation service for macvlan0.
2013-12-30T14:44:45.238129+01:00 linux-vr36 wickedd[562]: cannot send device-delete event for model "macvlan0" - no dbus device <<<
Please let me know if this kind of issues are considered spamming of the mailing list. Thanks. Best regards Andreas Taschner Dedicated Support Engineer SUSE -- To unsubscribe, e-mail: wicked-devel+unsubscribe@opensuse.org To contact the owner, e-mail: wicked-devel+owner@opensuse.org
Am 30.12.2013 15:35, schrieb Andreas Taschner:
Hi list Hi!
In testing a macvlan on top of a bond it appears that manually starting the macvlan interface with # wicked ifup macvlan0 does not start the underlying device, it is associated to.
Yes, this is not finished yet / needs to be tweaked as needed. Currently the requirement to do it is basically commented out in schema/macvlan.xml: <device type="string"> <meta:netif-reference shared="true"/> <meta:require check="netif-child-state" op="newDevice" min-state="device-exists" /> <!-- meta:require check="netif-child-state" op="linkUp" min-state="device-up" / --> <!-- meta:require check="netif-child-state" op="login" min-state="link-authenticated" / --> </device> I'd say, it has to be: <device type="string"> <meta:netif-reference shared="true"/> <meta:require check="netif-child-state" op="newDevice" min-state="device-up" /> <meta:require check="netif-child-state" op="login" min-state="link-authenticated" /> <meta:require check="netif-child-state" op="linkUp" min-state="link-up" /> </device> It should work then. Maybe "device-exists" instead of "device-up" is sufficient... Gruesse / Regards, Marius Tomaschewski <mt@suse.de>, <mt@suse.com> -- SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg), GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: wicked-devel+unsubscribe@opensuse.org To contact the owner, e-mail: wicked-devel+owner@opensuse.org
participants (2)
-
Andreas Taschner
-
Marius Tomaschewski