summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@gmail.com>2016-01-14 15:07:47 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2016-02-18 06:31:44 -0800
commitcc4f0697d705463f7907e8179a26bfd8d09745e3 (patch)
tree232ab7f6e01551619509c6df14dfebfa396e33b6
parentf65fa300a227c1854ebe90ec0976473fba7b37fa (diff)
tests : Modifying crypt xlators unit tests
Backport of http://review.gluster.org/#/c/13240/ The "encryption.master-key" should be set before enabling crypt xlators. Otherwise glusterfs client process(like gluster-NFS) will crash due to the failure in intialising crypt xlator. You can see the following messages in client log file [2016-01-14 08:13:15.740835] E [crypt.c:4298:master_set_master_vol_key] 0-test1-crypt: FATAL: missing master key [2016-01-14 08:13:15.740859] E [MSGID: 101019] [xlator.c:429lator_init] 0-test1-crypt: Initialization of volume 'test1-crypt' failed, review your volfile again [2016-01-14 08:13:15.740890] E [MSGID: 101066] [graph.c:324:glusterfs_graph_init] 0-test1-crypt: initializing translator failed [2016-01-14 08:13:15.740904] E [MSGID: 101176] [graph.c:670:glusterfs_graph_activate] 0-graph: init failed [2016-01-14 08:13:15.741676] W [glusterfsd.c:1231:cleanup_and_exit] (-->/usr/sbin/glusterfs(mgmt_getspec_cbk+0x307) [0x40d287] -->/usr/sbin/glusterfs(glusterfs_process_volfp+0x117) [0x4086c7] -->/usr/sbin/glusterfs(cleanup_and_exit+0x4d) [0x407e1d] ) 0-: received signum (0), shutting down Upstream reference ------------------- >Change-Id: I124deda505d128eacb15ca20fbdcd1593cb8eba3 >BUG: 1298520 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/13240 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Niels de Vos <ndevos@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >(cherry picked from commit ca4d4a26a553bac9c627bc6e6d6c9fa1f9435297) Change-Id: Ibe0b7e99e7125d9365d6cedf55d8649c86108b41 BUG: 1308806 Reviewed-on: http://review.gluster.org/13453 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: jiffin tony Thottan <jthottan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
-rwxr-xr-xtests/encryption/crypt.t14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/encryption/crypt.t b/tests/encryption/crypt.t
index ecfe005202d..ef347f6c859 100755
--- a/tests/encryption/crypt.t
+++ b/tests/encryption/crypt.t
@@ -23,16 +23,16 @@ EXPECT 'off' volinfo_field $V0 'performance.write-behind'
TEST $CLI volume set $V0 performance.open-behind off
EXPECT 'off' volinfo_field $V0 'performance.open-behind'
-## Turn on crypt xlator by setting features.encryption to on
-TEST $CLI volume set $V0 encryption on
-EXPECT 'on' volinfo_field $V0 'features.encryption'
+## Create a file with master key
-## Specify location of master key
-TEST $CLI volume set $V0 encryption.master-key /tmp/$V0-master-key
+echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" > $GLUSTERD_WORKDIR/$V0-master-key
-## Create a file with master key
+## Specify location of master key
+TEST $CLI volume set $V0 encryption.master-key $GLUSTERD_WORKDIR/$V0-master-key
-echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" > /tmp/$V0-master-key
+## Turn on crypt xlator by setting features.encryption to on
+TEST $CLI volume set $V0 encryption on
+EXPECT 'on' volinfo_field $V0 'features.encryption'
## Start the volume
TEST $CLI volume start $V0;