Douglas Schilling Landgraf has posted comments on this change.
Change subject: nfs-check: check if temp dir exists
......................................................................
Patch Set 4: (3 inline comments)
....................................................
File contrib/nfs-check.py
Line 29: TMPDIR = "/tmp"
heehe indeed.
Line 249: tempfile.tempdir = TMPDIR
Please see below.
Line 254: LOCALPATH = tempfile.mkdtemp()
Currently, nfs-check already share the cause of the problem with error like
"Permission denied". What about if we don't find /tmp or /var/tmp
(following FHS) we set the 1777 (as tmp dir) permissions to the random path?
Here an example of directory creation when there is no /tmp and/or /var/tmp:
# ls -la .
drwx------ 2 root root 4096 Mar 29 22:39 tmpUvzCBb
Note: When users doesn't have /tmp or /var/tmp the next path will be current path.
Here an example of executing without /tmp and /var/tmp:
# sudo python nfs-check.py 192.168.1.218:/storage
Executing NFS tests..
/home/dougsland/tmpDIR/vdsm/contrib/tmp4SxUXi
Permission denied: vdsm user as kvm cannot create a file into
/home/dougsland/tmpDIR/vdsm/contrib/tmp4SxUXi
Suggestions: please verify the permissions of target (chmod or/and selinux booleans)
return = 1 error msg = /bin/touch: cannot touch
`/home/dougsland/tmpDIR/vdsm/contrib/tmp4SxUXi/vdsmTest': Permission denied
Status of tests [Failed]
Disconnecting from NFS Server..
Done!
Please let me know your opinion.
Thanks!
--
To view, visit
http://gerrit.ovirt.org/3167
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If364f703b1ab2223d194c4e300da824e0696d50b
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>