This is an automated email from the git hooks/post-receive script.
teigland pushed a change to branch master in repository sanlock.
from 5e1eaa0 Lack : separator between host_id and path on locksapce format. new b90eaeb sanlock: expand access error message
The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference.
Summary of changes: src/diskio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master in repository sanlock.
commit b90eaeb3bcff444e61ef889ad57c61fa3bd35b29 Author: David Teigland teigland@redhat.com Date: Tue Oct 17 12:57:22 2017 -0500
sanlock: expand access error message
Make it easier to recognize disk/file permission errors. --- src/diskio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/diskio.c b/src/diskio.c index 4025f94..57fcaa5 100644 --- a/src/diskio.c +++ b/src/diskio.c @@ -124,7 +124,12 @@ int open_disks_fd(struct sync_disk *disks, int num_disks) fd = open(disk->path, O_RDWR | O_DIRECT | O_SYNC, 0); if (fd < 0) { rv = -errno; - log_error("open error %d %s", fd, disk->path); + if (rv == -EACCES) { + log_error("open error %d EACCES: no permission to open %s", rv, disk->path); + log_error("check that daemon user %s %d group %s %d has access to disk or file.", + com.uname, com.uid, com.gname, com.gid); + } else + log_error("open error %d %s", fd, disk->path); continue; }
@@ -159,7 +164,12 @@ int open_disk(struct sync_disk *disk) fd = open(disk->path, O_RDWR | O_DIRECT | O_SYNC, 0); if (fd < 0) { rv = -errno; - log_error("open error %d %s", rv, disk->path); + if (rv == -EACCES) { + log_error("open error %d EACCES: no permission to open %s", rv, disk->path); + log_error("check that daemon user %s %d group %s %d has access to disk or file.", + com.uname, com.uid, com.gname, com.gid); + } else + log_error("open error %d %s", rv, disk->path); goto fail; }
sanlock-devel@lists.fedorahosted.org