Skip to content

Commit a7dbbbd

Browse files
smirafrezbo
authored andcommitted
fix: don't disable LACP by default
Fixes #12315 As part of bond config refactoring, new LACP active setting was added which unfortunately defaults to 'off' as zero value disabling LACP. Fix that by enabling LACP by default: * unconditionally for legacy config * by default for new style config if no value was specified in the config Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com> (cherry picked from commit cc95562)
1 parent 3ca342c commit a7dbbbd

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

internal/app/machined/pkg/controllers/network/cmdline_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ func TestCmdlineParse(t *testing.T) {
410410
UseCarrier: true,
411411
PrimaryIndex: pointer.To[uint32](0),
412412
MissedMax: 2,
413+
ADLACPActive: nethelpers.ADLACPActiveOn,
413414
},
414415
},
415416
{

internal/app/machined/pkg/controllers/network/link_config_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ func (suite *LinkConfigSuite) TestMachineConfigurationWithAliases() {
458458
asrt.Equal(network.LinkKindBond, r.TypedSpec().Kind)
459459
asrt.Equal(nethelpers.BondModeXOR, r.TypedSpec().BondMaster.Mode)
460460
asrt.True(r.TypedSpec().BondMaster.UseCarrier)
461+
asrt.Equal(nethelpers.ADLACPActiveOn, r.TypedSpec().BondMaster.ADLACPActive)
461462
}
462463
},
463464
)
@@ -560,6 +561,7 @@ func (suite *LinkConfigSuite) TestMachineConfigurationNewStyle() {
560561
asrt.Equal(network.LinkKindBond, r.TypedSpec().Kind)
561562
asrt.Equal(nethelpers.BondModeActiveBackup, r.TypedSpec().BondMaster.Mode)
562563
asrt.EqualValues(200, r.TypedSpec().BondMaster.UpDelay)
564+
asrt.Equal(nethelpers.ADLACPActiveOn, r.TypedSpec().BondMaster.ADLACPActive)
563565
case "br0":
564566
asrt.True(r.TypedSpec().Up)
565567
asrt.True(r.TypedSpec().Logical)

internal/app/machined/pkg/controllers/network/network.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func SendBondMaster(link *network.LinkSpecSpec, bond talosconfig.NetworkBondConf
4646
link.BondMaster.ADSelect = bond.ADSelect().ValueOrZero()
4747
link.BondMaster.ADActorSysPrio = bond.ADActorSysPrio().ValueOrZero()
4848
link.BondMaster.ADUserPortKey = bond.ADUserPortKey().ValueOrZero()
49-
link.BondMaster.ADLACPActive = bond.ADLACPActive().ValueOrZero()
49+
link.BondMaster.ADLACPActive = bond.ADLACPActive().ValueOr(nethelpers.ADLACPActiveOn)
5050
link.BondMaster.PrimaryReselect = bond.PrimaryReselect().ValueOrZero()
5151
link.BondMaster.ResendIGMP = bond.ResendIGMP().ValueOrZero()
5252
link.BondMaster.MinLinks = bond.MinLinks().ValueOrZero()
@@ -147,6 +147,7 @@ func SetBondMasterLegacy(link *network.LinkSpecSpec, bond talosconfig.Bond) erro
147147
ADActorSysPrio: bond.ADActorSysPrio(),
148148
ADUserPortKey: bond.ADUserPortKey(),
149149
PeerNotifyDelay: bond.PeerNotifyDelay(),
150+
ADLACPActive: nethelpers.ADLACPActiveOn,
150151
}
151152
networkadapter.BondMasterSpec(&link.BondMaster).FillDefaults()
152153

0 commit comments

Comments
 (0)