-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache invalidation Test for nfs-ganesha #29
base: centos-ci
Are you sure you want to change the base?
Conversation
Cache invalidation test for nfs-ganesha on mount v3, v4.0 and v4.1 Signed-off-by: Girjesh Rajoria <[email protected]>
cache-invalidation/client.sh
Outdated
status=$? | ||
if [ $status -ne 0 ] | ||
then | ||
echo "Failed Mounting for version 3 on client-2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should say "version $s"
cache-invalidation/server.sh
Outdated
systemctl stop firewalld || service iptables stop | ||
|
||
# TODO: SELinux prevents creating special files on Gluster bricks (bz#1331561) | ||
setenforce 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done at line 43
cmd="""ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@%s ' | ||
yum -y install curl && | ||
curl -o server2 %s && bash server2 0 0 0 %s | ||
'""" % (b['hosts'][1], server_script, b['hosts'][0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does 3rd argument b[hosts][0] represent here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry got it now by looking at server_script
exit 1 | ||
fi | ||
|
||
#Enabling ACL for the volume if ENABLE_ACL param is set to True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these checks prior to line:146
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done as https://github.com/nfs-ganesha/ci-tests/blob/centos-ci/common-scripts/basic-gluster.sh which is used by other ci-tests. Should we change there also?
# create and start gluster volume | ||
gluster peer probe $4 | ||
gluster volume create ${GLUSTER_VOLUME} \ | ||
replica 2 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a note: replica-2 volumes are being deprecated. We may have to switch to arbiter/replica-3 for all gluster ci-tests in the near future.
@@ -0,0 +1,164 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this file need to be included? I think this is a copy of the script in ../common/
, and we should preferably only have one such script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this test we need 4 machine - 2 server and 2 clients and also require to ssh multiple times to client-1 and client-2 to check cache-invalidation which is all handled from this duffy . Whereas https://github.com/nfs-ganesha/ci-tests/blob/centos-ci/common-scripts/basic-gluster-duffy.py can be used only where we require to setup one server and then run test only on one client.
@@ -0,0 +1,179 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nixpanic
This script is setting up 2 server and called thrice by duffy script to execute different parts of the script. Volume here is created with 2 nodes.
|
||
# check rtn_code and skip rest test part after failure | ||
if rtn_code == 0: | ||
versions = [3 , 4.0, 4.1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I guess the major change is here. Most of these should probably be part of the same client.sh script, which can run the tests in sequence and abort in case something fails.
The intention of this script should be to start something on the client that does the real testing. Merging test cases with the setup and test-script seem not so optimal and make maintaining these tests more complex. Please try to make this a little simpler.
You could suggest passing a space separated list of NFS_VERSIONS
environment variable from the calling test-case to this script and forward that into the client_env
to the script. Or have the script called once per value in NFS_VERSIONS
.
8b46df0
to
b6fe9ba
Compare
801b37d
to
c770b94
Compare
e9b2ca4
to
a09a2e5
Compare
e93af3b
to
ade304e
Compare
ade304e
to
7be933f
Compare
1a86ec1
to
1ed5d17
Compare
Cache invalidation test for nfs-ganesha on mount v3, v4.0 and v4.1
Signed-off-by: Girjesh Rajoria [email protected]