All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit dec93290 authored by Leigh B Stoller's avatar Leigh B Stoller

Reset autoswap timeout to default at swapout time, for mere users.

parent 0693b078
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
# Copyright (c) 2000-2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -1371,6 +1371,18 @@ elsif ($inout eq "modify") {
fatal("PostSwap failed!");
}
#
# Reset autoswap to default. Might be inconvenient, but its interfering with
# reservations.
#
if ($inout eq "out" && !$isadmin && $pid eq TBOPSPID()) {
my $autoswapmode = TBGetSiteVar("general/autoswap_mode") ? 1 : 0;
my $autoswaptime = 60 * TBGetSiteVar("general/autoswap_threshold");
$experiment->SetAutoswap($autoswapmode);
$experiment->SetAutoswapTimeout($autoswaptime);
}
# Accounting info. For swapout, must be after its done with.
$experiment->SetSwapInfo($this_user);
......
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