dhcpcheck discover fails when there is no interface specified

Bug #1396085 reported by Sebastian Kalinowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Ruslan Aliev

Bug Description

When running 'dhcpcheck discover' (without --iface param) there is an error:

[root@fuel network_checker]# dhcpcheck discover --debug
'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/cliff/app.py", line 282, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.6/site-packages/cliff/display.py", line 80, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.6/site-packages/nailgun_net_check-0.2-py2.6.egg/dhcp_checker/commands.py", line 55, in take_action
    repeat=parsed_args.repeat))
  File "/usr/lib/python2.6/site-packages/nailgun_net_check-0.2-py2.6.egg/dhcp_checker/api.py", line 77, in check_dhcp
    for iface in ifaces:
TypeError: 'NoneType' object is not iterable
2014-11-25 10:45:44 ERROR (app) 'NoneType' object is not iterable

'--iface' param is optional and it's helps message tells that "If no eth provided - will run against all except lo" which is not true [1].

There are two options:
1) make '--iface' as a required param and change it's help message
2) run discover for all interfaces except lo as help message tells

Checked on fuel-web revision 603a8d4.

[1] https://github.com/stackforge/fuel-web/blob/master/network_checker/dhcp_checker/commands.py#L44-L46

Changed in fuel:
status: New → Triaged
Dmitry Pyzhov (dpyzhov)
tags: added: module-netcheck
Changed in fuel:
milestone: 6.1 → 7.0
Revision history for this message
Vladimir Sharshov (vsharshov) wrote :

We have workaround. Can be safely moved to 8.0

Changed in fuel:
status: Triaged → Won't Fix
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 7.0 → 8.0
status: Won't Fix → Triaged
no longer affects: fuel/8.0.x
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Ruslan Aliev (raliev)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Ruslan Aliev (raliev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to network-checker (master)

Fix proposed to branch: master
Review: https://review.openstack.org/248826

Changed in fuel:
status: Triaged → In Progress
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 8.0 → 9.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to network-checker (master)

Reviewed: https://review.openstack.org/248826
Committed: https://git.openstack.org/cgit/openstack/network-checker/commit/?id=bf78100d2d1b831f6a44c1c05c6727d7805ff296
Submitter: Jenkins
Branch: master

commit bf78100d2d1b831f6a44c1c05c6727d7805ff296
Author: Ruslan Aliev <email address hidden>
Date: Mon Nov 23 20:01:15 2015 +0300

    Fixes dhcp checking with no interface provided

    When running 'dhcpcheck discover' without --iface param,
    there is an error 'NoneType object is not iterable'. This
    patch fixes that error according '--ifaces' help message
    and if '--ifaces' option not specified, dhcp check runs
    discover for all interfaces except lo.

    Change-Id: Iec4b01792d36a91ec9afca415bcc2fc602be1e00
    Closes-Bug: #1396085
    Signed-off-by: Ruslan Aliev <email address hidden>

Changed in fuel:
status: In Progress → 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.