Commit Graph

59248 Commits

Author SHA1 Message Date
Sage Weil
916ca6a0aa mon/OSDMonitor: encode OSDMap::Incremental with same features as OSDMap
The Incremental encode stashes encode_features, which is
what we use later to reencode the updated OSDMap.  Use
the same features so that the encoding will match!

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-21 12:27:48 -04:00
Sage Weil
f62d33c54c mon/OSDMonitor: do not encode osdmap with MSG_ADDR2 until kraken flag is set
Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-21 12:25:47 -04:00
Sage Weil
2dcb23afcb os: fix offsets in move_ranges
This simplifies the interface, and avoids problems in
bluestore with alignment.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-21 12:07:05 -04:00
Casey Bodley
b2a3d281c0 Merge pull request #11566 from oritwas/wip-rgw-put-acl-underscore
rgw: fix put_acls for objects starting and ending with underscore

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-10-21 12:00:53 -04:00
Sage Weil
0cedfafdb0 Merge pull request #11591 from liewegas/wip-bluestore-test-dev
ceph_test_objectstore: smaller device
2016-10-21 10:57:26 -05:00
Orit Wasserman
da6bfe55c6 Merge pull request #11444 from cbodley/wip-rgw-get-system-obj
rgw: get_system_obj does not use result of get_system_obj_state
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2016-10-21 17:25:17 +02:00
Sage Weil
566fb3df1a Merge pull request #11588 from xiexingguo/wip-fix-fastinfo-id
osd: fix duplicated id of incompat feature "fastinfo"

Reviewed-by: Sage Weil <sage@redhat.com>
2016-10-21 08:56:08 -05:00
Casey Bodley
32906353c3 rgw: fix for passing temporary in InitBucketSyncStatus
Fixes: http://tracker.ceph.com/issues/17661

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-10-21 09:38:50 -04:00
Yan, Zheng
a684dc5087 osdc/ObjectCacher: wake up dirty stat waiters after removing buffers
Fixes: http://tracker.ceph.com/issues/17275
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-10-21 21:36:53 +08:00
Sage Weil
27a98c4583 ceph_test_objectstore: smaller device
This is faster.  The bitmap has to be scanned during
startup and fsck and that's slow.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-10-21 09:17:30 -04:00
John Spray
ace4abbee5 messages: fix out of range assertion
When clang uses an 8 bit type for the enum, it
complains (out of range) if comparing <256,
and complains (tautological) if comparing <=256.

Avoid this by explicitly making the enum an
uint8_t, and just asserting that that it has
that size at the point that we assume so for
the encoding (in case someone modified the
type definition without checking how it was used).

Signed-off-by: John Spray <john.spray@redhat.com>
2016-10-21 11:38:19 +01:00
John Spray
9a961e607a mds: repair backtraces during scrub
Fixes: http://tracker.ceph.com/issues/17639
Signed-off-by: John Spray <john.spray@redhat.com>
2016-10-21 11:34:55 +01:00
Javeme
ef14b7b760 osd/command tell: check pgid at the right time
Run a command: "ceph tell osd.0 query", and it outputs the following
error message:
  Error EINVAL: unrecognized command! [{"prefix": "query"}]

In fact, the command "query" exists, but it requires one more input
parameter "pgid", therefore the following error information will be
more appropriate:
  Error EINVAL: no pgid specified

In this patch, we check the parameter pgid after recognizing a command
(like "query" or "list_missing"), rather than before it.

Signed-off-by: Javeme <javaloveme@gmail.com>
2016-10-21 18:23:56 +08:00
Yan, Zheng
7596f4b76a mds: fix CDir::log_mark_dirty()
CDir::log_mark_dirty() moves dirfrag to current log segment's dirty
dirfrag list, but it does not submit any log event. Old log segments
(that include events which dirty the dirfrag) may get expired before
the dirfrag gets committed. If MDS crashes, the changes in expired
log segments get lost.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-10-21 14:40:53 +08:00
Yan, Zheng
d07e90a59b mds: avoid wrapping contexts during logging
For each log event, mds allocate two extra contexts, one for
marking op tracker event, one for updating log's safe_pos after
executing the finish context. This is sub-optimization.

This patch defines MDSLogContextBase for log event context.
MDSLogContextBase::complete() function can do the extra jobs.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-10-21 14:40:53 +08:00
Yan, Zheng
42b7790a59 mds: avoid wrapping C_IO_Wrapper with C_OnFinisher
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-10-21 14:40:49 +08:00
Kefu Chai
eb9cf0bda0 Merge pull request #11575 from ceph/wip-17260
cmake: link tests against static librados

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Ali Maredia <amaredia@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-10-21 11:54:53 +08:00
xiexingguo
26648cf2ac Merge pull request #10490 from Yan-waller/yj-wip-msgtest-0729
msg/test: fix the guided compile-command to ceph_test_msgr

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-10-21 11:01:32 +08:00
xie xingguo
0828974a75 osd: fix duplicated id of incompat feature "fastinfo"
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-10-21 10:38:23 +08:00
Sage Weil
3b6e11a681 Merge pull request #11436 from chhabaramesh/master
kv/MemDB: making memdb code adapt to generic maps

Reviewed-by: Sage Weil <sage@redhat.com>
2016-10-20 20:26:16 -05:00
John Spray
6345036230 Merge pull request #11455 from stiopaa1/mds_mutation_simplifyConstructors
mds/Mutation.h: simplify constructors

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-10-20 23:55:17 +02:00
John Spray
b59e7f972d Merge pull request #11509 from stiopaa1/mds_fsmapuser_makeAssignCopyDefault
mds/FSMapUser.h: remove copy ctr and assign op

Reviewed-by: John Spray <john.spray@redhat.com>
2016-10-20 23:43:58 +02:00
Yuri Weinstein
d9489d1ad6 Merge pull request #10359 from songbaisen/b11
mon:  paxos add the timeout function when peon recovery

Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2016-10-20 14:34:34 -07:00
Yuri Weinstein
b79ed1c2bd Merge pull request #11165 from xiexingguo/xxg-wip-throttle-0921
common/throttle: simplify Throttle::_wait()

Reviewed-by: Sage Weil <sage@redhat.com>
2016-10-20 14:33:08 -07:00
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