Bug 1037698

Summary: REST: migration job status always reports STARTED
Product: Red Hat Gluster Storage Reporter: Dustin Tsang <dtsang>
Component: rhsc-sdkAssignee: Shubhendu Tripathi <shtripat>
Status: CLOSED NOTABUG QA Contact: Dustin Tsang <dtsang>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: dpati, knarra, mmahoney, mmccune, pprakash, rhs-bugs, ssampat
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 2.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-05 05:21:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dustin Tsang 2013-12-03 15:46:36 UTC
Description of problem:
The status of job for migrating a set of bricks always reports STARTED.
Also the executing step for the job also remains in he STARTED state even though its children's state are FINISHED.

Version-Release number of selected component (if applicable):
rhsc-cb10

How reproducible:
100% of the time

Steps to Reproduce:
1. create a dist volume in rhsc
2. using the rest api migrate 2 bricks 
=> job id is returned
3. using the gluster cli monitor the migration status by running 'gluster vol status'
4. when migration has complete, use the rest api to show the job
(GET /api/jobs/:id )

Actual results:
The status of the job is STARTED

Expected results:
The status of the job should be FINISHED

Additional info:

Comment 2 Dusmant 2013-12-03 16:53:30 UTC
As per Dustin, the REST API shows "STARTED" but on the GUI it shows "FINISHED".

Comment 3 Shubhendu Tripathi 2013-12-04 12:36:04 UTC
Dustin/Dusmant,

In engine we keep the status of remove brick as STARTED till user performs stop/commit. So REST would keep showing as STARTED only and user should either execute delete action to remove the brick or activate action to retain the brick.

It is done this way to make sure user gets an alert that after migrate he has to perform either delete or retain. Actually in UI we keep showing an icon with "?" overlapped with remove brick icon just to indicate that migrate is completed but either delete or activate should be executed to complete the task. Till then the task in engine would be marked as STARTED only.

Hope this clarifies.

Comment 4 Dusmant 2013-12-04 15:42:42 UTC
Then, in this case it would not be considered as a bug. I will close this bug. But we need to document this API behaviour in the API guide.