glusterfs/tests/bugs/cli/bug-1113476.t
Avra Sengupta 2e56bde3ea snapshot: Don't display snapshot's hard-limit and soft-limit in vol info
The snap-max-hard-limit being displayed in the volume info
currently is propagated from system's snap-max-hard-limit as
that is a global option common for all volumes, and hence ends
up showing the system's snap-max-hard-limit.

We should not be displaying snap-max-hard-limit and
snap-max-soft-limit in the volume info at all, as these are
snap config options and should be set and displayed via snap
config command.

Modified bug-1113476.t to test the same behaviour.

Change-Id: I90891f0cf7fb39fd686787297c7f7cd8c1e7daa1
BUG: 1276018
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/12443
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-11-02 22:34:37 -08:00

46 lines
1.1 KiB
Bash

#!/bin/bash
. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc
. $(dirname $0)/../../snapshot.rc
function volinfo_validate ()
{
local var=$1
$CLI volume info $V0 | grep "^$var" | sed 's/.*: //'
}
cleanup;
TEST verify_lvm_version
TEST glusterd
TEST pidof glusterd
TEST setup_lvm 1
TEST $CLI volume create $V0 $H0:$L1
TEST $CLI volume start $V0
EXPECT '' volinfo_validate 'snap-max-hard-limit'
EXPECT '' volinfo_validate 'snap-max-soft-limit'
EXPECT '' volinfo_validate 'auto-delete'
TEST $CLI snapshot config snap-max-hard-limit 100
TEST $CLI snapshot config $V0 snap-max-hard-limit 50
EXPECT '' volinfo_validate 'snap-max-hard-limit'
EXPECT '' volinfo_validate 'snap-max-soft-limit'
EXPECT '' volinfo_validate 'auto-delete'
TEST $CLI snapshot config snap-max-soft-limit 50
EXPECT '' volinfo_validate 'snap-max-hard-limit'
EXPECT '' volinfo_validate 'snap-max-soft-limit'
EXPECT '' volinfo_validate 'auto-delete'
TEST $CLI snapshot config auto-delete enable
EXPECT '' volinfo_validate 'snap-max-hard-limit'
EXPECT '' volinfo_validate 'snap-max-soft-limit'
EXPECT 'enable' volinfo_validate 'auto-delete'
cleanup;