swift-recon --sockstat fails if target host does not have ipv6 configured

Bug #1270711 reported by Steve Mayer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Christian Schwede

Bug Description

Using Swift 1.10.0

When running swift-recon --sockstat, if the target host doesn't have IPV6 configured, swift-recon fails with the following:

[2014-01-20 05:50:46] Checking socket usage
[root@uclmp0043 log]# swift-recon --sockstat
===============================================================================
--> Starting reconnaissance on 15 hosts
===============================================================================
[2014-01-20 05:50:57] Checking socket usage
Traceback (most recent call last):
  File "/usr/bin/swift-recon", line 838, in <module>
    reconnoiter.main()
  File "/usr/bin/swift-recon", line 832, in main
    self.socket_usage(hosts)
  File "/usr/bin/swift-recon", line 601, in socket_usage
    inuse6[url] = response['tcp6_in_use']
KeyError: 'tcp6_in_use'

The target host in question does not have IPV6 configured, thus doesn't have /proc/net/sockstat6. Due to this, the tcp6_in_use key does not exist.

Revision history for this message
Christian Schwede (cschwede) wrote :
Changed in swift:
assignee: nobody → Christian Schwede (cschwede)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/67776
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=866c568cd6d240c00f222bcaa8f85a2a15039aee
Submitter: Jenkins
Branch: master

commit 866c568cd6d240c00f222bcaa8f85a2a15039aee
Author: Christian Schwede <email address hidden>
Date: Mon Jan 20 07:07:25 2014 +0000

    Make swift-recon usable on hosts without IPv6

    Fixes a bug when swift-recon --sockstat is used on hosts without
    IPv6 support.

    Tested by disabling IPv6 on Ubuntu 12.04 LTS:

    Add "ipv6.disable=1" to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
    sudo update-grub
    sudo /sbin/reboot

    Closes-Bug: 1270711
    Change-Id: Ib31a059e412ac68ca0a3faef4201fec7560d1178

Changed in swift:
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/ec)

Fix proposed to branch: feature/ec
Review: https://review.openstack.org/70442

Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.13.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.