Project

General

Profile

Actions

Bug #7424

closed

Cannot read from zero-length file

Added by Pavel Veretennikov about 10 years ago. Updated about 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.

  1. touch test_file
  2. 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: -
  3. cat test_file
    cat: test_file: Operation not permitted
  4. echo 1 > test_file
  5. cat test_file
    1
Actions #1

Updated by Zheng Yan about 10 years ago

do you have selinux enabled

Actions #2

Updated by Pavel Veretennikov about 10 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.

Actions #3

Updated by Zheng Yan about 10 years ago

does client have permission permission to access the data pool? try using admin's keyring to mount the fs.

Actions #4

Updated by Pavel Veretennikov about 10 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?

Actions #5

Updated by Pavel Veretennikov about 10 years ago

  • Strange that it worked without permission. Where had it stored the data?
Actions #6

Updated by Sage Weil about 10 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.

Actions

Also available in: Atom PDF