From 00e247ee44067f2b3e7ca5f7e6dc2f7934c97181 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Pradhan Date: Wed, 9 Apr 2014 10:19:43 +0530 Subject: gNFS: Support wildcard in RPC auth allow/reject RFE: Support wildcard in "nfs.rpc-auth-allow" and "nfs.rpc-auth-reject". e.g. *.redhat.com 192.168.1[1-5].* 192.168.1[1-5].*, *.redhat.com, 192.168.21.9 Along with wildcard, support for subnetwork or IP range e.g. 192.168.10.23/24 The option will be validated for following categories: 1) Anonymous i.e. "*" 2) Wildcard pattern i.e. string containing any ('*', '?', '[') 3) IPv4 address 4) IPv6 address 5) FQDN 6) subnetwork or IPv4 range Currently this does not support IPv6 subnetwork. Change-Id: Iac8caf5e490c8174d61111dad47fd547d4f67bf4 BUG: 1086097 Signed-off-by: Santosh Kumar Pradhan Reviewed-on: http://review.gluster.org/7485 Reviewed-by: Poornima G Reviewed-by: Harshavardhana Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/bugs/bug-822830.t | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/bugs/bug-822830.t b/tests/bugs/bug-822830.t index 000d99f03..b7a5704cd 100755 --- a/tests/bugs/bug-822830.t +++ b/tests/bugs/bug-822830.t @@ -18,18 +18,38 @@ EXPECT 'Created' volinfo_field $V0 'Status'; TEST $CLI volume start $V0; EXPECT 'Started' volinfo_field $V0 'Status'; -## Setting nfs.rpc-auth-reject as 192.*..* -TEST ! $CLI volume set $V0 nfs.rpc-auth-reject 192.*..* +## Setting nfs.rpc-auth-reject as 192.{}.1.2 +TEST ! $CLI volume set $V0 nfs.rpc-auth-reject 192.{}.1.2 EXPECT '' volinfo_field $V0 'nfs.rpc-auth-reject'; # Setting nfs.rpc-auth-allow as a.a. TEST ! $CLI volume set $V0 nfs.rpc-auth-allow a.a. EXPECT '' volinfo_field $V0 'nfs.rpc-auth-allow'; +## Setting nfs.rpc-auth-reject as 192.*..* +TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.*..* +EXPECT '192.*..*' volinfo_field $V0 'nfs.rpc-auth-reject'; + # Setting nfs.rpc-auth-allow as a.a TEST $CLI volume set $V0 nfs.rpc-auth-allow a.a EXPECT 'a.a' volinfo_field $V0 'nfs.rpc-auth-allow'; +# Setting nfs.rpc-auth-allow as *.redhat.com +TEST $CLI volume set $V0 nfs.rpc-auth-allow *.redhat.com +EXPECT '\*.redhat.com' volinfo_field $V0 'nfs.rpc-auth-allow'; + +# Setting nfs.rpc-auth-allow as 192.168.10.[1-5] +TEST $CLI volume set $V0 nfs.rpc-auth-allow 192.168.10.[1-5] +EXPECT '192.168.10.\[1-5]' volinfo_field $V0 'nfs.rpc-auth-allow'; + +# Setting nfs.rpc-auth-allow as 192.168.70.? +TEST $CLI volume set $V0 nfs.rpc-auth-allow 192.168.70.? +EXPECT '192.168.70.?' volinfo_field $V0 'nfs.rpc-auth-allow'; + +# Setting nfs.rpc-auth-reject as 192.168.10.5/16 +TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.168.10.5/16 +EXPECT '192.168.10.5/16' volinfo_field $V0 'nfs.rpc-auth-reject'; + ## Setting nfs.rpc-auth-reject as 192.*.* TEST $CLI volume set $V0 nfs.rpc-auth-reject 192.*.* EXPECT '192.*.*' volinfo_field $V0 'nfs.rpc-auth-reject'; -- cgit From 9c13471b109587a639662fc690384285bee02bc6 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Wed, 23 Apr 2014 15:53:41 +0000 Subject: tests: print info about failed tests It's a bit frustrating to run a test normally (e.g. during development), see a failure, and then have to re-run it with DEBUG=1 to see what actually failed. This tiny patch prints out the command line of the test that just failed, even if DEBUG=0 (in fact only if DEBUG=0 since otherwise it would be redundant). Change-Id: Icffa096d0bcc6f35176f0e47d9d1bc538698ca2c Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.org/7537 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/include.rc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/include.rc b/tests/include.rc index 452e6d7ca..35b0ddd5d 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -40,6 +40,7 @@ function test_header() { dbg "========================="; dbg "TEST $t (line $TESTLINE): $*"; + saved_cmd="$*" } @@ -52,6 +53,10 @@ function test_footer() echo "ok $t"; else echo "not ok $t $err"; + # With DEBUG, this was already printed out, so skip it. + if [ x"$DEBUG" = x"0" ]; then + echo "FAILED COMMAND: $saved_cmd" + fi if [ "$EXIT_EARLY" = "1" ]; then exit $RET fi -- cgit From a3cb38e3edf005bef73da4c9cfd958474a14d50f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 17 Apr 2014 15:54:34 -0700 Subject: build: MacOSX Porting fixes git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs Working functionality on MacOSX - GlusterD (management daemon) - GlusterCLI (management cli) - GlusterFS FUSE (using OSXFUSE) - GlusterNFS (without NLM - issues with rpc.statd) Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac BUG: 1089172 Signed-off-by: Harshavardhana Signed-off-by: Dennis Schafroth Tested-by: Harshavardhana Tested-by: Dennis Schafroth Reviewed-on: http://review.gluster.org/7503 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/basic/pgfid-feat.t | 3 +-- tests/basic/volume-snapshot.t | 3 ++- tests/bugs/bug-1045333.t | 1 + tests/bugs/bug-1049834.t | 2 +- tests/snapshot.rc | 8 +++++++- 5 files changed, 12 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/basic/pgfid-feat.t b/tests/basic/pgfid-feat.t index 8784cc7bf..3978f9c97 100644 --- a/tests/basic/pgfid-feat.t +++ b/tests/basic/pgfid-feat.t @@ -24,11 +24,10 @@ TEST $CLI volume set $V0 build-pgfid on; TEST mkdir $M0/a; TEST touch $M0/a/b; -getfattr -e text -n glusterfs.ancestry.path "$M0/a/b" | grep "^glusterfs.ancestry.path" | cut -d"=" -f2 | tr -d \"; EXPECT "/a/b" get_ancestry_path "/a/b"; TEST $CLI volume set $V0 build-pgfid off; -TEST ! getfattr -e text -n "glusterfs.ancestry.path" $M0/a/b; +EXPECT "" get_ancestry_path "/a/b"; TEST $CLI volume stop $V0; TEST $CLI volume delete $V0; diff --git a/tests/basic/volume-snapshot.t b/tests/basic/volume-snapshot.t index c826631ca..e6c47f0d5 100755 --- a/tests/basic/volume-snapshot.t +++ b/tests/basic/volume-snapshot.t @@ -5,6 +5,7 @@ . $(dirname $0)/../cluster.rc . $(dirname $0)/../snapshot.rc + V1="patchy2" function create_volumes() { @@ -48,6 +49,7 @@ function restore_snapshots() { } cleanup; +TEST verify_lvm_version; #Create cluster with 3 nodes TEST launch_cluster 3; TEST setup_lvm 3 @@ -92,4 +94,3 @@ TEST ! volume_exists $V0 TEST ! volume_exists $V1 cleanup; - diff --git a/tests/bugs/bug-1045333.t b/tests/bugs/bug-1045333.t index 8f4798ebc..f5985d29c 100755 --- a/tests/bugs/bug-1045333.t +++ b/tests/bugs/bug-1045333.t @@ -4,6 +4,7 @@ . $(dirname $0)/../snapshot.rc cleanup; +TEST verify_lvm_version; TEST glusterd; TEST pidof glusterd; diff --git a/tests/bugs/bug-1049834.t b/tests/bugs/bug-1049834.t index c1b126ba1..eea3297ed 100755 --- a/tests/bugs/bug-1049834.t +++ b/tests/bugs/bug-1049834.t @@ -6,7 +6,7 @@ . $(dirname $0)/../snapshot.rc cleanup; - +TEST verify_lvm_version TEST launch_cluster 2 TEST setup_lvm 2 diff --git a/tests/snapshot.rc b/tests/snapshot.rc index 440059fc1..87ea0df91 100755 --- a/tests/snapshot.rc +++ b/tests/snapshot.rc @@ -46,6 +46,13 @@ function init_lvm() { return 0 } +function verify_lvm_version() { + if `/sbin/lvcreate --help | grep -q thin`; then + return 0; + fi + return 1; +} + function setup_lvm() { init_lvm $@ || return 1 _setup_lvm @@ -287,4 +294,3 @@ function volume_exists() { return 0 fi } - -- cgit From d2cdc392accdd35995370ee5b52aee5e5af7dee4 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sun, 27 Apr 2014 15:03:58 +0200 Subject: Update references to the maillinglist to gluster-devel@gluster.org gluster-devel@nongnu.org has moved to gluster-devel@gluster.org. All occurrences in the current (non legacy) documentation and code have been adjusted. Change-Id: I053162e633f7ea14fd3eed239ded017df165147c BUG: 1091705 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/7573 Reviewed-by: Justin Clift Reviewed-by: Anand Avati Tested-by: Anand Avati --- tests/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/README.md b/tests/README.md index 2b5ed8dcd..3a1406f6f 100644 --- a/tests/README.md +++ b/tests/README.md @@ -21,7 +21,7 @@ Regression tests framework for GlusterFS - Execute `/usr/share/glusterfs/run-tests.sh` as root. - If some test cases fail, report to GlusterFS community at - `gluster-devel@nongnu.org`. + `gluster-devel@gluster.org`. ## Reminder -- BE WARNED THAT THE TEST CASES DELETE /var/lib/glusterd/* !!! \ No newline at end of file +- BE WARNED THAT THE TEST CASES DELETE /var/lib/glusterd/* !!! -- cgit