summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-04-12 12:26:54 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-08-24 03:15:12 -0700
commit106a107ec5c8ecc48c3e048a9b8ad9ac809e278d (patch)
tree5694dbfb5a4532a0b5f3da420713c08cd9f051c3 /xlators
parent036c4fcab82d4e69bf3e53d93f7da9b0b1dd900c (diff)
snapshot/cli: Fix snapshot status xml output
Backport of http://review.gluster.org/#/c/14018/ snap status --xml errors out if a brick is down and doesn't have pid. It is handled in the cli of the snap status where "N/A" is displayed in such a scenario. Handled the same in xml snap status <snapname> --xml fails as the writer is not initialised for the same. Using GF_SNAP_STATUS_TYPE_ITER instead of GF_SNAP_STATUS_TYPE_SNAP for all snap's status to differentiate between the two scenarios. Added testcase volume-snapshot-xml.t to check all snapshot commands xml outputs > Reviewed-on: http://review.gluster.org/14018 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Change-Id: I99563e8f3e84f1aaeabd865326bb825c44f5c745 BUG: 1369372 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/15291 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 7967722d798..6e4894b7344 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -5961,6 +5961,7 @@ glusterd_snapshot_status_prevalidate (dict_t *dict, char **op_errstr,
{
break;
}
+ case GF_SNAP_STATUS_TYPE_ITER:
case GF_SNAP_STATUS_TYPE_SNAP:
{
ret = dict_get_str (dict, "snapname", &snapname);
@@ -7880,6 +7881,7 @@ glusterd_snapshot_status_commit (dict_t *dict, char **op_errstr,
}
break;
}
+ case GF_SNAP_STATUS_TYPE_ITER:
case GF_SNAP_STATUS_TYPE_SNAP:
{