Commit 2a7ae856 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor bug fix for new boss role (boss+fs+router).

parent 9dc6de0d
...@@ -144,6 +144,7 @@ my $query_result = ...@@ -144,6 +144,7 @@ my $query_result =
" r.node_id=i.node_id ". " r.node_id=i.node_id ".
"where (r.inner_elab_role='boss' or ". "where (r.inner_elab_role='boss' or ".
" r.inner_elab_role='boss+router' or ". " r.inner_elab_role='boss+router' or ".
" r.inner_elab_role='boss+fs+router' or ".
" r.plab_role='plc') and ". " r.plab_role='plc') and ".
" i.role='$CRTLTAG' "); " i.role='$CRTLTAG' ");
if (! $query_result) { if (! $query_result) {
......
...@@ -6094,9 +6094,7 @@ sub InitializePhysNode($$$) ...@@ -6094,9 +6094,7 @@ sub InitializePhysNode($$$)
elsif ($pnode->_needslinkdelay()) { elsif ($pnode->_needslinkdelay()) {
$cmdline = $self->osidbootcmd($osid, "linkdelay", ""); $cmdline = $self->osidbootcmd($osid, "linkdelay", "");
} }
elsif (defined($inner_elab_role) && elsif (defined($inner_elab_role) && $inner_elab_role =~ /boss/) {
($inner_elab_role eq "boss" ||
$inner_elab_role eq "boss+router")) {
$cmdline = $self->osidbootcmd($osid, "linkdelay", ""); $cmdline = $self->osidbootcmd($osid, "linkdelay", "");
} }
if (!defined($cmdline)) { if (!defined($cmdline)) {
......
...@@ -6318,9 +6318,7 @@ sub InitializePhysNode($$$) ...@@ -6318,9 +6318,7 @@ sub InitializePhysNode($$$)
$role = TBDB_RSRVROLE_DELAYNODE(); $role = TBDB_RSRVROLE_DELAYNODE();
$routertype = TBDB_ROUTERTYPE_NONE; $routertype = TBDB_ROUTERTYPE_NONE;
} }
elsif (defined($inner_elab_role) && elsif (defined($inner_elab_role) && $inner_elab_role =~ /boss/) {
($inner_elab_role eq "boss" ||
$inner_elab_role eq "boss+router")) {
$cmdline = $self->osidbootcmd($osid, "linkdelay", ""); $cmdline = $self->osidbootcmd($osid, "linkdelay", "");
} }
if (!defined($cmdline)) { if (!defined($cmdline)) {
......
...@@ -164,8 +164,7 @@ while (my ($node_id,$pid,$eid,$vname,$erole) = $db_result->fetchrow_array()) { ...@@ -164,8 +164,7 @@ while (my ($node_id,$pid,$eid,$vname,$erole) = $db_result->fetchrow_array()) {
# #
# Special case for inner elab boss; add CNAME for www. # Special case for inner elab boss; add CNAME for www.
# #
if (defined($erole) && if (defined($erole) && $erole =~ /boss/) {
($erole eq "boss" || $erole eq "boss+router")) {
push @{$cnames{$node_id}}, "www.$eid.$pid"; push @{$cnames{$node_id}}, "www.$eid.$pid";
} }
# #
......
...@@ -9393,6 +9393,7 @@ COMMAND_PROTOTYPE(dodhcpdconf) ...@@ -9393,6 +9393,7 @@ COMMAND_PROTOTYPE(dodhcpdconf)
"r.eid = '%s' and r.pid = '%s' and " "r.eid = '%s' and r.pid = '%s' and "
"(r.inner_elab_role = 'boss' or " "(r.inner_elab_role = 'boss' or "
"r.inner_elab_role = 'boss+router' or " "r.inner_elab_role = 'boss+router' or "
"r.inner_elab_role = 'boss+fs+router' or "
"r.plab_role='plc') and i.role='ctrl'", 1, "r.plab_role='plc') and i.role='ctrl'", 1,
row[5], row[6]); row[5], row[6]);
......
...@@ -4727,7 +4727,8 @@ class elabinelab: ...@@ -4727,7 +4727,8 @@ class elabinelab:
res[0][1] + "/" + res[0][2]); res[0][1] + "/" + res[0][2]);
# Must be the boss node that is making the request. # Must be the boss node that is making the request.
if (not (res[0][6] == "boss" or res[0][6] == "boss+router")): if (not (res[0][6] == "boss" or res[0][6] == "boss+router"
or res[0][6] == "boss+fs+router")):
return EmulabResponse(RESPONSE_FORBIDDEN, return EmulabResponse(RESPONSE_FORBIDDEN,
output="Must be boss node accessing " + output="Must be boss node accessing " +
"elabinelab method for " + "elabinelab method for " +
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment