Traceback in Network script due to unknown MII Tool failure

Bug #1662726 reported by Jeff Lane 
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
High
Maciej Kisielewski

Bug Description

Discovered at a partner lab. Something happened with mii-tool causing it a traceback in th network script:

WARNING:root:test server 192.168.0.5 (192.168.0.5) is NOT
WARNING:root:within 172.16.0.0/22; skipping
ERROR:root:mii-tool returned an error!
ERROR:root:SIOCGMIIPHY on 'eno1' failed: Operation not supported

Traceback (most recent call last):
  File "/tmp/nest-0ryin1s4.b775a49b3b9855283bdcf9aabaa22f7482422b20e955b638683ab55fa43946f9/network", line 727, in <module>
    sys.exit(main())
  File "/tmp/nest-0ryin1s4.b775a49b3b9855283bdcf9aabaa22f7482422b20e955b638683ab55fa43946f9/network", line 723, in main
    return args.func(args)
  File "/tmp/nest-0ryin1s4.b775a49b3b9855283bdcf9aabaa22f7482422b20e955b638683ab55fa43946f9/network", line 513, in interface_test
    error_number = run_test(args, test_target)
  File "/tmp/nest-0ryin1s4.b775a49b3b9855283bdcf9aabaa22f7482422b20e955b638683ab55fa43946f9/network", line 390, in run_test
    error_number = iperf_benchmark.run()
  File "/tmp/nest-0ryin1s4.b775a49b3b9855283bdcf9aabaa22f7482422b20e955b638683ab55fa43946f9/network", line 77, in run
    if self.iface.max_speed == 0:
  File "/tmp/nest-0ryin1s4.b775a49b3b9855283bdcf9aabaa22f7482422b20e955b638683ab55fa43946f9/network", line 300, in max_speed
    for line in filter(lambda l: 'capabilities' in l, info):
UnboundLocalError: local variable 'info' referenced before assignment

I do not currently have more information than this though. I "think" it may be that a device was up but not configured correctly... perhaps.

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

1) network shouldn't crash on mii-tool returning rubbish - clearly my mistake with the surrounding python code
2) from what I've read on the web mii-tool can fail on some NICs :[ I plan to bring back ethtool and fall back to mii-tool if it's not available (/me glances at ubuntu core).

Changed in plainbox-provider-checkbox:
status: New → In Progress
assignee: nobody → Maciej Kisielewski (kissiel)
Pierre Equoy (pieq)
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
milestone: none → 0.35.0
Pierre Equoy (pieq)
Changed in plainbox-provider-checkbox:
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.