Commit Graph

59280 Commits

Author SHA1 Message Date
John Spray
cac3de0416 Merge pull request #11583 from stiopaa1/mds_snapserver_addOverride
mds/SnapServer.h: add override to virtual functs

Reviewed-by: John Spray <john.spray@redhat.com>
2016-10-20 23:21:28 +02:00
John Spray
9ebdacac45 Merge pull request #11523 from stiopaa1/mds_migrator_removeUnneededCount
mds/Migrator.cc: remove unneeded use of count

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-10-20 23:14:58 +02:00
John Spray
9563eb24f9 Merge pull request #11543 from batrick/cdir-unique-ptr
mds: use unique_ptr to simplify resource mgmt

Reviewed-by: John Spray <john.spray@redhat.com>
2016-10-20 23:14:26 +02:00
Casey Bodley
5462ad591a Merge pull request #11581 from yehudasa/wip-17635
rgw: handle empty POST condition

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-10-20 17:14:06 -04:00
John Spray
17197fc67e Merge pull request #11565 from stiopaa1/mds_sessionmap_removeUnneededFunction
mds/SessionMap.h: remove unneeded function

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-10-20 23:04:17 +02:00
Yehuda Sadeh
23cb642243 rgw: handle empty POST condition
Fixes: http://tracker.ceph.com/issues/17635

Before accessing json entity, need to check that iterator is valid.
If there is no entry return appropriate error code.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-20 12:30:49 -07:00
Michal Jarzabek
b0967da752 mds/SnapServer.h: add override to virtual functs
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
2016-10-20 20:03:30 +01:00
Yehuda Sadeh
4e4feb07ab Merge pull request #11580 from cbodley/wip-rgw-deadlock-dump-crs
rgw: dump remaining coroutines when cr deadlock is detected

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-20 11:36:51 -07:00
Patrick Donnelly
ff0e521434
core: set dumpable flag after setuid
When ceph-* drops drops privileges via setuid, core dumps are no longer
generated because its DUMPABLE flag is cleared. We have to manually
turn that back on.

From prctl(2):

      Normally, this flag is set to 1.  However, it is reset to the current value contained in the file /proc/sys/fs/suid_dumpable (which by default has the value 0), in the fol‐
      lowing circumstances:

      *  The process's effective user or group ID is changed.

      *  The process's filesystem user or group ID is changed (see credentials(7)).

      *  The process executes (execve(2)) a set-user-ID or set-group-ID program, or a program that has capabilities (see capabilities(7)).

Fixes: http://tracker.ceph.com/issues/17650

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2016-10-20 14:19:06 -04:00
Gregory Farnum
71d4043087 Merge pull request #11526 from ukernel/wip-17591
client: get caller's uid/gid on every libcephfs operation

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-10-20 09:39:00 -07:00
Casey Bodley
d66dfa2b32 rgw: dump remaining coroutines when cr deadlock is detected
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-10-20 11:21:28 -04:00
Casey Bodley
d77fae5ed5 Merge pull request #11553 from Aran85/wip-datasync-status
rgw multisite: fix the increamtal bucket sync init

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-10-20 11:13:07 -04:00
Kefu Chai
0071890ab3 Merge pull request #11577 from jcsp/wip-17636
denc: don't pass null instances into encoder fns

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-20 22:50:20 +08:00
John Spray
9863d79a99 include/fs_types: fix crash in inodeno_t encode
Passing by value tries to copy from a null and segfaults.

Fixes: http://tracker.ceph.com/issues/17636
Signed-off-by: John Spray <john.spray@redhat.com>
2016-10-20 15:33:30 +01:00
Loic Dachary
dcb0ab1eb5 Merge pull request #11055 from gcharot/ceph-lazy
Adding ceph-lazy tool

Reviewed-by: Sébastien Han <han.sebastien@gmail.com>
2016-10-20 16:21:34 +02:00
Loic Dachary
bcae438414 Merge pull request #8316 from dx9/wip-ceph-detect-init
ceph_detect_init: add support for Alpine

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-10-20 13:02:44 +02:00
Yan, Zheng
3c3f7a1daf mds: add debug assertion for issue #17636
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-10-20 17:42:08 +08:00
Venky Shankar
e5bed548e8 Merge pull request #11520 from dillaman/wip-17590
journal: do not prematurely flag object recorder as closed
2016-10-20 14:56:50 +05:30
Kefu Chai
ebe88ca8a8 Merge pull request #11480 from dillaman/wip-17566
test: TestJournalReplay test cases need to wait for event commit

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2016-10-20 17:13:15 +08:00
Kefu Chai
e777200258 test/encoding: do not include unused headers
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 16:58:04 +08:00
Kefu Chai
16dda30d59 cmake: link against rados_a instead of its objs
prior to this change, librbd tests link against librados_api_obj and
librados_objs, but since librados_a offers all the goodies, we can
just link against it instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 16:58:04 +08:00
Kefu Chai
f28481a5f5 cmake: librados depends on osdc implicitly
so no need to put add_dependencies() explicitly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 16:58:03 +08:00
Kefu Chai
84d1f04f11 cmake: do not link against global if not necessary
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 16:58:03 +08:00
Kefu Chai
711b394481 cmake: link tests against static librados
Fixes: http://tracker.ceph.com/issues/17260
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 16:58:03 +08:00
Kefu Chai
8362c5f1cf cmake: always create static lib librados_a
so tests referencing internal symbols can use librados_a instead of
librados to avoid violating ODR (one definition rule).

