Commit Graph

32147 Commits

Author SHA1 Message Date
Sage Weil
f8632699b1 Merge pull request #1490 from ceph/wip-6806
mon: Properly handle errors from 'cmd_getval()' when needed

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-18 10:49:28 -07:00
Joao Eduardo Luis
01a0f2d3b7 mon: OSDMonitor: don't rely on client-side validation for command arguments
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-18 16:35:59 +00:00
Joao Eduardo Luis
074c880830 mon: Monitor: handle invalid 'quorum' command argument
Don't rely on client side validation of possible command arguments.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-18 16:35:59 +00:00
Joao Eduardo Luis
652056edc0 mon: Properly handle errors from 'cmd_getval()' when needed
Not handling the error return from cmd_getval() may leave uninitialzied
values, which can cause issues, specially with non-string values.

Fixes: 6806

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-18 16:35:59 +00:00
Samuel Just
76beb5ce82 Merge pull request #1487 from ceph/wip-7738
os/FileJournal: return errors on make_writeable() if reopen fails

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-17 16:03:49 -07:00
Sage Weil
aed074401d os/FileJournal: return errors on make_writeable() if reopen fails
This is why #7738 is resulting in a crash instead of an error.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-17 15:37:44 -07:00
Sage Weil
35aed15f9b Merge pull request #1482 from ceph/wip-7611
ceph.in: do not allow using 'tell' with interactive mode

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-17 08:17:53 -07:00
Joao Eduardo Luis
e39c213c1d ceph.in: do not allow using 'tell' with interactive mode
This avoids a lot of hassle when dealing with to whom tell each command
on interactive mode, and even more so if multiple targets are specified.

As so, 'tell' commands should be used while on interactive mode instead.

Backport: dumpling,emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-17 14:44:50 +00:00
Sage Weil
ce9bfb879c Merge pull request #1474 from ceph/wip-7740
OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-16 12:12:29 -07:00
Sage Weil
2f9a748419 Merge pull request #1473 from ceph/wip-7719
PG: clear want_pg_temp in clear_primary_state only if primary

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-16 09:37:05 -07:00
Sage Weil
e9a3c8e2a0 Merge pull request #1471 from ceph/wip-7684
client: force getattr when inline data is missing

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-15 21:47:10 -07:00
Yan, Zheng
1ae331479d client: force getattr when inline data is missing
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-16 12:42:35 +08:00
Sage Weil
4fdeafef06 Merge pull request #1467 from ceph/wip-7684
Wip 7684

http://pulpito.ceph.com/sage-2014-03-15_09:12:44-fs-wip-7684-testing-basic-plana

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-15 19:39:36 -07:00
Samuel Just
04de781765 OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting
We will set lb=hobject_t() if we resurrect the pg.  In that case,
we need to have sent that to the primary before hand.  If we
finish the removal before the pg is recreated, we'll just end
up backfilling it, which is ok since the pg doesn't exist anyway.

Fixes: #7740
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-15 17:58:37 -07:00
Sage Weil
4dd94a0062 Merge pull request #1469 from ceph/wip-7718
PG::issue_repop: only adjust peer_info last_updates if not temp

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-15 15:30:40 -07:00
Sage Weil
677b30c310 Merge pull request #1468 from ceph/wip-7732
PG::build_might_have_unfound: check pg_whomai, not osd whoami

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-15 15:29:22 -07:00
Samuel Just
affcc1196b Merge pull request #1470 from ceph/wip-7712
osd/ReplicatedPG: fix enqueue_front race

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-03-15 13:16:16 -07:00
Yan, Zheng
9e2184026d mds: include inline data in lock messages
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-16 00:55:08 +08:00
Yan, Zheng
5b3422a6dc mds: fix corner case of pushing inline data
Following sequence of events can happen.
 - Client releases an inode, queues cap release message.
 - A 'lookup' reply brings the same inode back, but the reply doesn't
   contain inline data because MDS didn't receive the cap release
   message and thought client already has up-to-data inline data.

