Bug #7424
Cannot read from zero-length file
0%
Description
Ubuntu 12.04 LTS 3.8.0-35-generic x64
Ceph 0.72.2-1precise from http://ceph.com/debian-emperor/
cluster b841459d-255a-4a9a-992a-2b1778440820
health HEALTH_OK
monmap e2: 2 mons at {}, election epoch 4, quorum 0,1 storage
mdsmap e4: 1/1/1 up {0=storage=up:active}
osdmap e13: 2 osds: 2 up, 2 in
pgmap v682: 320 pgs, 5 pools, 5120 MB data, 667 objects
10315 MB used, 235 GB / 245 GB avail
320 active+clean
On a kernel mounted cephfs I cannot read from zero-length file, it gives me 25: Operation not permitted.
- touch test_file
- stat test_file
File: `test_file'
Size: 0 Blocks: 0 IO Block: 4194304 regular empty file
Device: 0h/0d Inode: 1099511627801 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-02-14 11:14:12.499979076 +0100
Modify: 2014-02-14 11:14:12.499979076 +0100
Change: 2014-02-14 11:14:12.503081000 +0100
Birth: - - cat test_file
cat: test_file: Operation not permitted - echo 1 > test_file
- cat test_file
1
History
#1 Updated by Zheng Yan over 9 years ago
do you have selinux enabled
#2 Updated by Pavel Veretennikov over 9 years ago
Ubuntu doesn't use SELinux as I know. /selinux lib is empty, only one related selinux package is present - libselinux1.
Also tried tearing down AppArmor - same result.
#3 Updated by Zheng Yan over 9 years ago
does client have permission permission to access the data pool? try using admin's keyring to mount the fs.
#4 Updated by Pavel Veretennikov over 9 years ago
Yes, the problem resolved after I gave client access to default data pool
rwx pool=data
Strange that it worked file all the way before. Where had it stored the data?
#5 Updated by Pavel Veretennikov over 9 years ago
- Strange that it worked without permission. Where had it stored the data?
#6 Updated by Sage Weil over 9 years ago
- Status changed from New to Rejected
Pavel Veretennikov wrote:
- Strange that it worked without permission. Where had it stored the data?
It was only in memory in the client's cache. Unfortunately it is not trivial on the client to know ahead of time what pools it will be able to write to, so it is awkward to improve the overall user experience here.