Change in vdsm[master]: gluster: Return status after remove brick/rebalance stop

danken at redhat.com danken at redhat.com
Thu Oct 31 07:46:26 UTC 2013


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 at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/20482
Reviewed-by: Bala.FA <barumuga at redhat.com>
Reviewed-by: Timothy Asir <tjeyasin at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at 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



-- 
To view, visit http://gerrit.ovirt.org/20482
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b46296c8ec9544644d2ab8fed5f9c12236b7ed0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Aravinda VK <avishwan at redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list