Can't export trends in case of failed context of workload

Bug #1732193 reported by Paul Peereboom on 2017-11-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Medium
Andrey Kurilin

Bug Description

Hi,

I cannot create a trends report when there one of workload's contexts is failed.

(installation) root@rally-server:~# rally --version
0.10.1~dev8

(installation) root@rally-server:~# rally --rally-debug task trends --tasks f9a64d6d-6cec-4ce0-9ae4-5f811a6359e6 --out /var/www/html/index.html
2017-11-14 14:03:14.544 4333 RALLYDEBUG rally.api [-] INFO logs from urllib3 and requests module are hide.
2017-11-14 14:03:14.545 4333 RALLYDEBUG rally.api [-] urllib3 insecure warnings are hidden.
2017-11-14 14:03:14.545 4333 RALLYDEBUG rally.api [-] ERROR log from boto module is hide.
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils [-] Unexpected exception in CLI: TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils Traceback (most recent call last):
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils File "/root/rally/installation/local/lib/python2.7/site-packages/rally/cli/cliutils.py", line 676, in run
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils ret = fn(*fn_args, **fn_kwargs)
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils File "/root/rally/installation/local/lib/python2.7/site-packages/rally/cli/commands/task.py", line 814, in trends
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils result = plot.trends(results)
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils File "/root/rally/installation/local/lib/python2.7/site-packages/rally/task/processing/plot.py", line 249, in trends
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils trends.add_result(task["uuid"], workload)
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils File "/root/rally/installation/local/lib/python2.7/site-packages/rally/task/processing/plot.py", line 315, in add_result
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils ts = int(workload["start_time"] * 1000)
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
2017-11-14 14:03:14.935 4333 ERROR rally.cli.cliutils

When a scenario in a task is failed the workload["start_time"] is None:

added a print in plot.py:

        print workload["start_time"]
        print workload["name"]
        ts = int(workload["start_time"] * 1000)

NovaServerGroups.create_and_list_server_groups
1510662908.38
NovaFlavors.list_flavors
None
NovaServers.list_servers

list_servers is failed and has no start_time set.

For me "Total success rate" in trends is now useless because this is always 100% success.

Regards,
Paul

Paul Peereboom (peereb) wrote :

Workaround:
rally/task/processing/plot.py:
-ts = int(workload["start_time"] * 1000)
+ts = int(0 if workload["start_time"] is None else workload["start_time"] * 1000)

Paul Peereboom (peereb) wrote :

Ok, other failed scenario's does have a start_time defined. Bit confused now, perhaps there is something wrong in the scenario or some other race condition. Will try to reproduce later

chenhb (chen-haibing1) wrote :

Hi peereb, thanks for your report, That will be very cool if you are interested to commit a patch in Rally community.

Andrey Kurilin (andreykurilin) wrote :
Changed in rally:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Andrey Kurilin (andreykurilin)
summary: - Can't export trends when failed scenarios in task
+ Can't export trends in case of failed context of workload
description: updated

Reviewed: https://review.openstack.org/522920
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=af2b146d243371fdff28b146fb85c5027b79aef4
Submitter: Zuul
Branch: master

commit af2b146d243371fdff28b146fb85c5027b79aef4
Author: Andrey Kurilin <email address hidden>
Date: Sat Nov 25 13:57:50 2017 +0200

    Fix trends in case of failures in contexts

    In case when the context fails, there is no start_time timeframe in
    workload and we should cover this case and do not fail with the next
    error:

      TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

    Closes-Bug: #1732193
    Change-Id: I95e96bb98fe473e8c0ea910021966ceb203f35cd

Changed in rally:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/522930
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=f8757e412f1d2e08993602afecd2a0e9b4157fd3
Submitter: Zuul
Branch: stable/0.10

commit f8757e412f1d2e08993602afecd2a0e9b4157fd3
Author: Andrey Kurilin <email address hidden>
Date: Sat Nov 25 13:57:50 2017 +0200

    Fix trends in case of failures in contexts

    In case when the context fails, there is no start_time timeframe in
    workload and we should cover this case and do not fail with the next
    error:

      TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

    Closes-Bug: #1732193
    Change-Id: I95e96bb98fe473e8c0ea910021966ceb203f35cd
    (cherry picked from commit af2b146d243371fdff28b146fb85c5027b79aef4)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers