Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
3a0d92f7
Commit
3a0d92f7
authored
Aug 26, 2003
by
Leigh B. Stoller
Browse files
Switch from control_net to control_iface usage.
parent
3bf5809e
Changes
2
Hide whitespace changes
Inline
Side-by-side
db/dhcpd_makeconf.in
View file @
3a0d92f7
...
...
@@ -63,7 +63,7 @@ while (<IF>) {
$query
.=
"
LEFT JOIN reserved AS r ON n.node_id = r.node_id
";
}
$query
.=
"
WHERE (n.type='
$nodetype
' OR t.class='
$nodetype
')
";
$query
.=
"
AND i.
card
= t.control_
net
";
$query
.=
"
AND i.
iface
= t.control_
iface
";
$query
.=
"
ORDER BY n.priority
";
my
$result
=
DBQueryFatal
(
$query
);
...
...
db/newwanode.in
View file @
3a0d92f7
...
...
@@ -125,13 +125,13 @@ if (defined($nickname)) {
# Must be a valid type.
#
my
$query_result
=
DBQueryFatal
("
select osid,control_
net
from node_types
"
.
DBQueryFatal
("
select osid,control_
iface
from node_types
"
.
"
where type='
$nodetype
'
");
if
(
!
$query_result
->
numrows
)
{
fatal
("
*** $0:
\n
"
.
"
No such nodetype
$nodetype
is defined in the DB!
\n
");
}
my
(
$defosid
,
$control_
net
)
=
$query_result
->
fetchrow_array
();
my
(
$defosid
,
$control_
iface
)
=
$query_result
->
fetchrow_array
();
#
# For now, just pcwa/pcron is allowed until we have more DB state that says
...
...
@@ -247,12 +247,14 @@ else {
"
(node_id, status, status_timestamp)
"
.
"
values ('
$nodename
', 'down', now())
");
# Note that card/port are arbitrary for remote nodes since they are
# not connected to local switches!
my
$ifacerole
=
TBDB_IFACEROLE_CONTROL
();
DBQueryFatal
("
insert into interfaces
"
.
"
(node_id, card, port, IP, interface_type, iface, role)
"
.
"
values ('
$nodename
',
$control_net
, 1, '
$nodeip
',
"
.
"
'fxp', '
eth0
', '
$ifacerole
')
");
"
values ('
$nodename
',
0
, 1, '
$nodeip
',
"
.
"
'fxp', '
$control_iface
', '
$ifacerole
')
");
DBQueryFatal
("
insert into reserved
"
.
"
(node_id, pid, eid, rsrv_time, vname)
"
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment