version 1.1330, 2016/11/15 20:46:35
|
version 1.1331, 2016/12/05 00:52:02
|
Line 1049 sub choose_server {
|
Line 1049 sub choose_server {
|
if ($login_host ne '') { |
if ($login_host ne '') { |
$hostname = &hostname($login_host); |
$hostname = &hostname($login_host); |
} |
} |
return ($login_host,$hostname,$portal_path,$isredirect); |
return ($login_host,$hostname,$portal_path,$isredirect,$lowest_load); |
} |
} |
|
|
# --------------------------------------------- Try to change a user's password |
# --------------------------------------------- Try to change a user's password |
Line 1321 sub get_lonbalancer_config {
|
Line 1321 sub get_lonbalancer_config {
|
} |
} |
|
|
sub check_loadbalancing { |
sub check_loadbalancing { |
my ($uname,$udom) = @_; |
my ($uname,$udom,$caller) = @_; |
my ($is_balancer,$currtargets,$currrules,$dom_in_use,$homeintdom, |
my ($is_balancer,$currtargets,$currrules,$dom_in_use,$homeintdom, |
$rule_in_effect,$offloadto,$otherserver); |
$rule_in_effect,$offloadto,$otherserver); |
my $lonhost = $perlvar{'lonHostID'}; |
my $lonhost = $perlvar{'lonHostID'}; |
Line 1472 sub check_loadbalancing {
|
Line 1472 sub check_loadbalancing {
|
} |
} |
} |
} |
} |
} |
if (($otherserver ne '') && (grep(/^\Q$otherserver\E$/,@hosts))) { |
unless ($caller eq 'login') { |
$is_balancer = 0; |
if (($otherserver ne '') && (grep(/^\Q$otherserver\E$/,@hosts))) { |
if ($uname ne '' && $udom ne '') { |
$is_balancer = 0; |
if (($env{'user.name'} eq $uname) && ($env{'user.domain'} eq $udom)) { |
if ($uname ne '' && $udom ne '') { |
|
if (($env{'user.name'} eq $uname) && ($env{'user.domain'} eq $udom)) { |
|
|
&appenv({'user.loadbalexempt' => $lonhost, |
&appenv({'user.loadbalexempt' => $lonhost, |
'user.loadbalcheck.time' => time}); |
'user.loadbalcheck.time' => time}); |
|
} |
} |
} |
} |
} |
} |
} |