Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] add support for bonded interface #14

Open
niekosau opened this issue Aug 16, 2016 · 0 comments
Open

[feature request] add support for bonded interface #14

niekosau opened this issue Aug 16, 2016 · 0 comments

Comments

@niekosau
Copy link

it will be nice to have support for bonded/virtual interfaces, for example:

[root@mysql-22 ~]# ip add show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: em1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
    link/ether b0:83:fe:dc:c7:68 brd ff:ff:ff:ff:ff:ff
3: em2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000
    link/ether b0:83:fe:dc:c7:68 brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether b0:83:fe:dc:c7:68 brd ff:ff:ff:ff:ff:ff
    inet 10.5.228.34/24 brd 10.5.228.255 scope global bond0
       valid_lft forever preferred_lft forever
    inet6 fe80::10ca:89ff:fefd:231e/64 scope link
       valid_lft forever preferred_lft forever
[root@mysql-22 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
    Aggregator ID: 1
    Number of ports: 2
    Actor Key: 9
    Partner Key: 18
    Partner Mac Address: 00:06:f6:2f:d0:80

Slave Interface: em2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: b0:83:fe:dc:c7:68
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    port key: 9
    port priority: 255
    port number: 1
    port state: 61
details partner lacp pdu:
    system priority: 32768
    oper key: 18
    port priority: 32768
    port number: 532
    port state: 61

Slave Interface: em1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: b0:83:fe:dc:c7:67
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
    system priority: 65535
    port key: 9
    port priority: 255
    port number: 2
    port state: 61
details partner lacp pdu:
    system priority: 32768
    oper key: 18
    port priority: 32768
    port number: 276
    port state: 61

because now auto discovery output looks like:


[!] Running 50 threads.
[*] Connecting to 10.5.228.34:22 as "arunas" using key file.
[+] Linux running @ 10.5.228.34
[+] Collecting data from: 10.5.228.34
[_] Waiting for threads to finish. Current thread count: 4
[_] Waiting for threads to finish. Current thread count: 4
[_] Waiting for threads to finish. Current thread count: 4
[_] Waiting for threads to finish. Current thread count: 4
[_] Waiting for threads to finish. Current thread count: 4
[_] Waiting for threads to finish. Current thread count: 4
[_] Waiting for threads to finish. Current thread count: 4
[-] Error in get_hdd_info_hdaparm() for IP: 10.5.228.34 . Message was: [u'SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0d 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n']

Linux data:
{'device': 'mysql-22', 'macaddress': u'b0:83:fe:dc:c7:68', 'tag': u'bond0', 'ipaddress': u'10.5.228.34'}
{'device': 'mysql-22', 'macaddress': u'b0:83:fe:dc:c7:68', 'port_name': u'bond0'}
{'new_name': 'mysql-22', 'cpupower': 2799, 'name': 'mysql-22', 'serial_no': u'2HK0H32', 'hardware': u'PowerEdge R420', 'osverno': '3.10.0-327.13.1.el7.x86_64', 'cpucount': u'2', 'osver': '7.2.1511', 'memory': 129024, 'cpucore': 6, 'manufacturer': u'Dell Inc.', 'os': 'centos', 'uuid': u'4C4C4544-0048-4B10-8030-B2C04F483332'}

Posting data to https://td-device43.local/api/device/
[_] Waiting for threads to finish. Current thread count: 4
{'new_name': 'mysql-22', 'cpupower': 2799, 'name': 'mysql-22', 'serial_no': u'2HK0H32', 'hardware': u'PowerEdge R420', 'osverno': '3.10.0-327.13.1.el7.x86_64', 'cpucount': u'2', 'osver': '7.2.1511', 'memory': 129024, 'cpucore': 6, 'manufacturer': u'Dell Inc.', 'os': 'centos', 'uuid': u'4C4C4544-0048-4B10-8030-B2C04F483332'}
Status code: 200
{"msg": ["device added or updated", 72, "mysql-22", true, false], "code": 0}

Posting IP data to https://td-device43.local/api/ip/
{'device': u'mysql-22', 'macaddress': u'b0:83:fe:dc:c7:68', 'tag': u'bond0', 'ipaddress': u'10.5.228.34'}
Status code: 200
{"msg": ["ip added or updated", 178, "10.5.228.34", true, false], "code": 0}

Posting MAC data to https://td-device43.local/api/1.0/macs/
{'device': u'mysql-22', 'macaddress': u'b0:83:fe:dc:c7:68', 'port_name': u'bond0'}
Status code: 200
{"msg": ["mac address successfully added/updated", 54, "b0:83:fe:dc:c7:68", true, false], "code": 0}

Fetching IP addresses for device:  mysql-22
[_] Waiting for threads to finish. Current thread count: 4
200 {"ip_addresses": [{"subnet": "SITE_VLAN_228-10.5.228.0/24(Site infra)", "macaddress": "b0:83:fe:dc:c7:68", "subnet_id": 62, "ip": "10.5.228.34", "label": "bond0", "type": 1}]}
[_] Waiting for threads to finish. Current thread count: 1

[!] Done!
@niekosau niekosau changed the title [future request] add support for bonded interface [feature request] add support for bonded interface Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant