Boris Ranto [Mon, 5 Jun 2017 16:44:18 +0000 (18:44 +0200)]
selinux: Install ceph-base before ceph-selinux
We need to have ceph-base installed before ceph-selinux to use ceph-disk
in %post script. The default ordering is random and so the installation
randomly failed to relabel the files.
Fixes: http://tracker.ceph.com/issues/20184 Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit e69086645d3411a2ed781609b670eb5f16ac4810)
Conflicts:
ceph.spec.in: No _epoch_prefix in kraken.
Boris Ranto [Fri, 26 May 2017 07:52:25 +0000 (09:52 +0200)]
rpm: Move ceph-disk to ceph-base
The SELinux package now requires the ceph-disk binary but that one was
part of the ceph-osd package. The ceph-disk python library is already
packaged in ceph-base so moving ceph-disk to ceph-base seems like a
reasonable next step.
Boris Ranto [Thu, 25 May 2017 12:36:13 +0000 (14:36 +0200)]
ceph-disk: Fix the file ownership, skip missing
This commit fixes the file ownership for the /usr/bin/ and /etc/ceph
files and skips missing files as some of the files that we do specify
now can be missing from the system (not installed, e.f. radosgw).
Boris Ranto [Thu, 16 Feb 2017 10:34:27 +0000 (11:34 +0100)]
ceph-disk: Add more fix targets
It turns out I forgot several more directories that needs to be fixed by
this script. We need to fix /var/log/ceph, /var/run/ceph and /etc/ceph
as well.
Boris Ranto [Thu, 9 Feb 2017 18:17:12 +0000 (19:17 +0100)]
ceph-disk: Add unit test for fix command
This will simulate the command* functions to not actually run anything
thus excercising the python code directly. It also checks that the
proper (sub-strings) are in the output.
Boris Ranto [Tue, 31 Jan 2017 12:19:33 +0000 (13:19 +0100)]
ceph-disk: Add fix subcommand
This subcommand will fix the SELinux labels and/or file permissions on
ceph data (/var/lib/ceph).
The command is also optimized to run the commands in parallel (per
sub-dir in /var/lib/ceph) and do restorecon and chown at the same time
to take advantage of the caching mechanisms.
Sage Weil [Fri, 5 May 2017 20:48:25 +0000 (16:48 -0400)]
messages/MCommand: fix type on decode
Wow, this has been broken since v0.38, but apparently
the message never made it into the object corpus so
we never noticed!
In reality the bug is harmless: decode_message() will
set_header which clobbers whatever version the default
ctor fills in, so this only affects ceph-dencoder's
test.
Commit d1f2c557 incorrectly changed the order of variables within
the payload. This resulted in breaking the resize RPC message
with older versions of Ceph.
Fixes: http://tracker.ceph.com/issues/19636 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 9db305a99fd945059a173f5ae8ae61744dd28615)
* LogClient: move reset_session() into get_mon_log_message() and add a
"flush" param to the latter. so it can get_mon_log_message()
atomically. otherwise another call changing the log queue could sneak
in between reset_session() and get_mon_log_message().
* MonClient: add a "flush" param to do_send() so we can reset the
LogClient session once we are connected to a monitor.
Conflicts:
src/mon/MonClient.cc: handle_auth: replaced 'log_client->reset_session();
send_log();' sequence with newly introduced 'send_log(true);' like
the original patch does
John Spray [Wed, 29 Mar 2017 18:38:37 +0000 (19:38 +0100)]
tools/cephfs: set dir_layout when injecting inodes
When we left this as zero, the MDS would interpret it was HASH_LINUX
rather than the default HASH_RJENKINS. Potentially that
could cause problems if there perhaps were already dirfrags in
the metadata pool that were set up using rjenkins. Mainly
it just seems more appropriate to explicitly set this field
rather than hit the fallback behaviour.
Related: http://tracker.ceph.com/issues/19406 Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 7d6d542885bd29b71214f9ca52bd26e9183c5d01)
John Spray [Mon, 6 Mar 2017 11:24:50 +0000 (11:24 +0000)]
mds: heartbeat_reset in dispatch
Previously we only heartbeated in tick. However, our locking is
not guaranteed to be fair, so on a super-busy dispatch queue it may be
possible for the heartbeat to time out while the tick() function
is waiting for mds_lock.
Fixes: http://tracker.ceph.com/issues/19118 Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 819394549af10532419d88742fae3a69d2ea487d)
John Spray [Wed, 1 Feb 2017 00:38:08 +0000 (00:38 +0000)]
tasks/cephfs: switch open vs. write in test_open_inode
Do the write after opening the file, so that we get good
behaviour wrt the change in Mount.open_background that uses
file existence to confirm that the open happened.
Yan, Zheng [Wed, 25 Jan 2017 07:28:23 +0000 (15:28 +0800)]
mds: don't purge strays when mds is in clientreplay state
MDS does not trim log when it's in clientreplay state. If mds hang
at clientreplay state (due to bug), purging strays can submit lots
of log events and create very large mds log.
Yan, Zheng [Wed, 25 Jan 2017 03:03:45 +0000 (11:03 +0800)]
mds: skip fragment space check for replayed request
when handling replayed request, stray directory can be different
from the stray directory used by the original request. The fragment
space check for stray directory can fail.
Greg Farnum [Wed, 14 Dec 2016 20:09:44 +0000 (12:09 -0800)]
client: fix the cross-quota rename boundary check conditions
We were previously rejecting a rename if either of the involved directories
was a quota root, even if the other directory was part of the same quota
"tree". What we really want to do is identify the correct quota root
(whether local or ancestral) for each directory and compare them. So
now we do.
Yan, Zheng [Fri, 6 Jan 2017 07:42:52 +0000 (15:42 +0800)]
mds: fix null pointer dereference in Locker::handle_client_caps
Locker::handle_client_caps delays processing cap message if the
corresponding inode is freezing or frozen. When the message gets
processed, client can have already closed the session.
Struct CapSnap holds a reference to its parent inode. So erasing
struct CapSnap from Inode::cap_snaps may drop inode's last reference.
The inode gets freed in the middle of erasing struct CapSnap
Jason Dillaman [Fri, 10 Mar 2017 15:56:38 +0000 (10:56 -0500)]
rbd: prevent adding multiple mirror peers to a single pool
The rbd-mirror daemon does not currently support replication
from multiple peers. Until that is supported, add a temporary
restriction to prevent confusion.
Fixes: http://tracker.ceph.com/issues/19256 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit c0c9d1014d57b3d5b95e7513fcc38d04b9ea5165)
Jason Dillaman [Tue, 21 Feb 2017 18:09:39 +0000 (13:09 -0500)]
rbd-mirror: object copy should always reference valid snapshots
If a remote snapshot is deleted while an image sync is in-progress,
associate the read request against the most recent, valid remote
snapshot for a given snapshot object clone.
Jason Dillaman [Fri, 20 Jan 2017 19:26:43 +0000 (14:26 -0500)]
journal: don't hold future lock during assignment
It's possible that the future raced with its owner and reaches
an empty reference count. This was resulting in the future being
destructed while its lock was still held.
Fixes: http://tracker.ceph.com/issues/18618 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0f21ceef8336e35ca16148a9d58f511037911418)
rbd: bench-write should return error if io-size >= 4G
Currently if user perform bench-write with io-size > 4G
then its crashing because currently during memory allocation
bufferptr taking size of buffer as a unsigned and io-size > 4G
will overflow with unsigned. so during memset operation it will
try to set io_size size of memory area pointed by bufferptr,
(bufferptr area is: (4G - io_size)), so it will cause
segmentation fault.
Fix is to return error if io-size >= 4G
Fixes: http://tracker.ceph.com/issues/18422 Reported-by: Jason Dillaman <dillaman@redhat.com> Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
(cherry picked from commit 6ab73e5f420e89e19b52e39dab28fa4c94e00197)
Conflicts:
PendingReleaseNotes
- drop "Calculation of recovery priorities has been updated" because
that was included in 11.2.0 release notes
- do not backport >=12.0.0 release notes
- change heading to 11.2.1