Comment 0 for bug 1562713

Piyush (pirsriva) wrote :

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

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.