From 05680da28fa9f94f1b3e3897c8c8e13d13580264 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 25 Jan 2011 11:28:35 +1000 Subject: Pass interface name correctly when deleting dhcpv6 Bug 6726 Typo in vyatta-address script conversion from perl to shell (cherry picked from commit 4a319dd3a0aa95a92067fa677ad2e5d94534044b) --- scripts/vyatta-address | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vyatta-address b/scripts/vyatta-address index 2e521c26..94fb1c59 100755 --- a/scripts/vyatta-address +++ b/scripts/vyatta-address @@ -32,7 +32,7 @@ case $1 in exec /opt/vyatta/sbin/vyatta-interfaces.pl --dev="$2" --dhcp=stop elif [[ "$3" = "dhcpv6" ]] then - exec /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --ifname $ifname + exec /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --ifname "$2" elif [[ "$3" =~ ":" ]] then exec ip -6 addr del "$3" dev "$2" -- cgit v1.2.3 From 47a2452f92a33aadc26ba5b591c96cfe81482a9b Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 24 Jan 2011 20:03:02 -0800 Subject: Fix 6501: "clear vrrp master interface group " doesnt work with sync groups. (cherry picked from commit 34972b97e834d66147e91c071a1c1caabe18f76f) --- scripts/keepalived/vyatta-clear-vrrp.pl | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/scripts/keepalived/vyatta-clear-vrrp.pl b/scripts/keepalived/vyatta-clear-vrrp.pl index cdc74cf5..34c0327e 100755 --- a/scripts/keepalived/vyatta-clear-vrrp.pl +++ b/scripts/keepalived/vyatta-clear-vrrp.pl @@ -241,12 +241,31 @@ if ($action eq 'clear_master') { my $conf = <$f>; close $f; - my ($new_conf, $match_instance) = vrrp_extract_instance($conf, $instance); - if ($match_instance !~ /nopreempt/) { - print "Warning: $instance is in preempt mode"; - print " and may retake master\n"; + my $sync_group = list_vrrp_sync_group($intf, $group); + my @instances = (); + if (defined($sync_group)) { + print "vrrp group $vrrp_group on $vrrp_intf is in sync-group " + . "$sync_group\n"; + @instances = list_vrrp_sync_group_members($sync_group); + } else { + push @instances, $instance; + } + + my $new_conf = $conf; + my $clear_instances; + foreach my $inst (@instances) { + my $match_instance; + print "Forcing $inst to BACKUP...\n"; + Vyatta::Keepalived::vrrp_log("vrrp extract $inst"); + ($new_conf, $match_instance) = vrrp_extract_instance($new_conf, $inst); + if ($match_instance !~ /nopreempt/) { + print "Warning: $instance is in preempt mode"; + print " and may retake master\n"; + + } + $match_instance = set_instance_inital_state($match_instance, 'BACKUP'); + $clear_instances .= "$match_instance\n"; } - $match_instance = set_instance_inital_state($match_instance, 'BACKUP'); # # need to set the correct initial state for the remaining instances @@ -265,13 +284,12 @@ if ($action eq 'clear_master') { restart_daemon($conf_file); - print "Forcing $vrrp_intf-$group to BACKUP...\n"; sleep(3); # # add modified instance back and restart # - $new_conf .= "\n" . $match_instance . "\n"; + $new_conf .= "\n" . $clear_instances . "\n"; keepalived_write_file($conf_file, $new_conf); Vyatta::Keepalived::restart_daemon($conf_file); -- cgit v1.2.3 From 60ec9dfcf7c1ddc0f23f540570637db50a49809c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 26 Jan 2011 10:52:46 +1000 Subject: Rearrange priority for pseudo-ethernet Bug 6116 Do setup at same priority as VIF (since it is really macvlan) Do address after peth mac address is set. (cherry picked from commit 0f3aa38c15bb159d331dcfd91076ac37bd4c524e) --- templates/interfaces/pseudo-ethernet/node.def | 2 +- templates/interfaces/pseudo-ethernet/node.tag/address/node.def | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/interfaces/pseudo-ethernet/node.def b/templates/interfaces/pseudo-ethernet/node.def index 2d2da19f..5b0aaac9 100644 --- a/templates/interfaces/pseudo-ethernet/node.def +++ b/templates/interfaces/pseudo-ethernet/node.def @@ -1,5 +1,5 @@ tag: -priority: 390 +priority: 319 # same as vif type: txt help: Pseudo Ethernet device name val_help: ; Pseudo Ethernet interface name diff --git a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def index d2812446..253c4775 100644 --- a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def +++ b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def @@ -1,5 +1,6 @@ multi: type: txt +priority: 320 # After peth device is initialized help: IP address syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" -- cgit v1.2.3 From 46ad7f52c90e22bd231af63e78096fc6e8de319e Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Wed, 26 Jan 2011 15:43:08 -0800 Subject: 0.19.34 --- debian/changelog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index 654d1adc..c2c8d94d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +vyatta-cfg-system (0.19.34) unstable; urgency=low + + [ Stephen Hemminger ] + * Pass interface name correctly when deleting dhcpv6 + + [ Stig Thormodsrud ] + * Fix 6501: "clear vrrp master interface group " + doesnt work with sync groups. + + [ Stephen Hemminger ] + * Rearrange priority for pseudo-ethernet + * Rearrange priority for pseudo-ethernet + + [ Stig Thormodsrud ] + * Fix vrrp duplicate generation of last sync-group entry. + + -- Stig Thormodsrud Wed, 26 Jan 2011 15:43:08 -0800 + vyatta-cfg-system (0.19.33) unstable; urgency=low [ Stephen Hemminger ] -- cgit v1.2.3 From eb48d5bdb7a1782cf7ed409743fdb68e4cc89cc6 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Thu, 27 Jan 2011 13:00:02 -0800 Subject: Fix Bug 6696 Internal error for release/renew dhcp interface under op mode * do not execute config-mode actions when called from op-mode (cherry picked from commit c385ddc400788eff46f10fea6b57b593607dc290) --- scripts/vyatta-interfaces.pl | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index efefca9a..94a822e0 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -190,13 +190,16 @@ sub is_intf_disabled { } sub run_dhclient { - my $intf = shift; + my ($intf, $op_mode) = @_; - my ($intf_config_file, $intf_process_id_file, $intf_leases_file) - = generate_dhclient_intf_files($intf); - dhcp_update_config($intf_config_file, $intf); + my ($intf_config_file, $intf_process_id_file, $intf_leases_file) + = generate_dhclient_intf_files($intf); - return if is_intf_disabled($intf); + # perform config mode actions if not called from op-mode + if (!defined $op_mode) { + dhcp_update_config($intf_config_file, $intf); + return if is_intf_disabled($intf); + } my $cmd = "$dhcp_daemon -pf $intf_process_id_file -x $intf 2> /dev/null; rm -f $intf_process_id_file 2> /dev/null;"; $cmd .= "$dhcp_daemon -q -nw -cf $intf_config_file -pf $intf_process_id_file -lf $intf_leases_file $intf 2> /dev/null &"; @@ -206,9 +209,12 @@ sub run_dhclient { } sub stop_dhclient { - my $intf = shift; + my ($intf, $op_mode) = @_; - return if is_intf_disabled($intf); + # perform config mode actions if not called from op-mode + if (!defined $op_mode) { + return if is_intf_disabled($intf); + } my ($intf_config_file, $intf_process_id_file, $intf_leases_file) = generate_dhclient_intf_files($intf); @@ -325,12 +331,12 @@ sub dhcp { if (-e $release_file); print "Releasing DHCP lease on $intf ...\n"; - stop_dhclient($intf); + stop_dhclient($intf, 'op_mode'); mkdir ($tmp_dhclient_dir) if (! -d $tmp_dhclient_dir ); touch ($release_file); } elsif ($request eq "renew") { print "Renewing DHCP lease on $intf ...\n"; - run_dhclient($intf); + run_dhclient($intf, 'op_mode'); unlink ($release_file); } elsif ($request eq "start") { print "Starting DHCP client on $intf ...\n"; -- cgit v1.2.3 From ae38d1024d5e56ecbdba56f330720bcf345c78e3 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Thu, 27 Jan 2011 13:54:05 -0800 Subject: 0.19.35 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index c2c8d94d..07df6cd4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyatta-cfg-system (0.19.35) unstable; urgency=low + + * Fix Bug 6696 Internal error for release/renew dhcp interface under + op mode + + -- Mohit Mehta Thu, 27 Jan 2011 13:54:04 -0800 + vyatta-cfg-system (0.19.34) unstable; urgency=low [ Stephen Hemminger ] -- cgit v1.2.3 From 9f64ee9abb10801d22e949b8ffaa20c4667b7461 Mon Sep 17 00:00:00 2001 From: Robert Bays Date: Thu, 27 Jan 2011 17:45:40 -0800 Subject: Fix grammar error in help string. --- scripts/system/irq-affinity.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/irq-affinity.pl b/scripts/system/irq-affinity.pl index ed8063ff..fec90dc3 100755 --- a/scripts/system/irq-affinity.pl +++ b/scripts/system/irq-affinity.pl @@ -229,7 +229,7 @@ sub check_mask { die "$ifname: $name mask $mask has no bits set\n" if ($m == 0); - die "$ifname: $name mask $mask to large for number of CPU's: $cpus\n" + die "$ifname: $name mask $mask too large for number of CPU's: $cpus\n" if ($m >= 1 << $cpus); } -- cgit v1.2.3 From 19f1bb4461404f91b9b4e80267dae97306925963 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Mon, 31 Jan 2011 12:53:51 -0800 Subject: use val_help to present valid info for node --- .../dns/dynamic/interface/node.tag/service/node.tag/server/node.def | 2 ++ templates/service/dns/forwarding/cache-size/node.def | 1 + 2 files changed, 3 insertions(+) diff --git a/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def b/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def index 04ef5e18..247755a1 100644 --- a/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def +++ b/templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def @@ -1,2 +1,4 @@ help: Server to send DDNS update to (IP address|hostname) type: txt +val_help: ipv4; IP address of DDNS server +val_help: ; Hostname of DDNS server diff --git a/templates/service/dns/forwarding/cache-size/node.def b/templates/service/dns/forwarding/cache-size/node.def index 1b1a33e6..9285dbbd 100644 --- a/templates/service/dns/forwarding/cache-size/node.def +++ b/templates/service/dns/forwarding/cache-size/node.def @@ -2,3 +2,4 @@ type: u32 default:150 help: DNS forwarding cache size syntax:expression: ($VAR(@) >=0 && $VAR(@) < 10001) ; "Cache size must be between 0 and 10000" +val_help: u32:0-10000; DNS forwarding cache size -- cgit v1.2.3 From e61b1d0000d3feb58cac69d2155b8271d7923d5a Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Mon, 31 Jan 2011 12:56:34 -0800 Subject: 0.19.36 --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 07df6cd4..2bb8b73c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +vyatta-cfg-system (0.19.36) unstable; urgency=low + + [ Robert Bays ] + * Fix grammar error in help string. + + [ Mohit Mehta ] + * use val_help to present valid info for node + + -- Mohit Mehta Mon, 31 Jan 2011 12:56:34 -0800 + vyatta-cfg-system (0.19.35) unstable; urgency=low * Fix Bug 6696 Internal error for release/renew dhcp interface under -- cgit v1.2.3