The fix is trigger a getattr if client finds inline_version is zero.
The getattr mask is set to CEPH_STAT_CAP_INLINE_DATA, so that MDS knows
client does not have inline data.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-03-16 00:54:59 +08:00
Samuel Just
979e8b44d4 PG::build_might_have_unfound: check pg_whomai, not osd whoami
Otherwise, we might skip (2,0) when we are (2,1).

Fixes: #7732
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-14 18:00:09 -07:00
Sage Weil
0f75c5419d osd/ReplicatedPG: fix enqueue_front race
When requeuing and item at the front, we need to shuffle the items in
pg_for_processing if there is an entry for this PG there.  If so, we need
to hold the qlock for the duration of the requeue of the shuffled item
back into the primary queue in order to avoid reshuffling items.  For
example, consider the queue has

 A B C D

 - dequeue1 gets (pg, A), puts A in the processing list
 - dequeue1 tries to lock pg, blocks
 - enqueue_front on X takes qlock, swaps it for A, drops qlock
 - dequeue2 gets (pg, B), puts B in the processing list
 - enqueue_front pushes X back into the original list

 so we have processing: X B  queue: A C D

 - dequeue* get X, then B, then A C D

If we whole qlock for the duration of the enqueue_front, we avoid dequeu2
from sneaking in an shuffling B into the processing list before we have
crammed A back onto the front of the list.

This may have caused #7712.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 16:32:48 -07:00
Samuel Just
bbc0d6dd2c PG::issue_repop: only adjust peer_info last_updates if not temp
Temp object repops have version eversion_t() since they don't
actually send log entries.  Updating the last_updates here
caused the peer info last_updates to be incorrect until the
next non-temp repop.

Fixes: #7718
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-14 14:48:33 -07:00
Danny Al-Gaaf
35f1b042aa RGWListBucketMultiparts: init max_uploads/default_max with 0
CID 717377 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 2. uninit_member: Non-static class member "max_uploads" is not initialized
    in this constructor nor in any functions that it calls.
 4. uninit_member: Non-static class member "default_max" is not initialized
    in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit b23a141d54)
2014-03-14 13:30:13 -07:00
Sage Weil
6f9db6c702 unittest_mon_pgmap: fix warnings
In file included from test/mon/PGMap.cc:15:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int, bool lhs_is_null_literal = false]’
test/mon/PGMap.cc:33:257: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:19:18 -07:00
Sage Weil
e941fefff8 unittest_ceph_argparse: fix warnings
In file included from test/ceph_argparse.cc:17:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’:
../src/gtest/include/gtest/gtest.h:1333:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’
test/ceph_argparse.cc:344:207: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 13:19:18 -07:00
Samuel Just
e330097802 PG: clear want_pg_temp in clear_primary_state only if primary
Clearing it in that way in on_shutdown() can cause a stray
shard to clobber the want_pg_temp value created by the primary
shard on the same osd.  Thus, instead only clear it if we are
the primary.

Fixes: #7719
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-14 13:09:32 -07:00
Sage Weil
984f1c3df3 Merge pull request #1454 from ceph/wip-7709
osd/ReplicatedPG: release op locks on on commit+applied

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-14 11:36:02 -07:00
Sage Weil
bb75516773 Merge pull request #1459 from ceph/wip-7696
Wip 7696

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 11:28:50 -07:00
Sage Weil
a2f3b309f4 Merge pull request #1461 from ceph/wip-7692
mon: on timecheck on monmap 0

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 11:05:49 -07:00
Sage Weil
a3719e0a05 Merge pull request #1460 from ceph/wip-warning
PGLog: remove unused variable

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 11:03:49 -07:00
Sage Weil
f1bd59f84b mon: only do timecheck with known monmap
If we are still on monmap epoch 0, our mon ranks cannot yet be trusted
since there is not yet a shared source of truth from paxos.  If we do
timechecks, the code gets confused about the ranks in e.g. the
timecheck_waiting map.

