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

gfid-mismatch-dht-report.py : Avoid hardcoding of log file location #35

Open
PrasadDesala opened this issue Jul 25, 2018 · 0 comments
Open

Comments

@PrasadDesala
Copy link

We should be sending the log file location as an arg or some other way instead of hard coding in the py file.
Also, with the current code gfid-mismatch-dht-report.py is passing though it failed to get the log file location.
We are checking for ,
{
output >0 --> Mismatch of gfid
else:
ctx.ok("no gfid mismatch")

Output of the command is is returning 0 when it failed , hence the script is passing with "no gifd mismatch". May be we should add some check first if the log file is present then grep for the string.

Output snip:

grep 'gfid differs' /var/log/glusterfs/mnt.log | grep -v grep | wc -l
grep: /var/log/glusterfs/mnt.log: No such file or directory
0

gluster-health-report --run-only gfid-mismatch-dht-report

Loaded reports: gfid-mismatch-dht-report

[ OK] no gfid mismatch

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

No branches or pull requests

1 participant