Commit Graph

35056 Commits

Author SHA1 Message Date
Anand Bhat
a1c3afb60a OSDMonitor: Do not allow OSD removal using setmaxosd
Description: Currently setmaxosd command allows removal of OSDs by providing
a number less than current max OSD number. This causes abrupt removal of
OSDs causing data loss as well as kernel panic when kernel RBDs are involved.
Fix is to avoid removal of OSDs if any of the OSDs in the range between
current max OSD number and new max OSD number is part of the cluster.

Fixes: #8865

Signed-off-by: Anand Bhat <anand.bhat@sandisk.com>
2014-08-14 12:58:50 -07:00
Yehuda Sadeh
16a43609ea rgw: pass set_mtime to copy_obj_data()
Sometimes we need to set the mtime when copying object data (e.g., when
we rewrite the obj).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-08-14 11:38:13 -07:00
Yehuda Sadeh
800eff2482 rgw: copy_obj_data() uses atomic processor
Fixes: #9089

copy_obj_data was not using the current object write infrastructure,
which means that the end objects weren't striped.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-08-14 11:28:38 -07:00
Sage Weil
a8cabfa664 Merge pull request #2257 from ceph/wip-8784
rgw: call throttle_data() even if renew_state() failed

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-14 11:27:13 -07:00
Yehuda Sadeh
5d3a7e595f rgw: copy object data if target bucket is in a different pool
Fixes: #9039
Backport: firefly

The new manifest does not provide a way to put the head and the tail in
separate pools. In any case, if an object is copied between buckets in
different pools, we may really just want the object to be copied, rather
than reference counted.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-08-14 11:25:32 -07:00
Sage Weil
8393fdea40 Merge pull request #2251 from ceph/wip-9102
ceph-disk: linter cleanup

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-14 08:36:29 -07:00
Sage Weil
321d4defd4 Merge pull request #2255 from ceph/wip-9062
msg/PipeConnection: make methods behave on 'anon' connection

Reviewed-by: John Spray <john.spray@redhat.com>
2014-08-14 06:50:07 -07:00
John Spray
f10a1384ee Merge remote-tracking branch 'origin/next' 2014-08-14 14:44:06 +01:00
John Spray
d0331a9602 Merge pull request #2254 from ceph/wip-8725
mds: fix MDSMap encoding to be backward-compatible

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: John Spray <john.spray@redhat.com>
2014-08-14 14:29:40 +01:00
Sage Weil
ac70490d06 doc: update kernel recommendations (avoid 3.15!)
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-14 06:09:50 -07:00
Sage Weil
0a49db8e6f msg/PipeConnection: make methods behave on 'anon' connection
The monitor does a create_anon_connection() to create a pseudo Connection
object for forwarded messages.  If we try to call mark_down or similar
on one of these we should silently ignore the operation, not crash.

If we try to send a message, still crash (explicitly assert); the caller
should probably know better.

Fixes: #9062
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 17:52:25 -07:00
Sage Weil
bb046ed01e mon/Paxos: put source mon id in a temp variable
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 16:01:01 -07:00
Sage Weil
d74d3f1cd6 mds/MDSMap: fix incompat version for encoding
Back in 8f7900a09c we added the new fields
before the 'extended' section, which made the encoding incompatible.
Instead, add them at the end--old clients don't care whether the enabled
flag is set or what the 'fs name' is.

Fixes: #8725
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 15:05:05 -07:00
Sage Weil
369c6392c5 mds/MDSMap: drop trailing else in favor of early return
This keeps the old-version special cases in one place and make it obvious
what the current/forward-looking path is.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 15:03:03 -07:00
Samuel Just
0f6956b3f4 Merge remote-tracking branch 'upstream/next' 2014-08-13 14:11:12 -07:00
Samuel Just
e74ad5f8b6 Merge pull request #2252 from ceph/wip-9087
test/system/systest_runnable.cc: debugging on start and end

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-13 14:10:45 -07:00
Sage Weil
473f4bd395 Merge remote-tracking branch 'gh/next' 2014-08-13 14:10:31 -07:00
Samuel Just
b2c1fa8609 test/system/systest_runnable.cc: debugging on start and end
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-08-13 14:08:27 -07:00
Alfredo Deza
d74ed9d53f ceph-disk: linter cleanup
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-08-13 17:00:33 -04:00
Sage Weil
239401db7b mon: fix divide by zero when pg_num adjusted and no osds
Fixes: #9052
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 13:31:16 -07:00
Sage Weil
c5687b1310 mon: fix potential divide by zero on can_mark_{down,out}
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 13:31:16 -07:00
Sage Weil
f81d2b0eaa mon: fix divide by zero when pg_num adjusted and no osds
Fixes: #9101
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 13:15:36 -07:00
Sage Weil
8a647f7d40 mon: fix potential divide by zero on can_mark_{down,out}
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 13:15:19 -07:00
Sage Weil
b3fd96121f Merge pull request #2236 from ceph/wip-9055
ceph_test_rados_api_tier: fix cache pool cleanup during test

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-08-13 12:54:40 -07:00
Sage Weil
14f73e037a Merge pull request #2222 from ceph/wip-9029
mds: Make min/max UID configurable for who is allowed to create a snapsh...

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-13 12:40:58 -07:00
Wido den Hollander
5ed9f4eeae mds: Revert from mds_mksnap_ setting to mds_snap_ settings 2014-08-13 21:07:59 +02:00
Sage Weil
6f7798e37e ceph-disk: warn about falling back to sgdisk (once)
This way the user knows something funny might be up if dmcrypt is in use.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 12:00:50 -07:00
Sage Weil
b1651afb34 ceph-disk: only fall back to sgdisk for 'list' if blkid seems old
If the blkid doesn't show us any ID_PART_ENTRY_* fields but we know it is
a GPT partition, *then* fallback.  Otherwise, don't bother.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 11:52:14 -07:00
Sage Weil
b75e8a340c ceph-disk: add get_partition_base() helper
Return the base devices/disk for a partition device.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 11:52:14 -07:00
Sage Weil
c7a1ceba44 ceph-disk: display information about dmcrypted data and journal volumes
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 11:52:14 -07:00
Samuel Just
561208af4b Merge pull request #2249 from ceph/wip-9096
osd: fix require_same_peer_instance from fast_dispatch

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
2014-08-13 10:48:32 -07:00
Sage Weil
5be56ff86d osd/ReplicatedPG: only do agent mode calculations for positive values
After a split we can get negative values here.  Only do the arithmetic if
we have a valid (positive) value that won't through the floating point
unit for a loop.

