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-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
ecd89038
Commit
ecd89038
authored
Dec 14, 2010
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel
parents
76a97f6c
5fc7c476
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
29 deletions
+105
-29
defs-default
defs-default
+1
-1
install/ports/update-ports
install/ports/update-ports
+3
-3
os/frisbee.redux/TODO
os/frisbee.redux/TODO
+4
-0
tbsetup/os_setup.in
tbsetup/os_setup.in
+15
-8
tbsetup/reload_daemon.in
tbsetup/reload_daemon.in
+72
-15
tmcd/common/config/rc.mkelab
tmcd/common/config/rc.mkelab
+10
-2
No files found.
defs-default
View file @
ecd89038
...
@@ -39,7 +39,7 @@ THISHOMEBASE=Emulab.Net
...
@@ -39,7 +39,7 @@ THISHOMEBASE=Emulab.Net
MIN_UNIX_UID=10000
MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
MIN_UNIX_GID=6000
WINSUPPORT=1
WINSUPPORT=1
ELVIN_COMPAT=
1
ELVIN_COMPAT=
0
NSVERIFY=1
NSVERIFY=1
# Set to one to disable exporting NFS filesystems to nodes
# Set to one to disable exporting NFS filesystems to nodes
...
...
install/ports/update-ports
View file @
ecd89038
#!/bin/sh
#!/bin/sh
#
#
# Fiecely bogus script to attempt to upgrade ports on an existing Emulab server
# Fie
r
cely bogus script to attempt to upgrade ports on an existing Emulab server
#
#
#
DO=echo
DO
=
echo
DO
=
#
DO=
if
[
-z
"
$1
"
]
;
then
if
[
-z
"
$1
"
]
;
then
echo
'*** Usage: update-ports [boss|ops]'
echo
'*** Usage: update-ports [boss|ops]'
...
...
os/frisbee.redux/TODO
View file @
ecd89038
...
@@ -178,6 +178,10 @@ ENHANCEMENTS:
...
@@ -178,6 +178,10 @@ ENHANCEMENTS:
Minor changes would be needed to PacketSend/Recv to track the client
Minor changes would be needed to PacketSend/Recv to track the client
IP/port rather than just assuming/using the global mcastaddr/portnum.
IP/port rather than just assuming/using the global mcastaddr/portnum.
One nice side-effect of this is that the client would no longer have
to bind to a specific port in the unicast case, since each reply from
the server could be tagged with the proper destination port.
9. Allow the frisbee client to be used in a pipe.
9. Allow the frisbee client to be used in a pipe.
If we could pipe the output of frisbee into another utility, this would
If we could pipe the output of frisbee into another utility, this would
...
...
tbsetup/os_setup.in
View file @
ecd89038
...
@@ -506,16 +506,23 @@ while (my %row = $db_result->fetchhash()) {
...
@@ -506,16 +506,23 @@ while (my %row = $db_result->fetchhash()) {
}
}
#
#
# XXX Inner elab nodes should never report in to us.
# XXX Inner elab fu.
# If they do, make sure they wind up in PXEWAIT.
# 1. If nodes try to report in to us, make sure they wind up in PXEWAIT
# (ClearOsids)
# 2. Make sure nodes appear successfully allocated
# (SetBootStatus, SetAllocState)
# Note that they will appear to be in PXEWAIT via the web interface.
# Maybe we should
#
#
if
(
keys
(
%einenodes
))
{
if
(
keys
(
%einenodes
))
{
DBQueryFatal
("
update nodes set
"
.
foreach
my
$node
(
keys
%einenodes
)
{
"
def_boot_osid=NULL,
"
.
my
$nodeobj
=
$nodeobjs
{
$node
};
"
next_boot_osid=NULL,
"
.
if
(
$nodeobj
)
{
"
temp_boot_osid=NULL
"
.
$nodeobj
->
ClearOsids
();
"
where node_id in (
"
.
$nodeobj
->
SetBootStatus
(
NODEBOOTSTATUS_OKAY
);
join
("
,
",
map
("
'
$_
'
",
keys
%einenodes
))
.
"
)
");
$nodeobj
->
SetAllocState
(
TBDB_ALLOCSTATE_RES_READY
());
}
}
}
}
@all_nodes
=
(
keys
%nodes
,
keys
%vnodes
);
@all_nodes
=
(
keys
%nodes
,
keys
%vnodes
);
...
...
tbsetup/reload_daemon.in
View file @
ecd89038
...
@@ -28,11 +28,17 @@ if ($UID != 0) {
...
@@ -28,11 +28,17 @@ if ($UID != 0) {
#
#
sub
usage
()
sub
usage
()
{
{
print
STDOUT
"
Usage: reload_daemon [-d]
\n
"
.
print
STDOUT
"
Usage: reload_daemon [-d] [-t tag]
\n
"
.
"
Use the -d option to prevent daemonization
\n
";
"
-d Prevent daemonization
\n
"
.
"
-t tag Only manage reloads for nodes or node types
\n
"
.
"
that have the value of <tag> for a node_type_attribute
\n
"
.
"
or a node_attribute named 'reload_daemon_tag'.
\n
"
.
"
IF this tag is not set, the reload_daemon picks only
\n
"
.
"
those nodes that DO NOT have this type or node
\n
"
.
"
attribute set!
\n
";
exit
(
-
1
);
exit
(
-
1
);
}
}
my
$optlist
=
"
d
";
my
$optlist
=
"
d
t:
";
#
#
# Configure variables
# Configure variables
...
@@ -72,6 +78,7 @@ my $reboot = "$TB/bin/node_reboot";
...
@@ -72,6 +78,7 @@ my $reboot = "$TB/bin/node_reboot";
my
$tbrsync
=
"
$TB
/bin/tbrsync
";
my
$tbrsync
=
"
$TB
/bin/tbrsync
";
my
$logfile
=
"
$TB
/log/reloadlog
";
my
$logfile
=
"
$TB
/log/reloadlog
";
my
$debug
=
0
;
my
$debug
=
0
;
my
$tag
;
my
$retry_time
=
20
;
# in minutes
my
$retry_time
=
20
;
# in minutes
my
$warn_time
=
$retry_time
*
2
;
# in minutes
my
$warn_time
=
$retry_time
*
2
;
# in minutes
my
$widearea_multiplier
=
2
;
# widearea nodes get (mult+1)x longer, but
my
$widearea_multiplier
=
2
;
# widearea nodes get (mult+1)x longer, but
...
@@ -110,11 +117,17 @@ if (@ARGV != 0) {
...
@@ -110,11 +117,17 @@ if (@ARGV != 0) {
if
(
defined
(
$options
{"
d
"}))
{
if
(
defined
(
$options
{"
d
"}))
{
$debug
=
$options
{"
d
"};
$debug
=
$options
{"
d
"};
}
}
if
(
defined
(
$options
{"
t
"}))
{
$tag
=
$options
{"
t
"};
# rename the logfile too
$logfile
=
"
$logfile
-
$tag
";
}
#
#
# Only one please.
# Only one please (for the default reload_daemon). If you specified
# a tag, it's your problem.
#
#
if
(
CheckDaemonRunning
("
reload_daemon
"))
{
if
(
!
defined
(
$tag
)
&&
CheckDaemonRunning
("
reload_daemon
"))
{
fatal
("
Not starting another reload daemon!
");
fatal
("
Not starting another reload daemon!
");
}
}
...
@@ -124,7 +137,7 @@ if (! $debug) {
...
@@ -124,7 +137,7 @@ if (! $debug) {
exit
(
0
);
exit
(
0
);
}
}
}
}
if
(
MarkDaemonRunning
("
reload_daemon
"))
{
if
(
!
defined
(
$tag
)
&&
MarkDaemonRunning
("
reload_daemon
"))
{
fatal
("
Could not mark daemon as running!
");
fatal
("
Could not mark daemon as running!
");
}
}
#
#
...
@@ -158,6 +171,29 @@ while (1) {
...
@@ -158,6 +171,29 @@ while (1) {
#
#
my
$time
=
time
();
my
$time
=
time
();
#
# If we are the default reload daemon (i.e., have no tag for our
# reload_pool), only look for nodes that have neither a reload_pool
# node_type_attribute nor a node_attribute.
#
# If we have a reload_pool tag, only pick up nodes that
# * have our tag for the node_type_attribute, and our tag or NULL
# for the node_attribute, OR
# * have our tag for the node attribute.
#
my
$tag_query
=
'';
if
(
!
defined
(
$tag
))
{
$tag_query
=
'
and nta_reload_pool.attrvalue is NULL
'
.
'
and na_reload_pool.attrvalue is NULL
';
}
else
{
$tag_query
=
""
.
"
and ((nta_reload_pool.attrvalue='
$tag
' and
"
.
"
(na_reload_pool.attrvalue='
$tag
'
"
.
"
or na_reload_pool.attrvalue is NULL))
"
.
"
or na_reload_pool.attrvalue='
$tag
')
";
}
#
#
# First, look for nodes that have been in the reloading experiment for
# First, look for nodes that have been in the reloading experiment for
# longer than $retry_time, and try rebooting them
# longer than $retry_time, and try rebooting them
...
@@ -170,9 +206,16 @@ while (1) {
...
@@ -170,9 +206,16 @@ while (1) {
DBQueryWarn
("
select r.node_id,r.mustwipe from reserved as r
"
.
DBQueryWarn
("
select r.node_id,r.mustwipe from reserved as r
"
.
"
left join nodes as n on r.node_id=n.node_id
"
.
"
left join nodes as n on r.node_id=n.node_id
"
.
"
left join node_types as nt on n.type=nt.type
"
.
"
left join node_types as nt on n.type=nt.type
"
.
"
where r.pid='
$RELOADPID
' and r.eid='
$RELOADEID
' and
"
.
"
left outer join (select type,attrvalue from node_type_attributes
"
.
"
(CURRENT_TIMESTAMP - INTERVAL (
$retry_time
* (r.mustwipe + 1) + (nt.isremotenode *
$retry_time
*
$widearea_multiplier
)) MINUTE)
"
.
"
where attrkey='reload_daemon_pool') as nta_reload_pool
"
.
"
> rsrv_time
");
"
on n.type=nta_reload_pool.type
"
.
"
left outer join (select node_id,attrvalue from node_attributes
"
.
"
where attrkey='reload_daemon_pool') as na_reload_pool
"
.
"
on r.node_id=na_reload_pool.node_id
"
.
"
where r.pid='
$RELOADPID
' and r.eid='
$RELOADEID
' and
"
.
"
(CURRENT_TIMESTAMP - INTERVAL (
$retry_time
* (r.mustwipe + 1) + (nt.isremotenode *
$retry_time
*
$widearea_multiplier
)) MINUTE)
"
.
"
> rsrv_time
"
.
"
$tag_query
");
if
(
!
$query_result
)
{
if
(
!
$query_result
)
{
print
"
DB Error. Waiting a bit.
\n
";
print
"
DB Error. Waiting a bit.
\n
";
...
@@ -230,9 +273,16 @@ while (1) {
...
@@ -230,9 +273,16 @@ while (1) {
DBQueryWarn
("
select r.node_id,r.mustwipe from reserved as r
"
.
DBQueryWarn
("
select r.node_id,r.mustwipe from reserved as r
"
.
"
left join nodes as n on r.node_id=n.node_id
"
.
"
left join nodes as n on r.node_id=n.node_id
"
.
"
left join node_types as nt on n.type=nt.type
"
.
"
left join node_types as nt on n.type=nt.type
"
.
"
where r.pid='
$RELOADPID
' and r.eid='
$RELOADEID
' and
"
.
"
left outer join (select type,attrvalue from node_type_attributes
"
.
"
(CURRENT_TIMESTAMP - INTERVAL (
$warn_time
* (mustwipe + 1) + (nt.isremotenode *
$warn_time
*
$widearea_multiplier
)) MINUTE)
"
.
"
where attrkey='reload_daemon_pool') as nta_reload_pool
"
.
"
> rsrv_time
");
"
on n.type=nta_reload_pool.type
"
.
"
left outer join (select node_id,attrvalue from node_attributes
"
.
"
where attrkey='reload_daemon_pool') as na_reload_pool
"
.
"
on r.node_id=na_reload_pool.node_id
"
.
"
where r.pid='
$RELOADPID
' and r.eid='
$RELOADEID
' and
"
.
"
(CURRENT_TIMESTAMP - INTERVAL (
$warn_time
* (mustwipe + 1) + (nt.isremotenode *
$warn_time
*
$widearea_multiplier
)) MINUTE)
"
.
"
> rsrv_time
"
.
"
$tag_query
");
if
(
!
$query_result
)
{
if
(
!
$query_result
)
{
print
"
DB Error. Waiting a bit.
\n
";
print
"
DB Error. Waiting a bit.
\n
";
...
@@ -273,9 +323,16 @@ while (1) {
...
@@ -273,9 +323,16 @@ while (1) {
"
from reserved as b
"
.
"
from reserved as b
"
.
"
left join nodes as a on a.node_id=b.node_id
"
.
"
left join nodes as a on a.node_id=b.node_id
"
.
"
left join last_reservation as l on l.node_id=a.node_id
"
.
"
left join last_reservation as l on l.node_id=a.node_id
"
.
"
left join node_types as n on n.type=a.type where
"
.
"
left join node_types as n on n.type=a.type
"
.
"
(b.node_id is null and
$CLASSCLAUSE
and l.pid!='')
"
.
"
left outer join (select type,attrvalue from node_type_attributes
"
.
"
or (b.pid='
$RELOADPID
' and b.eid='
$PENDINGEID
')
"
.
"
where attrkey='reload_daemon_pool') as nta_reload_pool
"
.
"
on n.type=nta_reload_pool.type
"
.
"
left outer join (select node_id,attrvalue from node_attributes
"
.
"
where attrkey='reload_daemon_pool') as na_reload_pool
"
.
"
on b.node_id=na_reload_pool.node_id
"
.
"
where ((b.node_id is null and
$CLASSCLAUSE
and l.pid!='')
"
.
"
or (b.pid='
$RELOADPID
' and b.eid='
$PENDINGEID
'))
"
.
"
$tag_query
"
.
"
order by a.node_id
");
"
order by a.node_id
");
if
(
!
$query_result
)
{
if
(
!
$query_result
)
{
...
...
tmcd/common/config/rc.mkelab
View file @
ecd89038
...
@@ -783,7 +783,11 @@ sub SetupFsNode()
...
@@ -783,7 +783,11 @@ sub SetupFsNode()
print
RC
"
ntpdate_enable=
\"
YES
\"\n
";
print
RC
"
ntpdate_enable=
\"
YES
\"\n
";
print
RC
"
ntpdate_flags=
\"
boss
\"\n
";
print
RC
"
ntpdate_flags=
\"
boss
\"\n
";
if
(
$FBSD_VERSION
>=
5
)
{
print
RC
"
ntpd_enable=
\"
YES
\"\n
";
}
else
{
print
RC
"
xntpd_enable=
\"
YES
\"\n
";
print
RC
"
xntpd_enable=
\"
YES
\"\n
";
}
print
RC
"
linux_enable=
\"
YES
\"\n
";
print
RC
"
linux_enable=
\"
YES
\"\n
";
print
RC
"
rpcbind_enable=
\"
YES
\"\n
";
print
RC
"
rpcbind_enable=
\"
YES
\"\n
";
...
@@ -1196,7 +1200,11 @@ sub SetupOpsNode($)
...
@@ -1196,7 +1200,11 @@ sub SetupOpsNode($)
print
RC
"
ntpdate_enable=
\"
YES
\"\n
";
print
RC
"
ntpdate_enable=
\"
YES
\"\n
";
print
RC
"
ntpdate_flags=
\"
boss
\"\n
";
print
RC
"
ntpdate_flags=
\"
boss
\"\n
";
if
(
$FBSD_VERSION
>=
5
)
{
print
RC
"
ntpd_enable=
\"
YES
\"\n
";
}
else
{
print
RC
"
xntpd_enable=
\"
YES
\"\n
";
print
RC
"
xntpd_enable=
\"
YES
\"\n
";
}
print
RC
"
linux_enable=
\"
YES
\"\n
";
print
RC
"
linux_enable=
\"
YES
\"\n
";
print
RC
"
accounting_enable=
\"
YES
\"\n
";
print
RC
"
accounting_enable=
\"
YES
\"\n
";
...
...
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