Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
24acc12d
Commit
24acc12d
authored
Feb 04, 2019
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bitrot in genirack wires table insertion.
parent
5feec976
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
backend/newscript.in
backend/newscript.in
+12
-4
install/genirack/mknewconfig.in
install/genirack/mknewconfig.in
+3
-0
install/genirack/wiring-A.xml
install/genirack/wiring-A.xml
+1
-1
No files found.
backend/newscript.in
View file @
24acc12d
#!/usr/bin/perl -wT
#
# Copyright (c) 2011-2017 University of Utah and the Flux Group.
# Copyright (c) 2011-2017
, 2019
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -587,17 +587,25 @@ sub CommitWire
my
$result
=
ResolveRow
(
$id
);
while
(
my
(
$skip
,
$cable
,
$len
,
$type
,
$node_id1
,
$card1
,
$port1
,
$node_id2
,
$card2
,
$port2
)
=
$result
->
fetchrow
())
{
my
$interface1
=
Interface
->
Lookup
(
$node_id1
,
$card1
,
$port1
);
my
$iface1
=
"
eth
${card1}
";
my
$iface2
=
"
${card2}
/
${port2}
";
my
$interface1
=
Interface
->
LookupByIface
(
$node_id1
,
$iface1
);
if
(
!
defined
(
$interface1
))
{
$errors
{"
command
"}
=
"
Cannot lookup interface1
";
return
;
}
my
$interface2
=
Interface
->
Lookup
(
$node_id2
,
$card2
,
$port
2
);
my
$interface2
=
Interface
->
Lookup
ByIface
(
$node_id2
,
$iface
2
);
if
(
!
defined
(
$interface2
))
{
$errors
{"
command
"}
=
"
Cannot lookup interface2
";
return
;
}
my
$wireargs
=
{};
my
$wireargs
=
{
"
card1
"
=>
$card1
,
"
port1
"
=>
$port1
,
"
card2
"
=>
$card2
,
"
port2
"
=>
$port2
,
};
$wireargs
->
{"
cable
"}
=
$cable
if
(
defined
(
$cable
));
$wireargs
->
{"
length
"}
=
$len
if
(
defined
(
$len
));
if
(
$fake
)
{
...
...
install/genirack/mknewconfig.in
View file @
24acc12d
...
...
@@ -9,6 +9,7 @@ use lib "@prefix@/lib";
use
User
;
my
$TB
=
"
@prefix
@
";
my
$ADDINTERFACE
=
"
$TB
/sbin/addinterface
";
my
$NEWSCRIPT
=
"
$TB
/bin/newscript
";
my
$controliloip
;
...
...
@@ -215,6 +216,8 @@ foreach my $current (@wires) {
}
elsif
(
$role
eq
"
mngmnt
")
{
$type
=
"
Management
";
}
system
("
$ADDINTERFACE
-b 1Gb
$switch
'
${switch_card}
/
${switch_port}
'
");
my
$file
=
"
$outpath
/wire.
$node_id
.
$card
.
$port
";
open
(
WIRE_FILE
,
"
>
$file
");
print
WIRE_FILE
"
<newwire>
\n
";
...
...
install/genirack/wiring-A.xml
View file @
24acc12d
...
...
@@ -118,7 +118,7 @@
<port1>
1
</port1>
<node_id2>
procurve1
</node_id2>
<card2>
1
</card2>
<port2>
6
</port2>
<port2>
5
</port2>
</wire>
<wire>
<UXX>
U07
</UXX>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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