Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
0199f565
Commit
0199f565
authored
Aug 29, 2018
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some tweaks to DeleteSlice() and cancelation while still setting up,
hopefully fixes the race.
parent
b6f5a1c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
protogeni/lib/GeniAggregate.pm.in
protogeni/lib/GeniAggregate.pm.in
+4
-0
protogeni/lib/GeniCMV2.pm.in
protogeni/lib/GeniCMV2.pm.in
+8
-3
No files found.
protogeni/lib/GeniAggregate.pm.in
View file @
0199f565
...
...
@@ -1579,6 +1579,8 @@ sub ActionStart($$;$)
$self->ComputeState();
$experiment->SetState($expstate);
$slice->ClearMonitorPid();
# in case we were canceled by DeleteSlice()
$experiment->SetCancelFlag(0);
return 0;
bad:
...
...
@@ -1599,6 +1601,8 @@ sub ActionStart($$;$)
}
$experiment->SetState($expstate);
$slice->ClearMonitorPid();
# in case we were canceled by DeleteSlice()
$experiment->SetCancelFlag(0);
return -1;
}
...
...
protogeni/lib/GeniCMV2.pm.in
View file @
0199f565
...
...
@@ -904,6 +904,7 @@ sub DeleteSlice($)
if
($
slice
->
Lock
()
!= 0) {
return
GeniResponse
->
BusyResponse
();
}
my
$
slice_experiment
=
$
slice
->
GetExperiment
();
#
#
If
a
monitor
process
is
running
,
then
the
slice
is
busy
.
...
...
@@ -928,7 +929,6 @@ sub DeleteSlice($)
#
rebooting
timed
out
nodes
,
and
quit
earlier
.
The
caller
will
not
#
have
to
retry
as
long
.
#
my
$
slice_experiment
=
$
slice
->
GetExperiment
();
if
(
defined
($
slice_experiment
))
{
$
slice_experiment
->
SetCancelFlag
(
1
);
}
...
...
@@ -953,7 +953,8 @@ sub DeleteSlice($)
}
}
#
#
If
we
were
canceled
,
we
wait
for
the
monitor
to
stop
,
instead
of
#
If
we
were
canceled
,
we
wait
for
the
monitor
to
stop
before
#
we
can
kill
it
.
#
if
($
canceled
)
{
while
($
slice
->
GetMonitorPid
())
{
...
...
@@ -961,7 +962,11 @@ sub DeleteSlice($)
GeniCM
::
CheckMonitor
($
slice
);
print
STDERR
"Checking to see if monitor has stopped ...
\n
"
;
}
#
#
The
monitor
has
stopped
and
we
have
the
lock
.
Clear
the
#
cancel
flag
so
we
can
actually
terminate
(
checked
in
endexp
).
#
$
slice_experiment
->
SetCancelFlag
(
1
);
}
my
$
retval
=
GeniCM
::
CleanupDeadSlice
($
slice
,
1
);
if
($
retval
)
{
...
...
Write
Preview
Markdown
is supported
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