Javier M. Mellid [Tue, 26 Jul 2016 12:53:44 +0000 (14:53 +0200)]
rgw: multipart uploads copy part support
Add multipart uploads copy part feature.
Fixes: http://tracker.ceph.com/issues/12790 Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
(cherry picked from commit 949480c2e9760855ed6a0501d364d5e766c8207d) Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Nathan Cutler [Sat, 3 Dec 2016 12:29:56 +0000 (13:29 +0100)]
build/ops: fix undefined crypto references with --with-xio
Only with --with-xio, RPM build fails due to undefined references to various
symbols starting with "PK11_" in ./.libs/libcommon.a(Crypto.o) in several
of the unit tests.
Loic Dachary [Fri, 18 Nov 2016 07:06:02 +0000 (08:06 +0100)]
tests: save 9 characters for asok paths
For vstart.sh powered tests, save 9 characters in the path name
by replacing testdir/test- with td/t-
60 characters imposed by jenkins
9 characters for src/test
5 characters for td/t-
33 left (instead of 24) for the test to create asok such as out/client.admin.25327.asok
Moving these files outside of the build directory is a bad idea because
tests should only create/use files within the builddir and not write
outside of this directory. Doing so would make things more complicated
for cleanup in case the test fail and create other problems as a
consequence (filling out disk space, conflicting directories between
runs etc.).
For ceph-helpers.sh tests replace testdir with td, saving 5 characters.
This is not strictly necessary but keeps the directory names consistent:
if the developer wants to get rid of all the test leftovers, it is
enough to remove the a single directory: td.
Loic Dachary [Tue, 15 Nov 2016 16:16:37 +0000 (17:16 +0100)]
mon,ceph-disk: add lockbox permissions to bootstrap-osd
ceph-disk --dmcrypt needs to put a config-key and authorize
the OSD to get it back. The corresponding permissions are
added to the bootstrap-osd profile in the monitor.
When preparing the OSD lockbox, use the bootstrap-osd profile instead of
implicitly requiring admin permissions to perform the initial config-key
and auth get-or-create operations.
Ken Dreyer [Mon, 14 Nov 2016 21:49:15 +0000 (14:49 -0700)]
ceph-disk: fix flake8 errors
flake8 3.1.1 surfaces the following issues:
ceph_disk/main.py:173:1: E305 expected 2 blank lines after class or
function definition, found 1
ceph_disk/main.py:5011:1: E305 expected 2 blank lines after class or
function definition, found 1
Mykola Golub [Thu, 10 Nov 2016 13:35:59 +0000 (15:35 +0200)]
librbd: restore journal access when force disabling mirroring
If mirroring is force disabled on a demoted image, the journal was
being left in an inconsistent ownership state.
This is a direct commit to jewel as the fix in the master was
against the newly added async version of mirror disable, which is
not going to be merged to jewel.
Casey Bodley [Wed, 9 Nov 2016 19:27:11 +0000 (14:27 -0500)]
rgw: add missing mutex header for std::once_flag
this fix was added directly to the jewel branch rather than backporting
from master, because the code on master compiles without this specific
include - it's likely included by another header, but backporting would
involve pulling in unrelated changes
Casey Bodley [Fri, 17 Jun 2016 02:51:54 +0000 (22:51 -0400)]
rgw: add pipe fd to set for select() in do_curl_wait()
when HAVE_CURL_MULTI_WAIT is 0, the pipe fd is never added to the
readfds for select(), so FD_ISSET() is always false. this prevents us
from ever trying to read from the fd, and the pipe's buffer eventually
fills up and deadlocks callers of RGWHTTPManager::signal_thread() when
they try to write to the pipe
Brad Hubbard [Fri, 7 Oct 2016 04:51:41 +0000 (14:51 +1000)]
common: Remove the runtime dependency on lsb_release
With modern releases we should be able to make do with the call to
os_release_parse only which uses /etc/os-release which should be available on
most (all?) releases we currently support. this then allows us to remove the
runtime dependency which pulls in several other packages and would be nice to
avoid.
This allows the MDS to respawn using the same executable file even if it
has since been deleted (on Linux). Otherwise, the execv fails because
the readlink returns "/path/to/deleted (deleted)". (There is no path to
the old executable.)
Fixes: http://tracker.ceph.com/issues/17531 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 66a122025f6cf023cf7b2f3d8fbe4964fb7568a7)
Zengran Zhang [Wed, 19 Oct 2016 09:05:27 +0000 (17:05 +0800)]
rgw multisite: fix the increamtal bucket sync init
in the `RGWBucketShardFullSyncCR::operate`, inc_marker will assigned with remote bilog's max_marker.
but the sync_status's inc_marker cant be assigned.so the next step inc sync will always sync
from null log,which means at beginning log.
rgw: get_zonegroup() uses "default" zonegroup if empty
Fixes: http://tracker.ceph.com/issues/17372
An empty zonegroup should be replaced with the "default" zonegroup.
This is needed when dealing with zonegroup set in old bucket info,
that predated setting the buckets' region.
Patrick Donnelly [Mon, 10 Oct 2016 22:16:16 +0000 (18:16 -0400)]
mds: use parse_filesystem in parse_role
This allows us to reuse code in parse_filesystem and avoid
get_filesystem which may fail if the fscid does not exist. This would
result in the program (mon) aborting due to the uncaught exception.
Fixes: http://tracker.ceph.com/issues/17518 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit edc78e46cee356da1e45247c38b7428dd6c965cb)
Yan, Zheng [Sat, 8 Oct 2016 07:16:40 +0000 (15:16 +0800)]
mds: fix false "failing to respond to cache pressure" warning
the false warning happens in following sequence of events
- MDS has cache pressure, sends recall state messages to clients
- Client does not trim as many caps as MDS expected. So MDS
does not reset session->recalled_at
- MDS no longer has cache pressure, it stop sending recall state
messages to clients.
- Client does not release its caps. So session->recalled_at in
MDS keeps unchanged
Yan, Zheng [Sat, 8 Oct 2016 07:16:40 +0000 (15:16 +0800)]
mds: fix false "failing to respond to cache pressure" warning
the false warning happens in following sequence of events
- MDS has cache pressure, sends recall state messages to clients
- Client does not trim as many caps as MDS expected. So MDS
does not reset session->recalled_at
- MDS no longer has cache pressure, it stop sending recall state
messages to clients.
- Client does not release its caps. So session->recalled_at in
MDS keeps unchanged
Ken Dreyer [Fri, 23 Sep 2016 20:49:56 +0000 (14:49 -0600)]
rpm: fix permissions for /etc/ceph/rbdmap
Prior to this change, the RPM packaging would install /etc/ceph/rbdmap
with exectuable permissions. The execute bit is not necessary and does
not match what the Debian packaging does. Remove the execute bit in this
case.
Fixes: http://tracker.ceph.com/issues/17395 Reported-by: Martin Bukatovic <mbukatov@redhat.com> Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit d4b84a13960f9f46593bf89dc92bfc3e54b4851e)
Yibo Cai [Fri, 17 Jun 2016 09:51:47 +0000 (17:51 +0800)]
common: Improve linux dcache hash algorithm
In ceph_str_hash_linux(), hash value is defined as unsigned long,
which is 8 bytes on 64-bit platforms when compiled with gcc. But
the return value is truncated to 4 bytes, and there's no need to
preserve 8 bytes intermediate value in the algorithm. The compiler
doesn't figure out this fact and produces redundant code.
After removing the "long" definition, this route runs much faster.
Following result are tested on x86_64 and aarch64 platforms, built
by gcc 5.3.1 with optimization level -O2. Same output is observed
with gcc 4.8.4 and -O3 optimization.
ARM Cortex-A57
+---------------+--------------+---------------+-------------+
| String Length | Time w/ long | Time w/o long | Improvement |
+---------------+--------------+---------------+-------------+
| 32 | 0.088 us | 0.067 us | 24% |
+---------------+--------------+---------------+-------------+
| 4096 | 10.26 us | 8.20 us | 20% |
+---------------+--------------+---------------+-------------+
| 65536 | 164 us | 131 us | 20% |
+---------------+--------------+---------------+-------------+
| 1048576 | 2624 us | 2099 us | 20% |
+---------------+--------------+---------------+-------------+
Intel i7-4790
+---------------+--------------+---------------+-------------+
| String Length | Time w/ long | Time w/o long | Improvement |
+---------------+--------------+---------------+-------------+
| 32 | 0.033 us | 0.028 us | 16.3% |
+---------------+--------------+---------------+-------------+
| 4096 | 3.87 us | 3.64 us | 6.2% |
+---------------+--------------+---------------+-------------+
| 65536 | 61.3 us | 57.8 us | 5.7% |
+---------------+--------------+---------------+-------------+
| 1048576 | 973 us | 917 us | 5.8% |
+---------------+--------------+---------------+-------------+