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

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()
if (defined($opsnode));
if ($table eq "nodes") {
DBQueryFatal("update temp_${table} set ".
DBQueryFatal("update temp_nodes set ".
" type='ops', ".
" phys_nodeid=node_id, ".
" role='ctrlnode', ".
" op_mode='OPSNODEBSD' ".
"where node_id in ('fs','ops')");
# Also add the nodes that correspond to the "trunk" wires.
DBQueryFatal("insert into temp_${table} ".
"select distinct n.* from wires as w ".
"left join nodes as n on w.node_id1=n.node_id or ".
" w.node_id2=n.node_id ".
"where w.type='Trunk'");
# Also add the nodes that correspond to infrastructure switches
DBQueryFatal("insert into temp_nodes ".
"select distinct n.* from switch_stacks as s ".
"left join nodes as n on s.node_id=n.node_id ".
"where stack_id not like 'ExpStack%'");
# 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");
# Put the inner nodes into "limbo" so they DTRT when restarted
if ($restartnodes) {
DBQueryFatal("update temp_${table} set".
DBQueryFatal("update temp_nodes set".
" op_mode='PXEKERNEL',next_op_mode='',".
" eventstate='". TBDB_NODESTATE_PXELIMBO . "',".
" 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