Populated with hostname and entity_id by
default, with interface for outer layers
like ceph_fuse, libcephfs to inject their
own metadata.
Signed-off-by: John Spray <john.spray@redhat.com>
...so that we can read out the mount point between init
and start() in order to feed it to Client before it connects
to the MDS.
Signed-off-by: John Spray <john.spray@redhat.com>
We have been setting it to the old head value. This is usually
harmless since the new head will virtually always be ahead of the
old head for claim_log_and_clear_rollback_info, but can cause trouble
in some edge cases.
Fixes: #9481
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
If we find a info.history.last_epoch_started above any
info.last_epoch_started, we must be missing updates and
min_last_update_acceptable should provisionally be max().
Fixes: #9482
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
Even if the backfill peer would bring us up to min_size, we can't go
active since build_prior will not consider the interval maybe_went_rw.
Fixes: #9497
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
Following sequence of events can happen.
- Client releases an inode, queues cap release message.
- A 'lookup' reply brings the same inode back, but the reply
doesn't contain xattrs because MDS didn't receive the cap release
message and thought client already has up-to-data xattrs.
The fix is force sending a getattr request to MDS if xattrs_version is 0.
The getattr mask is set to CEPH_STAT_CAP_XATTR, so MDS knows client does
not have xattr.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
* Removing tiers from a base pool in use by CephFS is forbidden.
* Using CephFS pools as tiers is forbidden.
Signed-off-by: John Spray <john.spray@redhat.com>
Fixes two things:
* EC pools are now permissible if they have a cache overlay
* Pools are not permissible if they are a cache tier.
Fixes: #9435
Signed-off-by: John Spray <john.spray@redhat.com>
The auth_cephx_key check always fails if there is a default
keyring in /etc/ceph/ available. Check if keyring exists and
fail with error message if keyring file in path.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Make sure symlinks are resolved in command_fixture()
before compare result of which command and the current
path.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
The implicit creation of a ruleset when creating a pool is convenient
when nothing is specified. However, if the caller sets a ruleset name,
it should not implicitly create it but return ENOENT instead. Silently
creating a ruleset when there is a typo in the ruleset name is
confusing.
http://tracker.ceph.com/issues/9304Fixes: #9304
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Otherwise the FDCache will keep a file descriptor to a file that was
removed from the file system. This may create various type of errors
because the OSD checking the FDCache will assume the file that contains
information for an object exists although it does not. For instance in
the following:
* rados put object file
* rm file from the primary
* repair the pg to which the object is mapped
if the FDCache is not cleared, repair will incorrectly pull a copy from
a replica and write it to the now unlinked file. Later on, it will
assume the file exists on the primary and only be partially correct :
the data can still be accessed via the file descriptor but any operation
using the path name will fail.
http://tracker.ceph.com/issues/8914Fixes: #8914
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
To get the ordered list of OSD to which an object is mapped and the name
of the corresponding PG.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
set new inode's xattr version to 1 even if it has no xattr. This allow
client to differentiate no xattr in inode from MDS skips sending xattr
to client (because MDS think client already has uptodate xattr).
Signed-off-by: Yan, Zheng <zyan@redhat.com>
This is mostly relevant in testing clusters, but it ensures that an OSD
disconnecting from the monitor at the wrong time will still see any recent
map updates and prevent accidental loss of map injection into the OSD cluster.
Fixes: #9219
Signed-off-by: Greg Farnum <greg@inktank.com>
Cancel the command op timeout event before we clear out the op from the
session struct. This isn't strictly necessary because command_op_cancel
will "gracefully" handle the case where the tid is no longer present, but
this avoids that noise and is cleaner.
Signed-off-by: Sage Weil <sage@redhat.com>
The C_CancelOp path assumes op->session != NULL. Cancel that op before
we clear it. This fixes a crash like
#0 pthread_rwlock_wrlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:39
#1 0x00007fc82690a4b1 in RWLock::get_write (this=0x18, lockdep=<optimized out>) at ./common/RWLock.h:88
#2 0x00007fc8268f4d79 in Objecter::op_cancel (this=0x1f61830, s=0x0, tid=0, r=-110) at osdc/Objecter.cc:1850
#3 0x00007fc8268ba449 in Context::complete (this=0x1f68c20, r=<optimized out>) at ./include/Context.h:64
#4 0x00007fc8269769aa in RWTimer::timer_thread (this=0x1f61950) at common/Timer.cc:268
#5 0x00007fc82697a85d in RWTimerThread::entry (this=<optimized out>) at common/Timer.cc:200
#6 0x00007fc82651ce9a in start_thread (arg=0x7fc7e3fff700) at pthread_create.c:308
Signed-off-by: Sage Weil <sage@redhat.com>
We did this forever ago with mkcephfs, but ceph-disk didn't. Note that for
modern XFS this option is obsolete, but for older kernels it was not the
default.
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>