Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
ee9f9a2e
Commit
ee9f9a2e
authored
Nov 09, 2010
by
Leigh B Stoller
Browse files
Watch for an expired slice credential, and make up a new one.
parent
7e3a60ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniEmulab.pm.in
View file @
ee9f9a2e
...
...
@@ -62,8 +62,19 @@ sub RegisterExperiment($$)
my
($
experiment
,
$
user
)
=
@
_
;
my
$
slice
=
GeniSlice
->
LookupByExperiment
($
experiment
);
return
0
if
(
defined
($
slice
));
#
#
If
we
have
a
slice
for
it
,
check
to
see
if
its
expired
.
We
just
#
go
ahead
and
renew
it
.
#
if
(
defined
($
slice
))
{
if
($
slice
->
IsExpired
()
&&
$
slice
->
SetExpiration
(
time
()
+
(
24
*
3600
*
30
)))
{
print
STDERR
"Could not reset slice expiration
\n
"
;
return
-
1
;
}
return
0
;
}
#
#
Load
the
SA
cert
to
act
as
caller
context
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment