AttributeError: 'IPerfPerformanceTest' object has no attribute 'fail_threshold'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox (Legacy) |
Fix Released
|
High
|
Daniel Manrique |
Bug Description
Checkbox iperf test returns the following error. Manually running the test yield good throughput.
DEBUG:root:Shutting down interface:eth1
DEBUG:root:timeout 180 iperf -c 172.100.202.223 -n 1024M
Traceback (most recent call last):
File "/usr/share/
sys.
File "/usr/share/
return args.func(args)
File "/usr/share/
result = iperf_benchmark
File "/usr/share/
if percent < self.fail_
AttributeError: 'IPerfPerforman
checkbox 0.17.7~
checkbox-
checkbox-
checkbox-
checkbox-cli 0.17.7~
python3-checkbox 0.17.7~
Related branches
- Zygmunt Krynicki (community): Approve
-
Diff: 10 lines (+1/-0)1 file modifiedcheckbox-old/scripts/network (+1/-0)
Changed in checkbox: | |
status: | In Progress → Fix Committed |
affects: | checkbox → checkbox-legacy |
Changed in checkbox-legacy: | |
milestone: | 2014-mar-14 → none |
Changed in checkbox-legacy: | |
status: | Fix Committed → Fix Released |
To reproduce:
1- Install iperf server on another system on the same network. share/checbox/ network test -i eth0 -t iperf --fail-threshold 80 --target 192.168.1.2 --user duck --password duck
2- On this system run iperf -s
3- On the system where checkbox is installed, run (assuming the shown interface and iperf address):
/usr/
expected result:
DEBUG:root:timeout 180 iperf -c 192.168.1.2 -n 1024M ------- ------- ------- ------- ------- ------- ------- ---- ------- ------- ------- ------- ------- ------- ------- ----
-------
Client connecting to 192.168.1.2, TCP port 5001
TCP window size: 22.9 KByte (default)
-------
[ 3] local 192.168.1.1 port 36994 connected with 192.168.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-49.7 sec 1.00 GBytes 173 Mbits/sec
Transfer speed: 173 Mb/s
17.30% of theoretical max 1000Mb/s
WARNING:root:Poor network performance detected Restoring interface:virbr0 Restoring interface:wlan2
DEBUG:root:
DEBUG:root:
Actual:
DEBUG:root:timeout 180 iperf -c 192.168.1.2 -n 1024M ------- ------- ------- ------- ------- ------- ------- ---- ------- ------- ------- ------- ------- ------- ------- ----
-------
Client connecting to 192.168.1.2, TCP port 5001
TCP window size: 22.9 KByte (default)
-------
[ 3] local 192.168.1.1 port 36951 connected with 192.168.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 9.2 sec 1.00 GBytes 930 Mbits/sec
Transfer speed: 930 Mb/s
93.00% of theoretical max 1000Mb/s
Traceback (most recent call last): exit(main( )) .run() threshold: ceTest' object has no attribute 'fail_threshold'
File "./network", line 640, in <module>
sys.
File "./network", line 636, in main
return args.func(args)
File "./network", line 488, in interface_test
result = iperf_benchmark
File "./network", line 117, in run
if percent < self.fail_
AttributeError: 'IPerfPerforman
The problem is that in the IPerfPerformanc eTest class, the fail_threshold parameter to the constuctor is never assigned to an instance variable, and so is lost, therefore when we do the comparison later it bombs as seen here.
I'll propose a fix adding this.