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
cf948ae8
Commit
cf948ae8
authored
Jul 14, 2010
by
Leigh B Stoller
Browse files
Report on slices locked at the CM for more then 24 hours.
parent
63cb3cd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/scripts/expire_daemon.in
View file @
cf948ae8
...
...
@@ -309,6 +309,46 @@ sub RegisterSlices()
}
}
sub
ReportLockedSlices
()
{
my
$msg
=
"";
my
$query_result
=
GeniDB::
DBQueryWarn
("
select idx,locked from geni_slices
"
.
"
where locked is not null and
"
.
"
DATE_SUB(NOW(),INTERVAL 1 DAY) >= locked
");
if
(
!
$query_result
)
{
Fatal
("
ReportLockedSlices: Error getting info from the DB.
");
}
return
if
(
!
$query_result
->
numrows
);
while
(
my
(
$idx
,
$locked
)
=
$query_result
->
fetchrow_array
())
{
my
$slice
=
GeniSlice
->
Lookup
(
$idx
);
if
(
!
defined
(
$slice
))
{
# Slice is gone, lets not worry.
next
;
}
my
$urn
=
$slice
->
urn
();
$msg
.=
"
$urn
:
$locked
\n
";
print
STDERR
"
$urn
: locked since
$locked
\n
";
}
return
if
(
$msg
eq
"");
#
# Send a message to the testbed list.
#
SENDMAIL
(
$TBOPS
,
"
ProtoGENI expire daemon: Locked Slices
",
"
The following CM slices have been locked for a long time
\n\n
"
.
$msg
,
$TBOPS
);
}
while
(
1
)
{
next
if
(
NoLogins
());
...
...
@@ -320,6 +360,7 @@ while (1) {
ExpireSlices
();
ShutdownSlices
();
RegisterSlices
();
ReportLockedSlices
();
# Be certain stale info is gone.
Experiment
->
FlushAll
();
...
...
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