Bug 797696 - RFE: Record and query which network interface is cabled in beaker machines
Summary: RFE: Record and query which network interface is cabled in beaker machines
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Beaker
Classification: Retired
Component: inventory
Version: 0.8
Hardware: Unspecified
OS: Unspecified
low
low vote
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact: tools-bugs
URL:
Whiteboard: Inventory
: 1210439 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-27 03:21 UTC by Qian Hong
Modified: 2020-11-16 20:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-16 20:20:15 UTC


Attachments (Terms of Use)

Description Qian Hong 2012-02-27 03:21:48 UTC
Description of problem:

We already have a "Find Active Network interface" function in push-inventory.py,
it will be nice if we can extend this script to record and query cable connection status of all network interfaces, that's very useful for our testing in network-qe groups.

Technically it is possible to detect whether a network interface is connected or not, here is a bash version:
--- snip ---
#!/bin/sh
ETHER_LIST=$(ifconfig -a | grep Ethernet | cut -f 1 -d' ')
for ETHER in $ETHER_LIST;
do
    ifconfig $ETHER up
    sleep 10s 
    # usually it takes about 2 seconds to have the interface connected after 
    # `ifconfig $ETHER up`, sometimes it takes more. 10 seconds should be long
    # enough. 

    IS_LINKED=$(ethtool $ETHER | grep 'Link detected' | cut -f 3 -d' '
    echo "balabla $IS_LINKED"
done
--- snip ---

Thanks!

Comment 1 Qian Hong 2012-02-27 08:00:17 UTC
Hello, updates:

It is a waste of resource if a network card is not connected. This happens in two ways: 
The first way is, a network card with single port, which is not connected;
The second way is, a network card with multiple ports, and none of its ports is connected.

We found this happens on many beaker machines, and have already opened some tickets to eng-ops [1][2]. However, rather than manually check every network cards on every machines, I think it is great if the inventory script would throw a warning when it find any network card match one of the above rules.

Of cause it is the best if every ports of every network cards are all connected, but it seems will not happen in near future, our beaker labs might have no enough switcher ports in that case. 

Regards.


[1] https://engineering.redhat.com/rt/Ticket/Display.html?id=143753
[2] https://engineering.redhat.com/rt/Ticket/Display.html?id=143754

Comment 2 Qian Hong 2012-02-28 09:22:31 UTC
Hello, update 2:

In some machines of our beaker labs, there is a primary card which connected to the public beaker network and one or more cards connected to a private lan, here is an example:

https://engineering.redhat.com/rt/Ticket/Display.html?id=143786

We need more information for our auto testing jobs, it would be great if the inventory script could report whether an interface is connected to the beaker public network. 


Regards.

Comment 5 Amit Saha 2014-03-21 01:46:31 UTC
Can you please add an example (or examples) of a use case that you are looking for here? I am clear about what you are asking for, but not sure about the use case. 

I would also appreciate if you explain the update:2 a little more: https://bugzilla.redhat.com/show_bug.cgi?id=797696#c2

Comment 6 Dan Callaghan 2015-04-10 02:35:39 UTC
*** Bug 1210439 has been marked as a duplicate of this bug. ***

Comment 7 Tomas Klohna 🔧 2019-04-05 10:24:32 UTC
Closing as insufficient data since no additional info has been provided in 7 years.

Comment 8 Tomas Klohna 🔧 2019-04-05 10:29:26 UTC
Reopening after a discussion


Note You need to log in before you can comment on or make changes to this bug.