Fixes: #7692
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 11:02:30 -07:00
Sage Weil
fba88de130 ceph-mon: be a bit more verbose on error
Motivated by #7489

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-14 11:00:36 -07:00
Samuel Just
62af51cb78 PG::activate: handle peer contigious with primary, but not auth_log
The added case covers a situation where a replica is not contiguous with
the auth_log, but is contiguous with the primary.  Reshuffling the
active set to handle this would be tricky, so instead we just go ahead
and backfill it anyway.  This is probably preferrable in any case since
the replica in question would have to be significantly behind.

Fixes: #7696
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-14 10:57:47 -07:00
Sage Weil
6aa5d4f173 Merge pull request #1458 from ceph/wip-7489
ceph_mon: split postfork() in two and finish postfork just before daemonize

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-14 10:51:32 -07:00
Joao Eduardo Luis
70d87df706 ceph_mon: output error message if unable to bind.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 17:45:57 +00:00
Joao Eduardo Luis
5ad9c16642 ceph_mon: all output after initial fork go to dout/derr
We were doing it in some cases, and not doing in some other cases.  Just
do it throughout.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 17:44:06 +00:00
Joao Eduardo Luis
c95234ac6b ceph_mon: split postfork() in two and finish postfork just before daemonize
We split global_init_postfork() in two: start and finish, with the first
keeping much of postfork()'s tasks except closing stderr, which we leave
open until just before we daemonize.  This allows the user to see any
error messages that the monitor may spit out before it daemonizes, making
sense of the error code (which we were already returning).

Fixes: 7489

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-14 17:39:00 +00:00
Sage Weil
87c911cede osd/ReplicatedPG: release op locks on on commit+applied
We were releasing the op locks when we applied the update but (potentially)
before we committed it.  This means that another client can read object
state that is not yet durable.

Fixes: #7709
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 22:02:01 -07:00
Loic Dachary
4f43e53ced Merge pull request #1450 from ceph/wip-7641
debian: make ceph depend on ceph-common >= 0.67

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-03-14 02:14:27 +01:00
Sage Weil
c5b557ee88 qa/workunits: misc -> fs/misc
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 17:38:08 -07:00
Samuel Just
8c8b3e9710 PGLog: remove unused variable
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-13 16:44:32 -07:00
Sage Weil
89c3d97cae Merge pull request #1442 from ceph/wip-magic-bad
osd: tunables instead of hard-coded target dirty/full ratios

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-13 16:43:11 -07:00
Sage Weil
282497e87a osd: add tunables for cache_min_{flush,evict}_age
Why not.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 16:38:35 -07:00
Sage Weil
fa6887b9c3 osd: set default cache_target_{dirty,full}_ratios based on configurable
These were hard-coded in the pg_pool_t constructor, but that was a dumb
idea.

Note that decoding legacy pg_pool_t's no longer does what it used to.  I'm
pretty sure that's okay since we care less about interim releases and
because we are pulling these normally out of OSDMap, which is freshly
encoded on a regular basis (and certainly recently with real values). Also,
let's not forget that this field is meaningless on old pools anyway.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 16:38:35 -07:00
Samuel Just
c452de171b Merge pull request #1452 from ceph/wip-7706
Wip 7706

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-13 16:24:19 -07:00
Josh Durgin
d0d21fae48 Merge pull request #1447 from ceph/wip-7703
rgw: manifest hold the actual bucket used for tail objects
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-03-13 15:53:06 -07:00
Sage Weil
eaf0cdc493 Merge pull request #1449 from ceph/wip-7705
ceph_test_rados: wait for commit not ack

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-13 14:52:19 -07:00
Sage Weil
f2124c5846 ceph_test_rados: wait for commit, not ack
First, this is what we wanted in the first place

Second, if we wait for ACK, we may look at a user_version value that is
not stable.

Fixes: #7705
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 14:49:30 -07:00
Sage Weil
dd946e0a95 MOSDOp: include reassert_version in print
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-13 14:49:20 -07:00
Samuel Just
73f6b4cb27 config_opts: raise ms_pq_max_tokens_per_priority to 16MB
Recovery messages can get pretty big.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-03-13 14:07:21 -07:00