Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
111
Issues
111
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
bae2afc2
Commit
bae2afc2
authored
Dec 23, 2002
by
Leigh Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix serious bit rot. Remove netdisk/frisbee option stuff.
parent
738099b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
29 deletions
+8
-29
tbsetup/sched_reload.in
tbsetup/sched_reload.in
+8
-29
No files found.
tbsetup/sched_reload.in
View file @
bae2afc2
...
...
@@ -17,19 +17,17 @@ use Getopt::Std;
#
sub
usage
()
{
print
STDOUT
"
Usage: sched_reload [-f | -
p] [-r | -
n] [-m <imageid>]
"
.
print
STDOUT
"
Usage: sched_reload [-f | -n] [-m <imageid>]
"
.
"
[[-p <pid>] -i <imagename>] <node> [node ...]
\n
"
.
"
sched_reload <options> -e pid,eid
\n
"
.
"
Use -i to specify an image name. Use node default otherwise.
\n
"
.
"
Use -m to specify an image ID (internal name, TB admins only!).
\n
"
.
"
Use -f to force reload. Fail if node cannot be reserved.
\n
"
.
"
Use -p to pend reload for the reload daemon.
\n
"
.
"
Use -e to schedule a reload for all nodes in an experiment.
\n
"
.
"
Use -r to use Frisbee for reloading disks.
\n
"
.
"
Use -n to use netdisk for reloading disks.
\n
";
"
Use -n to pend reload for the reload daemon.
\n
"
.
"
Use -e to schedule a reload for all nodes in an experiment.
\n
";
exit
(
-
1
);
}
my
$optlist
=
"
f
prn
i:e:m:
";
my
$optlist
=
"
f
np:
i:e:m:
";
#
# Configure variables
...
...
@@ -56,8 +54,8 @@ my $error = 0;
my
$debug
=
0
;
my
$force
=
0
;
my
$pend
=
0
;
my
$type
=
TB_DEFAULT_RELOADTYPE
;
my
@nodes
=
();
my
$type
=
TB_DEFAULT_RELOADTYPE
;
my
$usedefault
=
1
;
my
$imagename
;
my
$imageid
;
...
...
@@ -83,19 +81,10 @@ if (! getopts($optlist, \%options)) {
usage
();
}
if
(
defined
(
$options
{"
f
"}))
{
$force
=
$options
{"
f
"};
}
if
(
defined
(
$options
{"
p
"}))
{
$pend
=
$options
{"
p
"};
}
if
(
defined
(
$options
{"
r
"}))
{
if
(
defined
(
$options
{"
n
"}))
{
die
"
Only one of -r or -n should be given
\n
";
}
$type
=
TB_RELOADTYPE_FRISBEE
;
$force
=
1
;
}
if
(
defined
(
$options
{"
n
"}))
{
$type
=
TB_RELOADTYPE_NETDISK
;
$pend
=
1
;
}
if
(
$pend
and
$force
)
{
usage
();
...
...
@@ -157,16 +146,6 @@ else {
}
}
#
# Depending on the reload type, we pass different flags to os_load
#
my
$osload_flags
=
"";
if
(
$type
eq
TB_RELOADTYPE_NETDISK
)
{
$osload_flags
.=
'
-n
';
}
elsif
(
$type
eq
TB_RELOADTYPE_FRISBEE
)
{
$osload_flags
.=
'
-r
';
}
if
(
$eidmode
)
{
if
(
!
(
@nodes
=
ExpNodes
(
$pid
,
$eid
)))
{
die
("
*** $0:
\n
"
.
...
...
@@ -323,7 +302,7 @@ if ($pend) {
foreach
my
$id
(
keys
(
%
imagenodes
)
)
{
my
@nodelist
=
@
{
$imagenodes
{
$imageid
}
};
my
$cmd
=
"
$osload
$osload_flags
-i
$id
@nodelist
";
my
$cmd
=
"
$osload
-m
$id
@nodelist
";
print
"
Issuing
$cmd
\n
";
if
(
system
(
$cmd
))
{
...
...
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