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
70574e71
Commit
70574e71
authored
Apr 01, 2010
by
Leigh B Stoller
Browse files
Add a "www" CNAME for inner boss nodes.
parent
f87e07a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/named_setup.in
View file @
70574e71
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
9
University of Utah and the Flux Group.
# Copyright (c) 2000-20
1
0 University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
...
...
@@ -132,10 +132,10 @@ process_nodes($db_result);
# Get the list of currently-reserved nodes so that we can make CNAMEs for them
#
$db_result
=
DBQueryFatal
("
select node_id,pid,eid,vname from reserved
");
DBQueryFatal
("
select node_id,pid,eid,vname
,inner_elab_role
from reserved
");
my
%cnames
;
while
(
my
(
$node_id
,
$pid
,
$eid
,
$vname
)
=
$db_result
->
fetchrow_array
())
{
while
(
my
(
$node_id
,
$pid
,
$eid
,
$vname
,
$erole
)
=
$db_result
->
fetchrow_array
())
{
#
# Handle some rare cases where a node can get reserved without a vname -
...
...
@@ -144,8 +144,15 @@ while (my ($node_id,$pid,$eid,$vname) = $db_result->fetchrow_array()) {
if
(
!
defined
(
$vname
))
{
$vname
=
$node_id
;
}
push
@
{
$cnames
{
$node_id
}},
"
$vname
.
$eid
.
$pid
";
#
# Special case for inner elab boss; add CNAME for www.
#
if
(
defined
(
$erole
)
&&
(
$erole
eq
"
boss
"
||
$erole
eq
"
boss+router
"))
{
push
@
{
$cnames
{
$node_id
}},
"
www.
$eid
.
$pid
";
}
}
...
...
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