diff options
-rw-r--r-- | debian/changelog | 56 | ||||
-rwxr-xr-x | scripts/keepalived/vyatta-keepalived.pl | 4 | ||||
-rwxr-xr-x | scripts/system/irq-affinity.pl | 8 | ||||
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 24 | ||||
-rwxr-xr-x | scripts/vyatta_net_name | 21 | ||||
-rw-r--r-- | templates/interfaces/pseudo-ethernet/node.def | 2 | ||||
-rw-r--r-- | templates/interfaces/pseudo-ethernet/node.tag/address/node.def | 1 | ||||
-rw-r--r-- | templates/service/dns/dynamic/interface/node.tag/service/node.tag/server/node.def | 2 | ||||
-rw-r--r-- | templates/service/dns/forwarding/cache-size/node.def | 1 |
9 files changed, 101 insertions, 18 deletions
diff --git a/debian/changelog b/debian/changelog index 654d1adc..88baea44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,59 @@ +vyatta-cfg-system (0.19.38) unstable; urgency=low + + * Bugfix 6773: Spread load of single-queue NICs across all CPUs. + + -- Bob Gilligan <gilligan@vyatta.com> Thu, 03 Feb 2011 00:30:03 -0800 + +vyatta-cfg-system (0.19.37) unstable; urgency=low + + [ Mohit Mehta ] + * Fix Bug 6696 Internal error for release/renew dhcp interface under + op mode + + [ Robert Bays ] + * Fix grammar error in help string. + + [ Bob Gilligan ] + * Bugfix 6156: Allow time for renaming to complete before running + biosdevname + + -- Bob Gilligan <gilligan@vyatta.com> Tue, 01 Feb 2011 10:52:49 -0800 + +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 <mohit@vyatta.com> 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 + op mode + + -- Mohit Mehta <mohit@vyatta.com> Thu, 27 Jan 2011 13:54:04 -0800 + +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 <interface> group <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 <stig@vyatta.com> Wed, 26 Jan 2011 15:43:08 -0800 + vyatta-cfg-system (0.19.33) unstable; urgency=low [ Stephen Hemminger ] diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index 9b8358d2..7a113469 100755 --- a/scripts/keepalived/vyatta-keepalived.pl +++ b/scripts/keepalived/vyatta-keepalived.pl @@ -391,11 +391,12 @@ sub remove_from_changes { sub vrrp_update_config { my @errs = (); - my $output = "#\n# autogenerated by $0\n#\n\n"; + my $output; my $config = new Vyatta::Config; my $vrrp_instances = 0; + %HoA_sync_groups = (); foreach my $name ( getInterfaces() ) { my $intf = new Vyatta::Interface($name); next unless $intf; @@ -427,6 +428,7 @@ sub vrrp_update_config { if ( defined $sync_groups && $sync_groups ne "" ) { $output = $sync_groups . $output; } + $output = "#\n# autogenerated by $0\n#\n\n" . $output; keepalived_write_file( $conf_file, $output ); } return ( $vrrp_instances, @errs ); diff --git a/scripts/system/irq-affinity.pl b/scripts/system/irq-affinity.pl index ed8063ff..cf68c0d1 100755 --- a/scripts/system/irq-affinity.pl +++ b/scripts/system/irq-affinity.pl @@ -157,7 +157,11 @@ sub first_cpu { unless defined($ifunit); my $threads = threads_per_core(); - return ( $ifunit * $threads ) % $cpus; + # Give the load first to one CPU of each hyperthreaded core, then + # if there are enough NICs, give the load to the other CPU of + # each core. + my $ht_wrap = (($ifunit * $threads) / $cpus) % $threads; + return ((($ifunit * $threads) + $ht_wrap) % $cpus); } # Assignment for multi-queue NICs @@ -229,7 +233,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); } 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"; diff --git a/scripts/vyatta_net_name b/scripts/vyatta_net_name index 5de49b94..c3571f89 100755 --- a/scripts/vyatta_net_name +++ b/scripts/vyatta_net_name @@ -27,7 +27,7 @@ my $UDEVDIR = "/dev/.udev/"; my $VYATTAUDEV = $UDEVDIR . "vyatta"; my $LOCKFILE = $UDEVDIR . ".vyatta-lock"; my $UDEVLOG = $UDEVDIR . "log/"; -my $LOGFILE = $UDEVLOG . "vyatta-net-name"; +my $LOGFILE = $UDEVLOG . "vyatta-net-name.coldplug"; # Check if interface name is free to use sub is_available { @@ -85,6 +85,11 @@ sub biosdevname { # biosdevname works only on ethernet devices return $ifname unless ($ifname =~ /^eth/); + # Let the interface name changes ordered by previous invocations of this + # script complete before we call biosdevname. If we don't, biosdevame + # may generate incorrect name. + sleep 1; + my $biosname = `/sbin/biosdevname --policy all_ethN -i $ifname 2>>$UDEVLOG/biosdevname`; chomp $biosname; @@ -119,6 +124,12 @@ sub parse_config_boot { return $interfaces; } +sub logit { + my ($log, $msg) = @_; + my $now = localtime; + print $log "$now: $msg"; +} + # Determine network name to use based on Vyatta config during boot sub coldplug { my ($ifname, $hwaddr) = @_; @@ -127,7 +138,7 @@ sub coldplug { mkdir ($UDEVLOG); open (my $log, '>>', $LOGFILE) or die "Can't open $LOGFILE : $!"; - print {$log} "lookup $ifname $hwaddr\n"; + logit($log, "lookup $ifname $hwaddr\n"); # parse config file to produce map of existing hw-id values my $interfaces = parse_config_boot(); @@ -135,7 +146,7 @@ sub coldplug { # is name already in config file my $newname = $interfaces->{$hwaddr}; if ($newname) { - print {$log} "use hw-id $hwaddr in config mapped to '$newname'\n"; + logit($log, "use hw-id $hwaddr in config mapped to '$newname'\n"); return $newname; } @@ -153,13 +164,13 @@ sub coldplug { } $newname = biosdevname($ifname); - print {$log} "biosdevname for $ifname returned '$newname'\n"; + logit($log, "biosdevname for $ifname returned '$newname'\n"); unless (is_available($interfaces, $newname)) { $newname = find_available($interfaces, $newname); } - print {$log} "new name for '$ifname' is '$newname'\n", $ifname, $newname; + logit($log, "new name for '$ifname' is '$newname'\n"); close $log; leave_rescan_hint($newname, $hwaddr); 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: <pethN>; 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(@)" 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>; 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 |