Dan Kenigsberg has submitted this change and it was merged.
Change subject: gluster: Return status after remove brick/rebalance stop ......................................................................
gluster: Return status after remove brick/rebalance stop
Initially glusterVolumeRebalanceStop and glusterVolumeRemoveBrickStop returns true/false.
Since rebalance and remove brick operations are async operations, if rebalance/remove-brick STOP is triggered after these async tasks completed then vdsm returns success when executing stop command. But since task is completed engine has to show that task is completed(Now showing STOPPED)
This patch returns status after successful execution of stop command. engine will check the summary[status] to see the status of task and display in UI accordingly.
This patch will not affect the backward compatibility since "status" is not changed in output dict. 'status': {'code': 0, 'message': 'Done'}
Output: {'hosts': [{'filesFailed': LONG as STR, 'filesMoved': LONG as STR, 'filesScanned': LONG as STR, 'filesSkipped': LONG as STR, 'name': STRING, 'status': STRING, 'totalSizeMoved': LONG as STR},..], 'status': {'code': 0, 'message': 'Done'}, 'summary': {'filesFailed': LONG as STR, 'filesMoved': LONG as STR, 'filesScanned': LONG as STR, 'filesSkipped': LONG as STR, 'status': STRING, 'totalSizeMoved': LONG as STR}}
Possible exceptions with these verbs: No new exceptions introduced, XmlErrorException was raised when status parsing fails.
GlusterVolumeRebalanceStopFailedException code = 4137 message = "Volume rebalance stop failed"
GlusterVolumeRemoveBrickStopFailedException code = 4150 message = "Volume remove brick stop failed"
GlusterXmlErrorException code = 4106 message = "XML error"
Change-Id: I5b46296c8ec9544644d2ab8fed5f9c12236b7ed0 Signed-off-by: Aravinda VK avishwan@redhat.com Reviewed-on: http://gerrit.ovirt.org/20482 Reviewed-by: Bala.FA barumuga@redhat.com Reviewed-by: Timothy Asir tjeyasin@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M client/vdsClientGluster.py M vdsm/gluster/api.py M vdsm/gluster/cli.py M vdsm/gluster/vdsmapi-gluster-schema.json 4 files changed, 22 insertions(+), 11 deletions(-)
Approvals: Timothy Asir: Looks good to me, but someone else must approve Bala.FA: Looks good to me, but someone else must approve Aravinda VK: Verified Dan Kenigsberg: Looks good to me, approved