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
16e6a11a
Commit
16e6a11a
authored
Jun 05, 2009
by
Leigh B. Stoller
Browse files
Add locking of tickets when expiring them.
parent
bbb9982d
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/scripts/expire_daemon.in
View file @
16e6a11a
...
...
@@ -112,13 +112,8 @@ sub ExpireTickets()
# Ticket is gone, lets not worry.
next
;
}
my
$slice
=
GeniSlice
->
Lookup
(
$ticket
->
slice_uuid
());
if
(
!
defined
(
$slice
))
{
print
STDERR
"
No slice for
$ticket
\n
";
goto
skip
;
}
if
(
$slice
->
Lock
()
!=
0
)
{
print
STDERR
"
Could not lock slice
$slice
.
\n
";
if
(
$ticket
->
Lock
()
!=
0
)
{
print
STDERR
"
Could not lock ticket
$ticket
\n
";
goto
skip
;
}
print
"
Expiring ticket
$ticket
\n
";
...
...
@@ -127,14 +122,12 @@ sub ExpireTickets()
print
STDERR
"
Could not delete
$ticket
\n
";
SENDMAIL
(
$TBOPS
,
"
Could not delete ticket
$idx
",
"
Could not delete ticket
$ticket
");
# We leave it locked.
}
else
{
print
STDERR
"
$ticket
has been deleted
\n
";
}
$slice
->
UnLock
();
skip:
$slice
->
Flush
()
if
(
defined
(
$slice
));
$ticket
->
Flush
();
}
}
...
...
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