Skip to content
GitLab
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
661207b8
Commit
661207b8
authored
Jun 11, 2009
by
Leigh B. Stoller
Browse files
Minor changes for use on linux machines doing containers; call
mkvnode instead of mkjail.
parent
f352df82
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/common/vnodesetup
View file @
661207b8
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
8
University of Utah and the Flux Group.
# Copyright (c) 2000-200
9
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -102,6 +102,11 @@ if ($UID) {
}
}
# We need to know this below.
my
$sysname
=
`
uname -s
`;
chomp
(
$sysname
);
my
$islinux
=
(
$sysname
eq
"
Linux
");
#
# Parse command arguments. Once we return from getopts, all that should be
# left are the required arguments.
...
...
@@ -197,7 +202,10 @@ if ( $doplab && !($killit || $haltit) && -e "/vsys/enter_admin.in" ) {
libsetup_setvnodeid
(
$vnodeid
);
# Tell tmcc library too, although thats already been done with previous call.
configtmcc
("
subnode
",
$vnodeid
);
if
(
SHAREDHOST
())
{
# Nodes come and go ...
configtmcc
("
nocache
",
1
);
}
# Pass this along for tmcc clients.
$ENV
{'
TMCCVNODEID
'}
=
$vnodeid
;
...
...
@@ -377,6 +385,9 @@ if ($doplab) {
$GID
=
0
;
(
$pid
,
$eid
,
$vname
)
=
vnodeplabsetup
(
$vnodeid
);
}
elsif
(
$islinux
)
{
(
$pid
,
$eid
,
$vname
)
=
genvnodesetup
(
$vnodeid
);
}
else
{
(
$pid
,
$eid
,
$vname
)
=
vnodejailsetup
(
$vnodeid
);
}
...
...
@@ -430,17 +441,25 @@ if ($dojail) {
}
else
{
my
$options
=
"";
my
$
jailhostname
=
"
$vname
.
$eid
.
$pid
.
$DOMAINNAME
"
;
if
(
$i
nteractive
)
{
$
options
.=
"
-s
";
my
$
mkv
;
if
(
$i
slinux
)
{
$
mkv
=
"
mkvnode.pl
";
}
if
(
$usevcnetroutes
)
{
$options
.=
"
-V
";
else
{
$mkv
=
"
mkjail.pl
";
if
(
$interactive
)
{
$options
.=
"
-s
";
}
if
(
$usevcnetroutes
)
{
$options
.=
"
-V
";
}
$options
.=
"
-p
$pid
-h
$vname
.
$eid
.
$pid
.
$DOMAINNAME
";
}
TBDebugTimeStamp
("
vnodesetup calling mk
jail.pl
");
TBDebugTimeStamp
("
vnodesetup calling
$
mk
v
");
exec
("
mk
jail.pl
$options
-p
$pid
-h
$jailhostname
$vnodeid
");
exec
("
$
mk
v
$options
$vnodeid
");
die
("
*** $0:
\n
"
.
"
Could not start the jail!
\n
");
}
...
...
@@ -839,6 +858,9 @@ sub hackwaitandexit()
elsif
(
$fakevnode
)
{
$goofy
=
CONFDIR
()
.
"
/evproxy.pid
";
}
elsif
(
$dojail
&&
-
e
"
/vz
")
{
$goofy
=
CONFDIR
()
.
"
/running
";
}
else
{
$goofy
=
CONFDIR
()
.
"
/root/var/run/emulab-watchdog.pid
";
}
...
...
@@ -853,6 +875,5 @@ sub hackwaitandexit()
if
(
$mtime
>=
$now
||
$ctime
>=
$now
);
}
}
exit
(
1
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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