Commit 7ceb76d4 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix up minlinks accounting; mysql 5.7 exposed this overflow bug.

We never use this stuff, we should kill it.
parent ac17c983
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# Copyright (c) 2000-2017 University of Utah and the Flux Group. # Copyright (c) 2000-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -2602,6 +2602,8 @@ sub GatherAssignStats($$%) ...@@ -2602,6 +2602,8 @@ sub GatherAssignStats($$%)
foreach my $key (keys(%stats)) { foreach my $key (keys(%stats)) {
my $val = $stats{$key}; my $val = $stats{$key};
next
if (!defined($val));
push (@updates, "$key=$val"); push (@updates, "$key=$val");
} }
......
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# Copyright (c) 2005-2017 University of Utah and the Flux Group. # Copyright (c) 2005-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -1543,7 +1543,8 @@ sub LoadVirtNodes($) ...@@ -1543,7 +1543,8 @@ sub LoadVirtNodes($)
$self->exptstats()->{"maxlinks"} = $ipcount $self->exptstats()->{"maxlinks"} = $ipcount
if ($ipcount > $self->exptstats()->{"maxlinks"}); if ($ipcount > $self->exptstats()->{"maxlinks"});
$self->exptstats()->{"minlinks"} = $ipcount $self->exptstats()->{"minlinks"} = $ipcount
if ($ipcount < $self->exptstats()->{"minlinks"}); if (!defined($self->exptstats()->{"minlinks"}) ||
$ipcount < $self->exptstats()->{"minlinks"});
# Add to the list. # Add to the list.
$self->vnodes()->{$vname} = $vnode; $self->vnodes()->{$vname} = $vnode;
...@@ -4296,7 +4297,7 @@ sub CreateVtop($;$) ...@@ -4296,7 +4297,7 @@ sub CreateVtop($;$)
'wirelesslans' => 0, 'wirelesslans' => 0,
'shapedlinks' => 0, 'shapedlinks' => 0,
'shapedlans' => 0, 'shapedlans' => 0,
'minlinks' => 100000, 'minlinks' => undef,
# includes emulated links. Maybe thats wrong. # includes emulated links. Maybe thats wrong.
'maxlinks' => 0, 'maxlinks' => 0,
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment