-
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
Verifying Client Permissions #25
base: centos-ci
Are you sure you want to change the base?
Conversation
Adding CLIENT{...} in NFS-Server export file Cross checking the parameters at the client end Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
echo "SUCCESS" | ||
else | ||
echo "FAILED ON WRITING RIGHTS" | ||
#exit ret |
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.
How do these indicate failure to the test runner? Is the output parsed?
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.
@dang
Sorry, The comment line #exit ret
should be uncommentd ... :(
echo "FAILURE Since Write Permissions Were Not Blocked To The Client" | ||
#exit ret | ||
else | ||
echo "SUCCESS ON WRITE PERMISSIONS FAILURE" |
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.
If output is parsed, this says FAILURE, and so will probably trigger a failure. Either way, this message can probably be cleaned up.
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.
The output is not parsed instead the return code is checked ....
echo "FAILURE Since v4.0 Permissions Were Not Given To The Client" | ||
#exit ret | ||
else | ||
echo "SUCCESS ON v4.0 MOUNT FAILURE" |
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, here, this message should probably not say FAILURE in is. Maybe "SUCCESS - v4.0 mount correctly rejected" or something?
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.
@dang
Ok , I will fix that everywhere :)
echo "FAILURE Since v4.1 Permissions Were Not Given To The Client" | ||
#exit ret | ||
else | ||
echo "SUCCESS ON v4.1 MOUNT FAILURE" |
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.
Here too.
echo "FAILURE Since v3 Permissions Were Not Given To The Client" | ||
#exit ret | ||
else | ||
echo "SUCCESS ON v3 MOUNT FAILURE" |
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.
Here too...
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 was already done on line 46
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.
@dang
Copy-Paste Typo ... :-/
|
||
echo "=======CLIENTBLOCK=========" | ||
cat clientBlock.txt | ||
sed -i '19e cat clientBlock.txt' ${conf_file} |
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 might fail if the default config file generated by create-ganesha-export.sh changes. It might be better to look for a certain line in the file and append after it.
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.
@dang ... Yea .. got it .. :)
#Parsing export id from volume export conf file | ||
export_id=$(grep 'Export_Id' ${conf_file} | sed 's/^[[:space:]]*Export_Id.*=[[:space:]]*\([0-9]*\).*/\1/') | ||
|
||
sed -i '22s/.*/\t\tAccess_type = "RW";/' ${conf_file} |
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.
These should search-and-replace for the correct lines, I think, rather than changing a specific line by number.
#Parsing export id from volume export conf file | ||
export_id=$(grep 'Export_Id' ${conf_file} | sed 's/^[[:space:]]*Export_Id.*=[[:space:]]*\([0-9]*\).*/\1/') | ||
|
||
sed -i '23s/.*/\t\tProtocols = "4";/' ${conf_file} |
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...
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.
I don't understand what the code is trying to do, but does "ganesha_conf" script shipped with ganesha2.5 help? It should add/replace/delete existing config entries. See ./src/scripts/ganeshactl/ganesha_conf.man for details.
#Parsing export id from volume export conf file | ||
export_id=$(grep 'Export_Id' ${conf_file} | sed 's/^[[:space:]]*Export_Id.*=[[:space:]]*\([0-9]*\).*/\1/') | ||
|
||
sed -i '21s/.*/\t\tSquash = "root_squash";/' ${conf_file} |
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 these.
8d13406
to
8ed5d89
Compare
801b37d
to
c770b94
Compare
e9b2ca4
to
a09a2e5
Compare
e93af3b
to
ade304e
Compare
ade304e
to
7be933f
Compare
1a86ec1
to
1ed5d17
Compare
Adding CLIENT{...} in NFS-Server export file
Cross checking the parameters at the client end
Signed-off-by: Mohammed Azhar Padariyakam mpadariy@redhat.com