Fixes: http://tracker.ceph.com/issues/17260
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 16:54:10 +08:00
Javeme
ce0d9e41fe pybind: return a tuple in run_in_thread() if interrupted
Callers expect run_in_thread() to return a tuple, but it
returns an int. When interrupt the function it would raise
an iterable exception.

This patch fix the bug, and it would just output a message
like: "Error EINTR: Interrupted!"

Signed-off-by: Javeme <javaloveme@gmail.com>
2016-10-20 16:34:51 +08:00
Kefu Chai
3898dc0123 doc: reindent SubmittingPatches
otherwise the content will be rendered as block quotation.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 12:13:52 +08:00
Kefu Chai
f40296165f doc: reformat SubmittingPatches with more rst syntax
* group some paragraphs into sections, so we can link to them via its
  html anchor.
* remove unrelated contents.
* add cross-refs.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-10-20 11:54:10 +08:00
Jason Dillaman
60c008d4df Merge pull request #11175 from asheplyakov/wip-rbd-default-features
librbd: parse rbd_default_features config option as a string

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-10-19 21:25:41 -04:00
Zengran Zhang
0d928c2640 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.

Fixes: http://tracker.ceph.com/issues/17624

Signed-off-by: Zengran Zhang <zhangzengran@h3c.com>
2016-10-20 09:18:27 +08:00
Yehuda Sadeh
48bb2cd703 Merge pull request #11567 from ceph/wip-master-rgw-0lenfix2
Don't loop forever when reading data from 0 sized segment.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 16:31:35 -07:00
Marcus Watts
46c5f97732 Don't loop forever when reading data from 0 sized segment.
The 0 sized segment can arise depending on how
the client uploads the object in the first place.
The cpu loop then happens during a swift `GET'.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
2016-10-19 19:24:46 -04:00
John Spray
c83cb7a11d tools/cephfs: add pg_files command
Sometimes users know that particular data pool PGs
have been damaged, and they would like to scan
their files to work out which ones might have
been affected.

Fixes: http://tracker.ceph.com/issues/17249
Signed-off-by: John Spray <john.spray@redhat.com>
2016-10-19 23:06:41 +01:00
John Spray
7861a84b75 libcephfs: take ref when constructed with CephContext
Previously, if you used ceph_create_with_context, then
it would try and destroy your context when you called
ceph_release.  Bad behaviour: caller created the
context, caller should decide when to destroy it.

Signed-off-by: John Spray <john.spray@redhat.com>
2016-10-19 23:03:13 +01:00
Orit Wasserman
14d4d912c7 rgw: fix put_acls for objects starting and ending with underscore
Fixes: http://tracker.ceph.com/issues/17625
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
2016-10-19 21:56:04 +02:00
John Spray
cb827316bf Merge pull request #11541 from stiopaa1/mds_sessionmap_addConst
mds/SessionMap: add const to member functions

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-10-19 21:15:18 +02:00
Sage Weil
255432e777 unittest_bluestore_types: add random put_ref test case
This appeared to fail under load, but works fine here.
:/

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-19 14:13:20 -04:00
Sage Weil
fcd6796c66 unittest_bluestore_types: fix gc tests
In ef8989ce74 we disabled
gc for non-compressed blobs.  So mark these test ones as
compressed.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-19 14:12:42 -04:00
Jason Dillaman
039716db05 librbd: exclusive lock incorrectly initialized when switching to HEAD
Fixes: http://tracker.ceph.com/issues/17618
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-10-19 12:03:37 -04:00
Yehuda Sadeh
91ed1216d7 rgw_admin: add a few admin commands to the usage
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:50 -07:00
Yehuda Sadeh
aaf0d213eb rgw_admin: add bi purge command
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:50 -07:00
Yehuda Sadeh
e2b8dc6113 rgw: bucket resharding, adjust logging
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:49 -07:00
Yehuda Sadeh
47f422a4e0 cls/rgw: bi_list() fix is_truncated returned param
is_truncated was never set. Also, make sure that we don't return
more entries than requested.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:49 -07:00
Yehuda Sadeh
75da4375ee rgw_admin: require --yes-i-really-mean-it for bucket reshard
in the case where num shards are less or equal to current bucket

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:49 -07:00
Yehuda Sadeh
ac88b5d9e6 rgw_admin: better bucket reshard logging
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:49 -07:00
Yehuda Sadeh
d9c88afec4 rgw: limit bucket reshard num shards to max possible
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:49 -07:00
Yehuda Sadeh
716d096bbb rgw_admin: fix bi list command
Changes scoping of json section, and push the --object param in so that
an object can be specified as a filter.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:48 -07:00
Yehuda Sadeh
97e7ee9ca2 rgw_admin: use aio operations for bucket resharding
also created shards manager to make things slightly cleaner

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:48 -07:00
Yehuda Sadeh
dd712384ff rgw: bucket reshard updates stats
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:48 -07:00
Yehuda Sadeh
4cc7d3a33a cls/rgw: add bucket_update_stats method
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-10-19 08:41:48 -07:00