Fixes: #9082
Tested-by: Karan Singh <karan.singh@csc.fi>
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 10:34:53 -07:00
Sage Weil
7b3714ce7a osd: fix some line wrapping
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 09:38:07 -07:00
Sage Weil
df945a900a osd: fix require_same_peer_instance from fast_dispatch
The mark-down of old peers needs to take the session_dispatch_lock in order
to safely clear the Session ref cycle.  However, for fast dispatch callers,
that lock is already held.  Pass a flag down from the callers indicating
whether we need to take the additional lock.

Fixes: #9096
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 08:30:25 -07:00
Sage Weil
3d7e2b357a osd: inline require_osd_up_peer
There is only one caller.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-13 08:20:42 -07:00
Sage Weil
0479db8c2b Merge pull request #2233 from majianpeng/fix1
os/chain_xattr: Remove all old xattr entry when overwrite the xattr.

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-12 21:22:25 -07:00
Sage Weil
3da1c711ef Merge pull request #2230 from ceph/wip-fsx-flatten
test_librbd_fsx: also flatten as part of randomize_parent_overlap

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-12 21:17:12 -07:00
Sage Weil
3bd1b33122 Merge pull request #2234 from kevincox/net-docs
doc: Initial network docs.

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-12 21:14:10 -07:00
Sage Weil
b06d1b0a60 Merge pull request #2237 from ceph/wip-8560
mon: instrument paxos

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-08-12 21:06:16 -07:00
Sage Weil
b09b8563d3 mon/Paxos: add perfcounters for most paxos operations
I'm focusing primarily on the ones that result in IO here.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-12 21:05:40 -07:00
Sage Weil
128aaa509b Merge pull request #2242 from majianpeng/fix4
utime: Because class Clock didn't exist,so remove the declaration in class utime_t

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-12 21:01:09 -07:00
Sage Weil
f80ed26d24 ceph-disk: move fs mount probe into a helper
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-12 17:25:42 -07:00
Sage Weil
6c77f5f2f9 ceph-disk: use partition type UUIDs, and blkid
Use blkid to give us the GPT partition type.  This lets us distinguish
between dmcrypt and non-dmcrypt partitions.  Fake it if blkid doesn't
give us what we want and try with sgdisk.  This isn't perfect (it can't
tell between dmcrypt and not dmcrypt), but such is life, and we are better
off than before.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-12 17:25:10 -07:00
Samuel Just
ea90d9f46b Revert "ReplicatedPG: do not pass cop into C_Copyfrom"
The ref was introduced in 589b639af7
and is actually necessary to keep the buffers around.

This reverts commit 300b5e8ecb.
2014-08-12 16:34:30 -07:00
Samuel Just
300b5e8ecb ReplicatedPG: do not pass cop into C_Copyfrom
We do not know when the objecter will finally let go of this Context.  Thus, we
cannot know whether it will happen before the flush, at which point the
object_context held by the cop must have been released.

Also, we simply don't need it, process_copy_chunk alrady works in terms of the
tid!

Fixes: #8894
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-08-12 16:21:00 -07:00
Sage Weil
bb121e416d Merge pull request #2246 from ceph/wip-9064
ReplicatedPG::maybe_handle_cache: do not skip promote for write_ordered

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-12 15:50:59 -07:00
Samuel Just
24aeca9c43 ReplicatedPG::maybe_handle_cache: do not skip promote for write_ordered
We cannot redirect a RW ordered read.

Fixes: #9064
Introduced: 0ed3adc1e0
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-08-12 15:25:03 -07:00
Sage Weil
7bd67fa1ae Merge pull request #2245 from dachary/wip-9085-isa-link
erasure-code: isa plugin must link with ErasureCode.cc

Reviewed-by: Sage Weil <sage@redhat.com>
2014-08-12 14:37:28 -07:00
Loic Dachary
984f6148cc erasure-code: isa plugin must link with ErasureCode.cc
Otherwise it will not get the methods it needs. A test is added to check
the plugin loads as expected, from the command line. The test is not run
if the isa plugin is not found, which happens on platforms that are not
supported.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-08-12 23:07:50 +02:00
Sage Weil
1088d6cd11 ceph-disk: fix log syntax error
File "/usr/sbin/ceph-disk", line 303, in command_check_call
    LOG.info('Running command: %s' % ' '.join(arguments))
TypeError: sequence item 2: expected string, NoneType found

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-12 13:53:16 -07:00