From 35f4464697661e11b2b7950c1dcd1b2dbaa41d0b Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Fri, 10 Dec 2010 17:23:42 -0800 Subject: Fix 6453: After configuring VRRP on interface, VRRP is not active until VRRP is manually restared with "restart vrrp" command. - Move all commit checks into script on end node. - Add separate function for conntrack-sync settings. - Do per instance validation at the right priority level. - Verify that the changes file is removed on final transaction. --- .../bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def | 1 - .../vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def | 2 -- templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def | 1 - .../node.tag/vrrp/vrrp-group/node.tag/authentication/node.def | 2 -- .../ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def | 1 - .../vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def | 2 -- templates/interfaces/ethernet/node.tag/vrrp/node.def | 8 ++++++++ templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def | 1 - .../node.tag/vrrp/vrrp-group/node.tag/authentication/node.def | 2 -- 9 files changed, 8 insertions(+), 12 deletions(-) (limited to 'templates') diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def index f392d78a..b3126b2b 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def @@ -4,5 +4,4 @@ help: VRRP group number syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "VRRP group must be between 1-255" val_help: u32:1-255; VRRP group number -commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)" delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../../@).$VAR(../../@) --group $VAR(@) " diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def index 9869bcb3..180851c4 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def @@ -1,3 +1 @@ help: Authentication -commit:expression: $VAR(./type/@) != ""; "You must set a authentication type" -commit:expression: $VAR(./password/@) != ""; "You must set a authentication password" diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def index 0458fd0d..00b87c19 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def @@ -4,5 +4,4 @@ help: VRRP group number syntax:expression: $VAR(@) > 0 && $VAR(@) <= 255; "VRRP group must be between 1-255" val_help: u32:1-255; VRRP group number -commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)" delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../@) --group $VAR(@) " diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def index 9869bcb3..180851c4 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def @@ -1,3 +1 @@ help: Authentication -commit:expression: $VAR(./type/@) != ""; "You must set a authentication type" -commit:expression: $VAR(./password/@) != ""; "You must set a authentication password" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def index f392d78a..b3126b2b 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def @@ -4,5 +4,4 @@ help: VRRP group number syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "VRRP group must be between 1-255" val_help: u32:1-255; VRRP group number -commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)" delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../../@).$VAR(../../@) --group $VAR(@) " diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def index 9869bcb3..180851c4 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def @@ -1,3 +1 @@ help: Authentication -commit:expression: $VAR(./type/@) != ""; "You must set a authentication type" -commit:expression: $VAR(./password/@) != ""; "You must set a authentication password" diff --git a/templates/interfaces/ethernet/node.tag/vrrp/node.def b/templates/interfaces/ethernet/node.tag/vrrp/node.def index a9224ed9..062b2f66 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/node.def @@ -1,3 +1,11 @@ help: Virtual Router Redundancy Protocol (VRRP) priority: 800 + +# +# Note: there should be NO "commit" checks in the node.def hierarchy for +# vrrp because all the error checking is done on the end nodes. A +# "commit" check that fails in the node.def will prevent the "end" +# node from getting called and the "changes" file will get out of +# sync. +# end:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action update --intf $VAR(../@) " diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def index 0458fd0d..00b87c19 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def @@ -4,5 +4,4 @@ help: VRRP group number syntax:expression: $VAR(@) > 0 && $VAR(@) <= 255; "VRRP group must be between 1-255" val_help: u32:1-255; VRRP group number -commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)" delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../@) --group $VAR(@) " diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def index 9869bcb3..180851c4 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def @@ -1,3 +1 @@ help: Authentication -commit:expression: $VAR(./type/@) != ""; "You must set a authentication type" -commit:expression: $VAR(./password/@) != ""; "You must set a authentication password" -- cgit v1.2.3