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 81464554 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Bug fix; I was not setting the swapin_time in the resource record for

experiment "start" (initial creation with swapin). Been this way for a
few months, but the fix to the DB was easy:

	update experiment_resources as r
	left join testbed_stats as s on s.rsrcidx=r.idx
	 set swapin_time=UNIX_TIMESTAMP(tstamp)
        where action='start' and exitcode=0 and swapin_time=0;
parent a7a5409a
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005, 2006, 2007 University of Utah and the Flux Group.
# Copyright (c) 2005, 2006, 2007, 2008 University of Utah and the Flux Group.
# All rights reserved.
#
package Experiment;
......@@ -1833,7 +1833,7 @@ sub PreSwap($$$$)
# Update the timestamps in the current resource record to reflect
# the official start of the operation.
#
if ($which eq $EXPT_SWAPIN) {
if ($which eq $EXPT_SWAPIN || $which eq $EXPT_START) {
DBQueryWarn("update experiment_resources set ".
" swapin_time=UNIX_TIMESTAMP(now()) ".
"where idx='$rsrcidx'")
......@@ -1925,7 +1925,7 @@ sub SwapFail($$$$)
# creating a new resource record when doing a swapmod to an inactive
# experiment, but do not want to tackle that at this time
#
if (! $lastrsrc && $which eq $EXPT_SWAPIN) {
if (! $lastrsrc && ($which eq $EXPT_START || $which eq $EXPT_SWAPIN)) {
DBQueryWarn("update experiment_resources set swapin_time=0 ".
"where idx='$rsrcidx'")
or return -1;
......
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