Commit fffd650c authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

New status stuff, which use separate table now (node_status table).

parent 263f7641
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group. # Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
use English; use English;
...@@ -238,11 +238,15 @@ else { ...@@ -238,11 +238,15 @@ else {
print "Creating widearea node $nodename ...\n"; print "Creating widearea node $nodename ...\n";
DBQueryFatal("insert into nodes ". DBQueryFatal("insert into nodes ".
"(node_id, type, phys_nodeid, role, priority, ". "(node_id, type, phys_nodeid, role, priority, ".
" status, op_mode, def_boot_osid) ". " op_mode, def_boot_osid) ".
"values ('$nodename', '$nodetype', '$nodename', ". "values ('$nodename', '$nodetype', '$nodename', ".
" 'testnode', $nextpri, 'down', 'NORMAL', ". " 'testnode', $nextpri, 'NORMAL', ".
" '$defosid') "); " '$defosid') ");
DBQueryFatal("replace into node_status ".
"(node_id, status, status_timestamp) ".
"values ('$nodename', 'down', now()) ");
DBQueryFatal("insert into interfaces ". DBQueryFatal("insert into interfaces ".
"(node_id, card, port, IP, interface_type, iface) ". "(node_id, card, port, IP, interface_type, iface) ".
"values ('$nodename', $control_net, 1, '$nodeip', ". "values ('$nodename', $control_net, 1, '$nodeip', ".
...@@ -267,9 +271,9 @@ for ($i = 1; $i < 9; $i++) { ...@@ -267,9 +271,9 @@ for ($i = 1; $i < 9; $i++) {
print "Creating widearea virtual node $nodevname ...\n"; print "Creating widearea virtual node $nodevname ...\n";
DBQueryFatal("insert into nodes ". DBQueryFatal("insert into nodes ".
"(node_id, type, phys_nodeid, role, priority, ". "(node_id, type, phys_nodeid, role, priority, ".
" status, op_mode, def_boot_osid, update_accounts) ". " op_mode, def_boot_osid, update_accounts) ".
"values ('$nodevname', '$nodevtype', '$nodename', ". "values ('$nodevname', '$nodevtype', '$nodename', ".
" 'virtnode', $priority, 'down', 'NORMAL', ". " 'virtnode', $priority, 'NORMAL', ".
" '$defosid', 1) "); " '$defosid', 1) ");
} }
......
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