nic order confusion

29 views
Skip to first unread message

Chris Burroughs

unread,
Jun 9, 2013, 11:37:12 AM6/9/13
to Collins
All of our servers have two NICs. We are experiencing a problem where
about 20% of the server assets are reporting in collins with the NICs
backwards (nic0=eth1 instead of nic0=eth0). As far as I can tell from
the current lswh output the order is correct there. We rely on the
order for ip assignment.

I went to create a unit test in LshwParserSpec and got even more
confused. I guessed the problem was some sort of random element order
parsing, but my test failed every single time. Looking at LshwParser
[1] it seems like nics are prepended instead of appended to the list of
previously parsed nics as we go. However, if that's the case I don't
understand how any of our servers are in the correct order. It looks
like something like this may have come up before since
LshwRepresentation's equals [2] uses a okay in practice but not
necessarily correct sorted comparisons of the mac addresses.

[1]
https://github.com/cburroughs/collins/blob/master/app/util/parsers/LshwParser.scala#L42

[2]
https://github.com/cburroughs/collins/blob/master/app/util/LshwRepresentation.scala#L81

Reply all
Reply to author
Forward
0 new messages