rally task detailed incorrect / inconsistent output

Bug #1562713 reported by Piyush on 2016-03-28
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rally
Undecided
Piyush

Bug Description

2 issues-

ISSUE 1- Rally task detailed <task-id> shows some incorrect details for FAILED tasks

[root@rally-sep11-148 ~]# rally task list
+--------------------------------------+-----------------+----------------------------+----------------+-----------+-----+
| uuid | deployment_name | created_at | duration | status | tag |
+--------------------------------------+-----------------+----------------------------+----------------+-----------+-----+
| ba3deb3d-48c4-40fa-a7b6-c264a93cea47 | Cloud_21 | 2016-03-28 13:48:50.301919 | 0:00:00.060265 | failed | |
+--------------------------------------+-----------------+----------------------------+----------------+-----------+-----+

[root@rally-sep11-148 ~]# rally task detailed ba3deb3d-48c4-40fa-a7b6-c264a93cea47
--------------------------------------------------------------------------------
Task ba3deb3d-48c4-40fa-a7b6-c264a93cea47: failed
--------------------------------------------------------------------------------
N << INCORRECT MESSAGE DISPLAYED
o << INCORRECT MESSAGE DISPLAYED

[root@rally-sep11-148 ~]# rally -vd task detailed ba3deb3d-48c4-40fa-a7b6-c264a93cea47
--------------------------------------------------------------------------------
Task ba3deb3d-48c4-40fa-a7b6-c264a93cea47: failed
--------------------------------------------------------------------------------
None << INCORRECT MESSAGE DISPLAYED

The task actually failed because of incorrect JSON.

The above incorrect print occurs due to following code- https://github.com/openstack/rally/blob/master/rally/cli/commands/task.py#L318-L322

On printing the "verification" array in https://github.com/openstack/rally/blob/master/rally/cli/commands/task.py#L316 for above

[root@rally-sep11-148 ~]# rally task detailed ba3deb3d-48c4-40fa-a7b6-c264a93cea47
--------------------------------------------------------------------------------
Task ba3deb3d-48c4-40fa-a7b6-c264a93cea47: failed
--------------------------------------------------------------------------------
#PIYUSH_DEBUG verification: No such file 'T1.json'
N
o

[root@rally-sep11-148 ~]# rally -vd task detailed ba3deb3d-48c4-40fa-a7b6-c264a93cea47
--------------------------------------------------------------------------------
Task ba3deb3d-48c4-40fa-a7b6-c264a93cea47: failed
--------------------------------------------------------------------------------
#PIYUSH_DEBUG verification: No such file 'T1.json'
None

ISSUE 2- For task in init / verifying state, rally task detailed output should be consistent

[root@rally-sep11-148 ~]# rally task list
+--------------------------------------+-----------------+----------------------------+----------------+-----------+-----+
| uuid | deployment_name | created_at | duration | status | tag |
+--------------------------------------+-----------------+----------------------------+----------------+-----------+-----+
| ba3deb3d-48c4-40fa-a7b6-c264a93cea47 | Cloud_21 | 2016-03-28 13:48:50.301919 | 0:00:00.060265 | failed | |
| 8d69b101-360e-494b-9eab-e455c90956a2 | Cloud_21 | 2016-03-28 13:55:33.106906 | 0:00:00.070877 | verifying | |
+--------------------------------------+-----------------+----------------------------+----------------+-----------+-----+

[root@rally-sep11-148 ~]# rally task detailed 8d69b101-360e-494b-9eab-e455c90956a2
--------------------------------------------------------------------------------
Task 8d69b101-360e-494b-9eab-e455c90956a2: verifying

It would be better to have the lower border displayed as well, like-
--------------------------------------------------------------------------------
Task 8d69b101-360e-494b-9eab-e455c90956a2: verifying
-------------------------------------------------------------------------------- <<< MISSING LOWER BORDER TO KEEP IT CONSISTENT WITH RALLY TASK DETAILED OUTPUT OF SUCCESSFUL / FAILED TASK STATUS

Similarly for task in INIT status.

Piyush (pirsriva) on 2016-03-28
description: updated
Changed in rally:
status: New → Confirmed
assignee: nobody → Alexander Maretskiy (maretskiy)
Piyush (pirsriva) wrote :

After discussion with Alexander, I am taking up the ownership of the patch.

Changed in rally:
assignee: Alexander Maretskiy (maretskiy) → Piyush Raman Srivastava (pirsriva)
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/300938
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=bc819cb7286f1924ec60e49029410420906f79c3
Submitter: Jenkins
Branch: master

commit bc819cb7286f1924ec60e49029410420906f79c3
Author: Piyush Raman Srivastava <email address hidden>
Date: Wed Mar 30 16:54:26 2016 +0530

    Fix rally task verification log

    - Fix rally task verification log for FAILED tasks.
    - Fix inconsistent output of "rally task detailed"
      for non-FINISHED / non-FAILED tasks.
    - Fix unit tests for rally.cli.commands.task

    Change-Id: I97787b211aca0872251fab3b80cc213338ac2657
    Closes-Bug: #1562713

Changed in rally:
status: In Progress → Fix Released

This issue was fixed in the openstack/rally 0.4.0 release.

Reviewed: https://review.openstack.org/368946
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=2bfe9a9928be93cc029241dbaa8c5ac8b0ab33c6
Submitter: Jenkins
Branch: master

commit 2bfe9a9928be93cc029241dbaa8c5ac8b0ab33c6
Author: Andrey Kurilin <email address hidden>
Date: Mon Sep 12 19:01:28 2016 +0300

    [task] Fix verification log

    While fix for bug #1562713 changed the way how to save verification log in
    case of some issues at CLI layer, it did not fixed old saved logs. Also, it
    produced one more bug - IOError trace was saved as list instead of string.

    This patch fixes the way of storage IOError and add migration to fix old data

    Also, we change format of verification_log to dict here
    Change-Id: Iffcf066e7033acd48f1446baebe0b2e9a334449f
    Related-Bug: #1562713

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

Duplicates of this bug

Other bug subscribers