Response header of Swift API returned by radosgw does not contain
"x-openstack-request-id", but Swift returns it. Enhance the
compatibility of radosgw.
Fixes: http://tracker.ceph.com/issues/19443 Signed-off-by: tone-zhang <tone.zhang@linaro.org>
(cherry picked from commit e96db213079ab5e026156ab4b38418d1d4c23d27)
Merge pull request #16069 from smithfarm/wip-20345-kraken
kraken: make check fails with Error EIO: load dlopen(build/lib/libec_FAKE.so): build/lib/libec_FAKE.so: cannot open shared object file: No such file or directory
qa/workunits/ceph-helpers: do not error out if is_clean
it would be a race otherwise, because we cannot be sure that the cluster
pgs are not all clean or not when run_osd() returns, but we can be sure
that they are expected to active+clean after a while. that's what
wait_for_clean() does.
Nathan Cutler [Fri, 23 Jun 2017 06:27:42 +0000 (08:27 +0200)]
tests: move swift.py task to qa/tasks
In preparation for moving this task from ceph/teuthology.git into ceph/ceph.git
The move is necessary because jewel-specific changes are needed, yet teuthology
does not maintain a separate branch for jewel. Also, swift.py is a
Ceph-specific task so it makes more sense to have it in Ceph.
Marcus Watts [Wed, 11 Jan 2017 05:06:15 +0000 (00:06 -0500)]
radosgw/swift: clean up flush / newline behavior.
The current code emits a newline after swift errors, but fails
to account for it when it calculates 'content-length'. This results in
some clients (go github.com/ncw/swift) producing complaints about the
unsolicited newline such as this,
Unsolicited response received on idle HTTP channel starting with "\n"; err=<nil>
This logic eliminates the newline on flush. This makes the content length
calculation correct and eliminates the stray newline.
There was already existing separator logic in the rgw plain formatter
that can emit a newline at the correct point. It had been checking
"len" to decide if previous data had been emitted, but that's reset to 0
by flush(). So, this logic adds a new per-instance variable to separately
track state that it emitted a previous item (and should emit a newline).
Fixes: http://tracker.ceph.com/issues/18473 Signed-off-by: Marcus Watts <mwatts@redhat.com> Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 5f229d6a33eae4906f22cdb90941835e47ee9f02)
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)