]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoosd/ReplicatedPG: avoid dereferencing iterator at end() 2362/head
Sage Weil [Sat, 30 Aug 2014 02:16:56 +0000 (19:16 -0700)]
osd/ReplicatedPG: avoid dereferencing iterator at end()

The preceding loop could terminate with p == snapset.clones.end(), which
we assign to dnewest.  We can't dereference the iterator in that case.

For example:

 start_flush ffe627f3/foo/a/test-rados-api-plana05-22080-18/83 v430'42 uv130 blocking
  snapset b=[b,a]:[a,b]+head
 start_flush no older clones

prev_snapc will be 0, oi.snaps will be [a], p will end up at end(), get
assigned to dnewest, and we'll dereference.  It's only sometime harmful
though because we may still take the right (else) branch...

Fixes: #9294
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 28 Aug 2014 22:30:24 +0000 (15:30 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/osd/ReplicatedPG.cc

11 years agodoc/install/manual-deployment: move 'done' comment up
Sage Weil [Thu, 28 Aug 2014 21:34:27 +0000 (14:34 -0700)]
doc/install/manual-deployment: move 'done' comment up

It's the same for upstart and sysvinit.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge branch 'master' of git://github.com/flaf/ceph
Sage Weil [Thu, 28 Aug 2014 21:27:12 +0000 (14:27 -0700)]
Merge branch 'master' of git://github.com/flaf/ceph

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2248 from theanalyst/wip-8112
Sage Weil [Thu, 28 Aug 2014 21:24:11 +0000 (14:24 -0700)]
Merge pull request #2248 from theanalyst/wip-8112

rgw: move generic server usage after all options

11 years agoMerge pull request #2336 from wonzhq/release-op-ctx-lock
Samuel Just [Thu, 28 Aug 2014 20:37:08 +0000 (13:37 -0700)]
Merge pull request #2336 from wonzhq/release-op-ctx-lock

osd: Remove extra call to release_op_ctx_locks in eval_repop

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #2350 from ceph/wip-8718
Sage Weil [Thu, 28 Aug 2014 19:42:00 +0000 (12:42 -0700)]
Merge pull request #2350 from ceph/wip-8718

rgw: don't try to authenticate a CORS preflight request

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2348 from athanatos/wip-9054
Sage Weil [Thu, 28 Aug 2014 19:40:16 +0000 (12:40 -0700)]
Merge pull request #2348 from athanatos/wip-9054

Wip 9054

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2294 from rootfs/wip-java-pom
Gregory Farnum [Thu, 28 Aug 2014 18:55:41 +0000 (11:55 -0700)]
Merge pull request #2294 from rootfs/wip-java-pom

add pom.xml so to deploy the libcephfs to maven repository.

Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #2341 from dachary/wip-osd-crush
Sage Weil [Thu, 28 Aug 2014 18:52:12 +0000 (11:52 -0700)]
Merge pull request #2341 from dachary/wip-osd-crush

tests: reduce osd-crush.sh execution time

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2342 from ceph/wip-mds-namespace
Sage Weil [Thu, 28 Aug 2014 18:51:16 +0000 (11:51 -0700)]
Merge pull request #2342 from ceph/wip-mds-namespace

Wip mds namespace

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2349 from athanatos/wip-9240
Sage Weil [Thu, 28 Aug 2014 18:49:08 +0000 (11:49 -0700)]
Merge pull request #2349 from athanatos/wip-9240

Wip 9240

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agorgw: don't try to authenticate a CORS preflight request 2350/head
Yehuda Sadeh [Thu, 28 Aug 2014 00:44:18 +0000 (17:44 -0700)]
rgw: don't try to authenticate a CORS preflight request

Fixes: #8718
Backport: firefly

CORS preflight requests don't need to be authenticated. Treat them as
coming from anonymous user.

Reported-by: Robert Hubbard <bobby.hubbard@garmin.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
11 years agoMerge pull request #2335 from ceph/wip-9218 6495f898acd71e1432f49940c63bd6925bf9b1d8
Samuel Just [Thu, 28 Aug 2014 18:30:31 +0000 (11:30 -0700)]
Merge pull request #2335 from ceph/wip-9218

osd: fix osd_tp shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #2347 from athanatos/wip-9205
Sage Weil [Thu, 28 Aug 2014 18:19:54 +0000 (11:19 -0700)]
Merge pull request #2347 from athanatos/wip-9205

OSD::session_notify_pg_create: requeue at the start of the queue

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2346 from athanatos/wip-8777
Sage Weil [Thu, 28 Aug 2014 18:19:09 +0000 (11:19 -0700)]
Merge pull request #2346 from athanatos/wip-8777

PG: mark_log_for_rewrite on resurrection

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2345 from athanatos/wip-9259
Sage Weil [Thu, 28 Aug 2014 18:18:52 +0000 (11:18 -0700)]
Merge pull request #2345 from athanatos/wip-9259

PG::can_discard_op: do discard old subopreplies

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge branch 'wip-8639'
Sage Weil [Thu, 28 Aug 2014 17:59:40 +0000 (10:59 -0700)]
Merge branch 'wip-8639'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agotest/mon/*: prime mon with initial command before injection
Sage Weil [Thu, 28 Aug 2014 17:59:18 +0000 (10:59 -0700)]
test/mon/*: prime mon with initial command before injection

The osdmonitor_prepare_command is very fragile.  Send an initial command
to the mon beforehand.  This seems to prevent the initial command from
getting combined into an early mon proposal with some other stuff.

Alternatively, we could remove these tests and this mechanism entirely as
it is likely to great in the future when the next set of mon changes are
made, but they have shown themselves to be useful it catching other
regressions, so we'll patch them up for a bit longer.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2344 from ceph/wip-8863
Samuel Just [Thu, 28 Aug 2014 17:34:10 +0000 (10:34 -0700)]
Merge pull request #2344 from ceph/wip-8863

osd/PG: fix crash from second backfill reservation rejection

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #2297 from ceph/wip-9173
John Spray [Thu, 28 Aug 2014 16:20:20 +0000 (17:20 +0100)]
Merge pull request #2297 from ceph/wip-9173

Wip 9173

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #2299 from dachary/wip-jerasure-upgrade
Loic Dachary [Thu, 28 Aug 2014 16:10:12 +0000 (18:10 +0200)]
Merge pull request #2299 from dachary/wip-jerasure-upgrade

erasure-code: jerasure upgrade

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agomds: remove `using namespace std` in headers 2342/head
John Spray [Thu, 28 Aug 2014 12:41:21 +0000 (13:41 +0100)]
mds: remove `using namespace std` in headers

Avoid polluting global namespace: .cc files should
do the `using` if they want it.

Signed-off-by: John Spray <john.spray@redhat.com>
11 years agomessages: remove `using namespace std` in headers
John Spray [Thu, 28 Aug 2014 12:40:34 +0000 (13:40 +0100)]
messages: remove `using namespace std` in headers

Avoid polluting global namespace: .cc files should
do the `using` if they want it.

Signed-off-by: John Spray <john.spray@redhat.com>
11 years agotests: reduce osd-crush.sh execution time 2341/head
Loic Dachary [Thu, 28 Aug 2014 10:47:03 +0000 (12:47 +0200)]
tests: reduce osd-crush.sh execution time

A loop creating 255 crush rulesets via the command line takes
minutes. It is replaced by the generation of a crushmap instead.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: assert the PluginRegistry lock is held when it must 2299/head
Loic Dachary [Sat, 23 Aug 2014 09:07:29 +0000 (11:07 +0200)]
erasure-code: assert the PluginRegistry lock is held when it must

Add lock to the preload method and assert that it is held by methods
requiring it. Although preload is called at bootstrap and does not
require the lock, adding it does not hurt and makes the lock policy
clearer to understand.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: add Ceph version check to plugins
Loic Dachary [Thu, 21 Aug 2014 16:38:52 +0000 (18:38 +0200)]
erasure-code: add Ceph version check to plugins

Add the __erasure_code_version function to all plugins, to return the
Ceph version against which they have been compiled. When a plugin is
loaded, an error is thrown if the version of the plugin does not match
the version of the daemon loading it.

If the symbol does not exist, which will be true of older plugins, set
the version to "an older version" so it never matches.

http://tracker.ceph.com/issues/9167 Fixes: #9167

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: implement ErasureCodePluginRegistry::remove
Loic Dachary [Thu, 21 Aug 2014 16:37:14 +0000 (18:37 +0200)]
erasure-code: implement ErasureCodePluginRegistry::remove

Which is symmetric to the add method and used for test.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: wrap lines for emacs compile command
Loic Dachary [Thu, 21 Aug 2014 16:35:52 +0000 (18:35 +0200)]
erasure-code: wrap lines for emacs compile command

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: jerasure preloads the plugin variant
Loic Dachary [Thu, 21 Aug 2014 16:31:02 +0000 (18:31 +0200)]
erasure-code: jerasure preloads the plugin variant

The variant selection depending on the available CPU features is
encapsulated in a helper. The helper is used in the factory() method and
in the load() method.

The factory() method may load a variant that is not the default, for
benchmark purposes. Such a variant is not preloaded by the load() method
and upgrading while running may be problematic. However, running with a
non standard variant is used for benchmarking and upgrades in this
context are not a concern.

http://tracker.ceph.com/issues/9153 Fixes: #9153

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: add Red Hat to copyright notices
Loic Dachary [Thu, 21 Aug 2014 16:28:30 +0000 (18:28 +0200)]
erasure-code: add Red Hat to copyright notices

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: remove unused errno.h include
Loic Dachary [Thu, 21 Aug 2014 16:27:06 +0000 (18:27 +0200)]
erasure-code: remove unused errno.h include

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: add directory to plugin init functions
Loic Dachary [Thu, 21 Aug 2014 16:22:18 +0000 (18:22 +0200)]
erasure-code: add directory to plugin init functions

The prototype of the init functions of erasure coded plugins is changed
from

   int __erasure_code_init(char *plugin_name)

to

   int __erasure_code_init(char *plugin_name, char *directory)

The jerasure plugin will find optimized variants in this directory and
load them. The load() and preload() functions of
ErasureCodePluginRegistry only use a directory instead of a more generic
parameters map. The parameters map was only used for the directory entry
anyway.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoerasure-code: preload the isa plugin by default
Loic Dachary [Thu, 21 Aug 2014 13:19:22 +0000 (15:19 +0200)]
erasure-code: preload the isa plugin by default

But only do so when it has been compiled because a recent enough yasm
has been found.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agodoc: Update docs about OSD benchmark syntax
Wido den Hollander [Thu, 28 Aug 2014 06:18:16 +0000 (08:18 +0200)]
doc: Update docs about OSD benchmark syntax

11 years agoRevert "doc: Update docs about OSD benchmark syntax"
Wido den Hollander [Thu, 28 Aug 2014 06:16:03 +0000 (08:16 +0200)]
Revert "doc: Update docs about OSD benchmark syntax"

This reverts commit 36f15c3026debd808920a04bc3a60c96b119405b.

Commit included submodule change which was not supposed to happen.

11 years agodoc: Update docs about OSD benchmark syntax
Wido den Hollander [Thu, 28 Aug 2014 06:12:30 +0000 (08:12 +0200)]
doc: Update docs about OSD benchmark syntax

11 years agoMerge pull request #2310 from ceph/wip-9148
Sage Weil [Thu, 28 Aug 2014 00:26:34 +0000 (17:26 -0700)]
Merge pull request #2310 from ceph/wip-9148

Wip 9148

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoPG::can_discard_op: do discard old subopreplies 2345/head
Samuel Just [Wed, 27 Aug 2014 23:21:41 +0000 (16:21 -0700)]
PG::can_discard_op: do discard old subopreplies

Otherwise, a sub_op_reply from a previous interval can stick around
until we either one day go active again and get rid of it or delete the
pg which is holding it on its waiting_for_active list.  While it sticks
around futily waiting for the pg to once more go active, it will cause
harmless slow request warnings.

Fixes: #9259
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agocivetweb: update submodule 2310/head
Yehuda Sadeh [Mon, 25 Aug 2014 17:33:23 +0000 (10:33 -0700)]
civetweb: update submodule

Add access log api

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
11 years agoMerge pull request #2339 from leseb/sample-ceph-conf-addition
Sage Weil [Wed, 27 Aug 2014 21:43:33 +0000 (14:43 -0700)]
Merge pull request #2339 from leseb/sample-ceph-conf-addition

sample.ceph.conf: some updates

11 years agomon: flush paxos write on shutdown
Sage Weil [Mon, 25 Aug 2014 04:10:27 +0000 (21:10 -0700)]
mon: flush paxos write on shutdown

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/Paxos: WRITING != WRITING_PREVIOUS
Sage Weil [Mon, 25 Aug 2014 04:01:07 +0000 (21:01 -0700)]
mon/Paxos: WRITING != WRITING_PREVIOUS

This distinction is important: the update-previous state should not be
writeable, as reflected by PaxosService::is_writeable().

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon: _reset() before updating state
Sage Weil [Thu, 21 Aug 2014 23:18:01 +0000 (16:18 -0700)]
mon: _reset() before updating state

In _reset() we call Paxos::restart(), which waits for commit completion,
and assumes the state hasn't been twiddled yet.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon: flush before scrub
Sage Weil [Thu, 21 Aug 2014 19:19:18 +0000 (12:19 -0700)]
mon: flush before scrub

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/Paxos: flush io on reset()
Sage Weil [Thu, 21 Aug 2014 03:57:56 +0000 (20:57 -0700)]
mon/Paxos: flush io on reset()

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/Paxos: make backend write async
Sage Weil [Tue, 19 Aug 2014 23:48:34 +0000 (16:48 -0700)]
mon/Paxos: make backend write async

Move into the WRITING state and do the write to leveldb (or whatever the
backend is) asynchronously.

A few tricks here:
 - we can't do the is_updating() state check because we will always be in
   REFRESH.  Instead, make commit_proposal() tolerate the case where it is
   called but the top proposal isn't the one we just did (or the list is
   empty).  This makes the callers simpler.
 - do_refresh() may call bootstrap.  If we do bootstrap while in REFRESH,
   don't do a sync/flush on the backend store because *we* are async
   completion thread and we'll deadlock.  All other callers need to wait
   for this, though!

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/Paxos[Service]: allow reads during WRITING state
Sage Weil [Tue, 19 Aug 2014 23:45:46 +0000 (16:45 -0700)]
mon/Paxos[Service]: allow reads during WRITING state

The REFRESH state is not readable; that's when we are re-reading our state
out of leveldb, and we hold the mon_lock during the period.  So, strictly
speaking, it doesn't matter whether we include it here since none of these
call sites would be visited while in that state.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/Paxos: add writing and refresh states
Sage Weil [Tue, 19 Aug 2014 23:44:06 +0000 (16:44 -0700)]
mon/Paxos: add writing and refresh states

The new transition will be

 (updating or updating-previous) -> writing -> refresh -> active

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/Paxos: move post-commit finish work into commit_finish()
Sage Weil [Sun, 17 Aug 2014 05:29:04 +0000 (22:29 -0700)]
mon/Paxos: move post-commit finish work into commit_finish()

The main change here is that we are merging the singleton and clustered
finish code together.  This is mostly a code shuffle, except for one
semantic change: we now trigger the commit waiters before finish_round()
in the singleton case, whereas before we did not.  I don't think there
was a specific reason why it differed from the clustered case.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/Paxos: break commit() into two pieces
Sage Weil [Sun, 17 Aug 2014 05:22:01 +0000 (22:22 -0700)]
mon/Paxos: break commit() into two pieces

One part happens before the txn starts, the other after.  Move all of the
internal state update to the bottom half.  Eventually this will matter.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/MonitorDBStore: assert closed in destructor
Sage Weil [Wed, 20 Aug 2014 04:23:36 +0000 (21:23 -0700)]
mon/MonitorDBStore: assert closed in destructor

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/MonitorDBStore: drop useless ctor
Sage Weil [Sun, 17 Aug 2014 05:11:59 +0000 (22:11 -0700)]
mon/MonitorDBStore: drop useless ctor

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/MonitorDBStore: add async queue_transaction()
Sage Weil [Sun, 10 Aug 2014 22:19:06 +0000 (15:19 -0700)]
mon/MonitorDBStore: add async queue_transaction()

Do the transaction async, and then trigger a callback.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/MonitorDBStore: add close() method
Sage Weil [Sun, 10 Aug 2014 22:17:45 +0000 (15:17 -0700)]
mon/MonitorDBStore: add close() method

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon: interact with MonitorDBStore::Transactions by shared_ptr Ref
Sage Weil [Sun, 10 Aug 2014 22:08:33 +0000 (15:08 -0700)]
mon: interact with MonitorDBStore::Transactions by shared_ptr Ref

TransactionRef everywhere!

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agocommon/Finisher: fix perfcounter
Sage Weil [Wed, 20 Aug 2014 04:29:41 +0000 (21:29 -0700)]
common/Finisher: fix perfcounter

Make sure we add in the nubmer of elements when we queue them
from a list or deque or vector.

Fix the type to be a counter.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon/OSDMonitor: fix double-free on old MOSDBoot
Sage Weil [Tue, 19 Aug 2014 23:43:02 +0000 (16:43 -0700)]
mon/OSDMonitor: fix double-free on old MOSDBoot

send_latest() does an m->put().

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge remote-tracking branch 'gh/wip-rewrite-PR2189'
Sage Weil [Wed, 27 Aug 2014 21:24:54 +0000 (14:24 -0700)]
Merge remote-tracking branch 'gh/wip-rewrite-PR2189'

11 years agoMove fedora patch file (used by ceph.spec.in) to rpm/ subdir
Dan Mick [Wed, 27 Aug 2014 19:56:43 +0000 (12:56 -0700)]
Move fedora patch file (used by ceph.spec.in) to rpm/ subdir

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoceph.spec.in: tests for rhel or centos need to not include _version
Dan Mick [Tue, 12 Aug 2014 23:31:22 +0000 (16:31 -0700)]
ceph.spec.in: tests for rhel or centos need to not include _version

rhel_version and centos_version are apparently the OpenSUSE Build
names; the native macros are just "rhel" and "centos" (and contain
a version number, should it be necessary).

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoceph.spec.in: Add a small comment on the empty %files section
Dan Mick [Tue, 12 Aug 2014 21:46:52 +0000 (14:46 -0700)]
ceph.spec.in: Add a small comment on the empty %files section

as suggested by Dan Mick.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
11 years agoceph.spec.in: Obsolete all older versions.
Dan Mick [Tue, 12 Aug 2014 21:39:18 +0000 (14:39 -0700)]
ceph.spec.in: Obsolete all older versions.

Now this changeset can be used on all current ceph releases that already
have the package split.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
11 years agoceph.spec.in: No version on ceph-libs Obsoletes.
Dan Mick [Tue, 12 Aug 2014 21:09:43 +0000 (14:09 -0700)]
ceph.spec.in: No version on ceph-libs Obsoletes.

If we are installing with the new package structure we don't ever want the
new package to co-exist with the old one; this includes the mistakenly-
released v0.81 on Fedora, which should be removed in favor of this
version.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agoceph.spec.in: Obselete ceph-libcephfs (not libcephfs)
Sandon Van Ness [Sat, 9 Aug 2014 01:01:30 +0000 (18:01 -0700)]
ceph.spec.in: Obselete ceph-libcephfs (not libcephfs)

I am guessing that because it was a sub-package libcephfs was mistakenly
used instead of ceph-libcephfs.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
11 years agoceph.spec.in: We need those nice recent changes for rhel7 in Fedora too.
Erik Logtenberg [Fri, 1 Aug 2014 12:20:18 +0000 (14:20 +0200)]
ceph.spec.in: We need those nice recent changes for rhel7 in Fedora too.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
11 years agoceph.spec.in, init-ceph.in: Don't autostart ceph service on Fedora.
Erik Logtenberg [Thu, 31 Jul 2014 22:13:50 +0000 (00:13 +0200)]
ceph.spec.in, init-ceph.in: Don't autostart ceph service on Fedora.

This patch is taken from the current Fedora package and makes the upstream
ceph.spec compliant with Fedora policy. The goal is to be fully compliant
upstream so that we can replace current Fedora package with upstream
package to fix many bugs in Fedora.

Addition from Dan Mick <dan.mick@inktank.com>:
Do this for RHEL and Centos as well, since they surely will benefit
from the same policy.   Note: this requires changes to
autobuild-ceph and ceph-build scripts, which currently copy
only the dist tarball to the rpmbuild/SOURCES dir.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
Signed-off-by: Dan Mick <dan.mick@inktank.com>:
11 years agoceph.spec.in: Add obsoletes for libcephfs
Erik Logtenberg [Thu, 31 Jul 2014 21:54:03 +0000 (23:54 +0200)]
ceph.spec.in: Add obsoletes for libcephfs

This fixes a bug for Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1116614

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
11 years agoceph.spec.in: add ceph-libs-compat
Erik Logtenberg [Thu, 31 Jul 2014 21:49:56 +0000 (23:49 +0200)]
ceph.spec.in: add ceph-libs-compat

Added a ceph-libs-compat package in accordance with Fedora packaging
guidelines [1], to handle the recent package split more gracefully.
In Fedora this is necessary because there are already other packages
depending on ceph-libs, that need to be adjusted to depend on the new
split packages instead. In the mean time, ceph-libs-compat prevents
breakage.

[1] http://fedoraproject.org/wiki/Upgrade_paths_%E2%80%94_renaming_or_splitting_packages

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
11 years agocivetweb: update submodule
Yehuda Sadeh [Sat, 23 Aug 2014 01:34:57 +0000 (18:34 -0700)]
civetweb: update submodule

Fixes: #9208
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
11 years agorgw: convert header field underscores into dashes
Yehuda Sadeh [Fri, 22 Aug 2014 22:12:16 +0000 (15:12 -0700)]
rgw: convert header field underscores into dashes

Fixes: 9206
Backport: firefly

Certain web servers filter out underscores in the header field name.
Convert them into dashes.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
11 years agorgw: clear bufferlist if write_data() successful
Yehuda Sadeh [Fri, 22 Aug 2014 04:53:38 +0000 (21:53 -0700)]
rgw: clear bufferlist if write_data() successful

Fixes: #9201
Backport: firefly

We sometimes need to call RGWPutObjProcessor::handle_data() again,
so that we send the pending data. However, we failed to clear the buffer
that was already sent, thus it was resent. This triggers when using non
default pool alignments.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
11 years agosystemd: ceph-mds and ceph-mon need networking too
Sage Weil [Wed, 27 Aug 2014 16:22:59 +0000 (09:22 -0700)]
systemd: ceph-mds and ceph-mon need networking too

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2306 from mgarces/patch-1
Sage Weil [Wed, 27 Aug 2014 16:22:18 +0000 (09:22 -0700)]
Merge pull request #2306 from mgarces/patch-1

needs network or it will not start if enabled

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2313 from dachary/wip-buffer
Sage Weil [Wed, 27 Aug 2014 16:17:51 +0000 (09:17 -0700)]
Merge pull request #2313 from dachary/wip-buffer

common: remove spurious uint32_t in buffer.c

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agosample.ceph.conf: some updates 2339/head
Sébastien Han [Wed, 27 Aug 2014 13:58:44 +0000 (15:58 +0200)]
sample.ceph.conf: some updates

This commit adds:
- a section for radosgw
- fix the replica count value (default is 3 since firefly)
- more OSDs options for performance and CRUSH

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
11 years agoMerge pull request #1950 from xylv/wip-8583
Yehuda Sadeh [Wed, 27 Aug 2014 15:56:25 +0000 (08:56 -0700)]
Merge pull request #1950 from xylv/wip-8583

rgw: admin ops create user API can not determine existing user

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
11 years agoosd/PG: fix crash from second backfill reservation rejection 2344/head
Sage Weil [Wed, 27 Aug 2014 13:19:12 +0000 (06:19 -0700)]
osd/PG: fix crash from second backfill reservation rejection

If we get more than one reservation rejection we should ignore them; when
we got the first we already sent out cancellations.  More importantly, we
should not crash.

Fixes: #8863
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoosd: Remove extra call to release_op_ctx_locks in eval_repop. It is 2336/head
Zhiqiang Wang [Wed, 27 Aug 2014 08:20:31 +0000 (16:20 +0800)]
osd: Remove extra call to release_op_ctx_locks in eval_repop. It is
called in remove_repop.

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
11 years agotest/mon/mkfs.sh: fix test
Sage Weil [Wed, 27 Aug 2014 04:18:17 +0000 (21:18 -0700)]
test/mon/mkfs.sh: fix test

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2197 from ceph/wip-mon-empty-store
Sage Weil [Wed, 27 Aug 2014 01:05:30 +0000 (18:05 -0700)]
Merge pull request #2197 from ceph/wip-mon-empty-store

ceph_mon: check for existing mon store before opening db

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Pavan Rallabhandi <pavanrallabhandis@gmail.com>
11 years agoMerge pull request #2312 from ceph/wip-config-diff
Sage Weil [Wed, 27 Aug 2014 01:03:21 +0000 (18:03 -0700)]
Merge pull request #2312 from ceph/wip-config-diff

config diff: obtain diff between current config and default config

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoosd: fix osd_tp shutdown 2335/head
Sage Weil [Wed, 27 Aug 2014 00:43:10 +0000 (17:43 -0700)]
osd: fix osd_tp shutdown

We need to clear the queue, not just drain the currently executing jobs.

Fixes: #9218
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 27 Aug 2014 00:33:59 +0000 (17:33 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/os/CollectionIndex.h

11 years agoPG: mark_log_for_rewrite on resurrection 2346/head
Samuel Just [Tue, 26 Aug 2014 23:53:02 +0000 (16:53 -0700)]
PG: mark_log_for_rewrite on resurrection

Fixes: #8777
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoOSD::session_notify_pg_create: requeue at the start of the queue 2347/head
Samuel Just [Tue, 26 Aug 2014 23:39:06 +0000 (16:39 -0700)]
OSD::session_notify_pg_create: requeue at the start of the queue

Introduced: 2120f4bb6c5ba0f066d4541a51ce1d43c8ab6881
Fixes: #9205
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agocommon: ceph_context: add admin socket command 'config diff' 2312/head
Joao Eduardo Luis [Tue, 26 Aug 2014 22:31:06 +0000 (23:31 +0100)]
common: ceph_context: add admin socket command 'config diff'

Outputs a diff between the current config and what the daemon believes
to be its default config.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agocommon: config: let us obtain a diff between current and default config
Joao Eduardo Luis [Sun, 24 Aug 2014 16:20:53 +0000 (17:20 +0100)]
common: config: let us obtain a diff between current and default config

It's mildly annoying when trying to figure out what has been changed on
a running system's config options and having to rely on whatever is set
on ceph.conf and the admin's memory of what has been injected.

With this we can simply ask the daemon for the diff between what would be
its default and what is its current config.

Current form will output extraneous information that was not directly
supplied by the user though, such as 'host' 'fsid' and 'daemonize', as
well as defaults we may rewrite ourselves (leveldb tunables on the monitor
for instance).  Nonetheless, it's way better than the alternative and
considering it should be used solely for debug purposes I think we can
get away with it.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoMerge pull request #2334 from dachary/wip-9235-uninitialized-variables
Sage Weil [Tue, 26 Aug 2014 21:43:51 +0000 (14:43 -0700)]
Merge pull request #2334 from dachary/wip-9235-uninitialized-variables

tests: histogram prevent re-use of local variables

11 years agotests: histogram prevent re-use of local variables 2334/head
Loic Dachary [Tue, 26 Aug 2014 19:59:39 +0000 (21:59 +0200)]
tests: histogram prevent re-use of local variables

By moving the tests to separate functions.

http://tracker.ceph.com/issues/9235 Fixes: #9235

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoMerge pull request #2333 from dachary/wip-9235-uninitialized-variables
Sage Weil [Tue, 26 Aug 2014 21:15:35 +0000 (14:15 -0700)]
Merge pull request #2333 from dachary/wip-9235-uninitialized-variables

tests: histogram prevent re-use of local variables

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoReplicatedPG:start_flush send a second delete 2348/head
Samuel Just [Tue, 26 Aug 2014 21:13:57 +0000 (14:13 -0700)]
ReplicatedPG:start_flush send a second delete

Suppose we start with the following in the cache pool:

30:[29,21,20,15,10,4]:[22(21), 15(15,10), 4(4)]+head

The object doesn't exist at 29 or 20.

First, we flush 4 leaving the backing pool with:

3:[]+head

Then, we begin to flush 15 with a delete with snapc 4:[4] leaving the
backing pool with:

4:[4]:[4(4)]

Then, we finish flushing 15 with snapc 9:[4] with leaving the backing
pool with:

9:[4]:[4(4)]+head

Next, snaps 10 and 15 are removed causing clone 10 to be removed leaving
the cache with:

30:[29,21,20,4]:[22(21),4(4)]+head

We next begin to flush 22 by sending a delete with snapc 4(4) since
prev_snapc is 4 <---------- here is the bug

The backing pool ignores this request since 4 < 9 (ORDERSNAP) leaving it
with:

9:[4]:[4(4)]

Then, we complete flushing 22 with snapc 19:[4] leaving the backing pool
with:

19:[4]:[4(4)]+head

Then, we begin to flush head by deleting with snapc 22:[21,20,4] leaving
the backing pool with:

22[21,20,4]:[22(21,20), 4(4)]

Finally, we flush head leaving the backing pool with:

30:[29,21,20,4]:[22(21*,20*),4(4)]+head

When we go to flush clone 22, all we know is that 22 is dirty, has snaps
[21], and 4 is clean. As part of flushing 22, we need to do two things:
1) Ensure that the current head is cloned as cloneid 4 with snaps [4] by
sending a delete at snapc 4:[4].
2) Flush the data at snap sequence < 21 by sending a copyfrom with snapc
20:[20,4].

Unfortunately, it is possible that 1, 1&2, or 1 and part of the flush
process for some other now non-existent clone have already been
performed.  Because of that, between 1) and 2), we need to send
a second delete ensuring that the object does not exist at 20.

Fixes: #9054
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agotests: histogram prevent re-use of local variables 2333/head
Loic Dachary [Tue, 26 Aug 2014 19:59:39 +0000 (21:59 +0200)]
tests: histogram prevent re-use of local variables

By moving the test to a separate function.

http://tracker.ceph.com/issues/9235 Fixes: #9235

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
11 years agoReplicatedPG::start_flush: remove superfluous loop
Samuel Just [Mon, 11 Aug 2014 19:59:16 +0000 (12:59 -0700)]
ReplicatedPG::start_flush: remove superfluous loop

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoupdate license for libcephfs 2294/head
rootfs [Tue, 26 Aug 2014 19:52:37 +0000 (15:52 -0400)]
update license for libcephfs

Signed-off-by: rootfs <hchen@redhat.com>
11 years agoMerge pull request #2330 from ceph/wip-9211
Samuel Just [Tue, 26 Aug 2014 19:24:05 +0000 (12:24 -0700)]
Merge pull request #2330 from ceph/wip-9211

osd/OSDMap: encode blacklist in deterministic order

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoPG: recover from each osd at most once 2349/head
Samuel Just [Tue, 26 Aug 2014 19:02:52 +0000 (12:02 -0700)]
PG: recover from each osd at most once

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG: make the reservation sets more descriptively named
Samuel Just [Tue, 26 Aug 2014 18:38:53 +0000 (11:38 -0700)]
PG: make the reservation sets more descriptively named

These sets won't precisely be the backfill_targets or actingbackfill
shortly.

%s/sorted_backfill_set/remote_shards_to_reserve_backfill/g
%s/acting_osd_it/remote_recovery_reservation_it/g
%s/sorted_actingbackfill_set/remote_shards_to_reserve_recovery/g

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #2331 from ceph/wip-9238
Sage Weil [Tue, 26 Aug 2014 18:08:44 +0000 (11:08 -0700)]
Merge pull request #2331 from ceph/wip-9238

mds: fix FP error in ROUND_UP_TO

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agomds: fix FP error in ROUND_UP_TO 2331/head
John Spray [Tue, 26 Aug 2014 16:36:16 +0000 (17:36 +0100)]
mds: fix FP error in ROUND_UP_TO

Explicitly handle case where denominator is 0, instead of
passing into ROUND_UP_TO.

Regression from 9449520b121fc6ce0c64948386d4ff77f46f4f5f

Signed-off-by: John Spray <john.spray@redhat.com>