Commit e90983f3 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Init node_hostkeys when creating new nodes.

parent bd21eb34
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -235,6 +235,9 @@ else {
" 'testnode', $nextpri, 'NORMAL', ".
" '$defosid') ");
DBQueryFatal("insert into node_hostkeys (node_id) ".
"values ('$nodename')");
DBQueryFatal("insert into node_auxtypes ".
"(node_id, type, count) ".
"values ('$nodename', '$nodeauxtype', 20)");
......@@ -278,6 +281,9 @@ for ($i = 1; $i < 9; $i++) {
"values ('$nodevname', '$nodevtype', '$nodename', ".
" 'virtnode', $priority, 'NORMAL', ".
" '$defosid', 1) ");
DBQueryFatal("insert into node_hostkeys (node_id) ".
"values ('$nodevname')");
}
#
......
# -*- python -*-
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -461,6 +461,11 @@ class Plab:
'FREE_CLEAN',
'ISUP'))
DBQueryFatal("replace into node_hostkeys"
" (node_id)"
" values (%s)",
(vnodeid))
DBQueryFatal("replace into widearea_nodeinfo"
" (node_id, contact_uid, hostname, site)"
" values (%s, %s, %s, %s)",
......@@ -519,6 +524,11 @@ class Plab:
'PCVM', defosid, 1,
'FREE_CLEAN',
'SHUTDOWN', sshdport))
DBQueryFatal("insert into node_hostkeys"
" (node_id)"
" values (%s)",
(vnodeid))
DBQueryFatal("insert into node_status"
" (node_id, status, status_timestamp)"
......
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003 University of Utah and the Flux Group.
# Copyright (c) 2003, 2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -257,6 +257,9 @@ NODE: foreach my $node_id (@node_ids) {
"state_timestamp=unix_timestamp(NOW()), " .
"op_mode_timestamp=unix_timestamp(NOW())");
DBQueryFatal("insert into node_hostkeys (node_id) ".
"values ('$node_id')");
#
# Add some vnodes
#
......
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