Bug 1119347

Summary: networkd: bonding - Mode .netdev - feature
Product: [Fedora] Fedora Reporter: poma <pomidorabelisima>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: johannbg, lnykryn, msekleta, s, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-15 06:47:22 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:

Description poma 2014-07-14 14:55:12 UTC
kernel-3.16.0-0.rc4.git3.1.fc21.x86_64
systemd-215-5.git7c1cff4.20140714.fc21.x86_64

*********************************************

/etc/systemd/network/bond0mode.netdev
[NetDev]
Name=bond0
Kind=bond

[Bond]
Mode=active-backup  <-

****

bondctl detail bond0
Bonding Master: bond0
    Oper State:     up
    Slaves:         enp3s0 enp1s9
    Active Slave:   
    Mode:           balance-rr 0  <-
    Monitor:        No monitoring enabled

*****************************************

/etc/modprobe.d/bonding.conf
options bonding mode=1  <=

*******

bondctl detail bond0
Bonding Master: bond0
    Oper State:     up
    Slaves:         enp3s0 enp1s9
    Active Slave:   enp3s0
    Mode:           active-backup 1  <=
    Monitor:        No monitoring enabled

******

Tested all seven bonding modes of operation:
0 - balance-rr
1 - active-backup
2 - balance-xor
3 - broadcast
4 - 802.3ad
5 - balance-tlb
6 - balance-alb

Comment 1 Zbigniew Jędrzejewski-Szmek 2014-07-14 22:52:55 UTC
What is the problem?

Comment 2 poma 2014-07-15 04:31:17 UTC
Doesn't pick out Mode from .netdev.

This works via modprobe i.e. option specified in
/etc/modprobe.d/bonding.conf
options bonding mode=1  <=

Comment 3 poma 2014-07-15 04:33:48 UTC
Also does not work with 215-6.git99f9dd8.20140714.

Comment 4 poma 2014-07-15 06:46:48 UTC
It's not a bug, it's a feature, 
"man: systemd.netdev - make it clear that we do not touch preexisting netdevs"
http://cgit.freedesktop.org/systemd/systemd/commit/?id=7c1cff4

This works with original ifnames, 
https://bugzilla.redhat.com/attachment.cgi?id=918064

Comment 5 poma 2014-07-16 09:27:33 UTC
FTR, feature as explained here:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=7c1cff4ff7
"We will happily use bridges/bonds as master devices, but we will not change their settings if they were created by someone else."