Commit 789a5c17 authored by Mike Hibler's avatar Mike Hibler
Browse files

Fix the query that adds switches to the inner elab DB state.

Just use the non-per-experiment entries in switch_stacks rather than looking
for nodes involved in "trunks". The latter doesn't capture our layer1 switch.
parent c5df137f
...@@ -774,27 +774,26 @@ sub DumpDBGoo() ...@@ -774,27 +774,26 @@ sub DumpDBGoo()
if (defined($opsnode)); if (defined($opsnode));
if ($table eq "nodes") { if ($table eq "nodes") {
DBQueryFatal("update temp_${table} set ". DBQueryFatal("update temp_nodes set ".
" type='ops', ". " type='ops', ".
" phys_nodeid=node_id, ". " phys_nodeid=node_id, ".
" role='ctrlnode', ". " role='ctrlnode', ".
" op_mode='OPSNODEBSD' ". " op_mode='OPSNODEBSD' ".
"where node_id in ('fs','ops')"); "where node_id in ('fs','ops')");
# Also add the nodes that correspond to the "trunk" wires. # Also add the nodes that correspond to infrastructure switches
DBQueryFatal("insert into temp_${table} ". DBQueryFatal("insert into temp_nodes ".
"select distinct n.* from wires as w ". "select distinct n.* from switch_stacks as s ".
"left join nodes as n on w.node_id1=n.node_id or ". "left join nodes as n on s.node_id=n.node_id ".
" w.node_id2=n.node_id ". "where stack_id not like 'ExpStack%'");
"where w.type='Trunk'");
# Clear any node reservations on the inside # Clear any node reservations on the inside
DBQueryFatal("update temp_${table} set ". DBQueryFatal("update temp_nodes set ".
" reserved_pid=null where reserved_pid is not null"); " reserved_pid=null where reserved_pid is not null");
# Put the inner nodes into "limbo" so they DTRT when restarted # Put the inner nodes into "limbo" so they DTRT when restarted
if ($restartnodes) { if ($restartnodes) {
DBQueryFatal("update temp_${table} set". DBQueryFatal("update temp_nodes set".
" op_mode='PXEKERNEL',next_op_mode='',". " op_mode='PXEKERNEL',next_op_mode='',".
" eventstate='". TBDB_NODESTATE_PXELIMBO . "',". " eventstate='". TBDB_NODESTATE_PXELIMBO . "',".
" temp_boot_osid=NULL,next_boot_osid=NULL,". " temp_boot_osid=NULL,next_boot_osid=NULL,".
......
Markdown is supported
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