Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
3101a6ae
Commit
3101a6ae
authored
Nov 09, 2005
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add checks for new osfeature "linktest" that must be present on all
osids for linktest to run. Override with -f option.
parent
44c6ba32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
event/linktest/linktest_control.in
event/linktest/linktest_control.in
+35
-2
No files found.
event/linktest/linktest_control.in
View file @
3101a6ae
...
...
@@ -27,10 +27,12 @@ sub usage()
"
-d - Turn on debugging output.
\n
");
exit
(
-
1
);
}
my
$optlist
=
"
dkl:o:t:m
";
my
$debug
=
0
;
my
$optlist
=
"
dkl:o:t:m
f
";
my
$debug
=
2
;
my
$cancel
=
0
;
my
$sendmail
=
0
;
my
$hosed
=
0
;
my
$forcerun
=
0
;
my
$timeout
;
my
$level
;
my
$output
;
...
...
@@ -84,6 +86,9 @@ if (defined($options{"d"})) {
if
(
defined
(
$options
{"
m
"}))
{
$sendmail
=
1
;
}
if
(
defined
(
$options
{"
f
"}))
{
$forcerun
=
1
;
}
if
(
defined
(
$options
{"
k
"}))
{
$cancel
=
1
;
}
...
...
@@ -232,6 +237,34 @@ elsif ($cancel) {
"
Linktest is not running on experiment
$pid
/
$eid
!
\n
")
}
#
# Okay, this is hacky. Before trying, lets make sure that all the nodes
# in the experiment are able to run linktest. This is defined by the
# "linktest" feature in the osfeatures list of the OSID, for each node.
#
$query_result
=
DBQueryFatal
("
select v.vname,o.osname,FIND_IN_SET('linktest',osfeatures)
"
.
"
from virt_nodes as v
"
.
"
left join reserved as r on r.pid=v.pid and
"
.
"
r.eid=v.eid and r.vname=v.vname
"
.
"
left join nodes as n on n.phys_nodeid=r.node_id
"
.
"
left join os_info as o on o.osid=n.def_boot_osid
"
.
"
where v.pid='
$pid
' and v.eid='
$eid
'
");
while
(
my
(
$vname
,
$osname
,
$gotlinktest
)
=
$query_result
->
fetchrow_array
())
{
if
(
!
$gotlinktest
)
{
print
STDERR
"
*** Node
$vname
is running an OSID (
$osname
) that does not
"
.
"
support linktest!
\n
";
$hosed
++
;
}
}
if
(
$hosed
&&
!
$forcerun
)
{
die
("
*** $0:
\n
"
.
"
Aborting linktest since not all nodes support it!
\n
");
}
#
# Okay, lets run linktest. First set up a handler so that we can catch
# a termination signal and kill ourselves off.
...
...
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