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
a6b667d5
Commit
a6b667d5
authored
Mar 28, 2016
by
Kirk Webb
Browse files
Merge branch 'mobile'
parents
f70b6ee2
096abbb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
mobile/tbadb.in
View file @
a6b667d5
...
...
@@ -341,7 +341,8 @@ sub cmd_loadimage($@) {
#
# Tell stated that we've finished reloading the node if the node
# is in the RELOADUE opmode.
# is in the RELOADUE opmode. This will push it along in the
# reloading processes.
#
my
$opmode
;
if
(
TBGetNodeOpMode
(
$node_id
,
\
$opmode
)
&&
...
...
tbsetup/libosload.pm.in
View file @
a6b667d5
...
...
@@ -1277,13 +1277,28 @@ sub SetupReloadUE($)
my $nodeobject = $reload_info->{'
nodeobj
'};
my $node = $reload_info->{'
node
'};
my $image = (@{$reload_info->{'
images
'}})[0];
my $osid = $reload_info->{'
osid
'};
#
# Get some image details for tbadb
# Clear any pending reload entries.
#
$nodeobject->ClearCurrentReload();
#
# Get some image details for setting up the reload.
#
my $imgpid = $image->pid();
my $imgname = $image->imagename();
my $imageid = $image->imageid();
my $version = $image->version();
my $query_result =
DBQueryWarn("insert into current_reloads ".
"(node_id, idx, image_id, imageid_version,".
" mustwipe, prepare) values ".
"('
$
node
', 1, '
$
imageid
', '
$
version
',".
" 0, 0)");
return -1
if (!$query_result);
#
# Tell stated that we'
re
about
to
start
reloading
...
...
@@ -1291,14 +1306,14 @@ sub SetupReloadUE($)
TBSetNodeNextOpMode
($
node
,
TBDB_NODEOPMODE_RELOADUE
);
#
#
The
mot
e
goes
'down'
,
then
starts
to
reload
#
The
devic
e
goes
'down'
,
then
starts
to
reload
#
TBSetNodeEventState
($
node
,
TBDB_NODESTATE_SHUTDOWN
);
TBSetNodeEventState
($
node
,
TBDB_NODESTATE_RELOADING
);
#
#
Invoke
local
script
that
calls
the
remote
end
that
#
actually
does
the
work
.
#
actually
does
the
work
.
This
will
go
into
the
background
.
#
my
$
rv
=
system
(
"$TBADB -n $node loadimage $imgpid $imgname nowait"
);
if
($
rv
)
{
...
...
@@ -1306,17 +1321,6 @@ sub SetupReloadUE($)
return
-
1
;
}
#
#
Set
the
boot
OSID
.
Not
that
the
UEs
will
check
in
via
bootinfo
,
#
but
perhaps
something
else
will
care
that
this
is
correct
/
consistent
.
#
my
$
osinfo
=
OSinfo
->
Lookup
($
osid
);
if
(
!defined($osinfo) ||
$
nodeobject
->
OSSelect
($
osinfo
,
"next_boot_osid"
,
0
))
{
tberror
"os_select $osid failed!"
;
return
-
1
;
}
return
0
;
}
...
...
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