From ec407d330649e687da42edcca46b6ea544f65458 Mon Sep 17 00:00:00 2001 From: Eshenko Dmitriy Date: Fri, 19 Jul 2019 01:29:26 +0300 Subject: Fix T1491 --- templates/interfaces/bonding/node.tag/primary/node.def | 3 +++ 1 file changed, 3 insertions(+) (limited to 'templates') diff --git a/templates/interfaces/bonding/node.tag/primary/node.def b/templates/interfaces/bonding/node.tag/primary/node.def index f80c6b8f..f91b1d6c 100644 --- a/templates/interfaces/bonding/node.tag/primary/node.def +++ b/templates/interfaces/bonding/node.tag/primary/node.def @@ -3,5 +3,8 @@ priority: 320 # must be after ethernet bond-group commit:expression: exec \ "grep -s $VAR(@) /sys/class/net/$VAR(../@)/bonding/slaves" \ ; "Ethernet interface must be part of the bonding group" +commit:expression: exec \ + "grep -E '(^active-backup|balance-tlb|balance-alb)' /sys/class/net/$VAR(../@)/bonding/mode" \ + ; "Bonding must have mode active-backup, transmit-load-balance or adaptive-load-balance" update: sudo sh -c "echo $VAR(@) >/sys/class/net/$VAR(../@)/bonding/primary" help: Primary device interface -- cgit v1.2.3