Skip to content
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

Open
wants to merge 4 commits into
base: centos-ci
Choose a base branch
from

Conversation

grajoria
Copy link

Cache invalidation test for nfs-ganesha on mount v3, v4.0 and v4.1

Signed-off-by: Girjesh Rajoria [email protected]

Cache invalidation test for nfs-ganesha on mount v3, v4.0 and v4.1

Signed-off-by: Girjesh Rajoria <[email protected]>
status=$?
if [ $status -ne 0 ]
then
echo "Failed Mounting for version 3 on client-2"
Copy link

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"

systemctl stop firewalld || service iptables stop

# TODO: SELinux prevents creating special files on Gluster bricks (bz#1331561)
setenforce 0
Copy link

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])
Copy link

@soumyakoduri soumyakoduri Nov 30, 2017

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?

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

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

Copy link
Author

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 \

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 @@
#

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.

Copy link
Author

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this script?

Copy link
Author

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]

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.

@rakshithakamath94 rakshithakamath94 force-pushed the centos-ci branch 20 times, most recently from 8b46df0 to b6fe9ba Compare June 19, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants