]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agomon/PaxosService: handle non-zero return values
Sage Weil [Tue, 19 Mar 2013 06:09:51 +0000 (23:09 -0700)]
mon/PaxosService: handle non-zero return values

If 7aec13f749035b9bef5e398c1ac3d56ceec8eb81 we started passing non-zero
return values to these completions; now we have to deal with them
accordingly.

RetryMessage behaves just like the Monitor variant.

Propose and Committed update state but otherwise ignore non-zero
return values.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: fix proposal waiter handling
Sage Weil [Tue, 19 Mar 2013 04:00:06 +0000 (21:00 -0700)]
mon/PaxosService: fix proposal waiter handling

- Cancel the propsal waiters with EAGAIN on election, etc.
- Drop the wakeup helper and open-code the one caller.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoMerge branch 'wip-rbd-import' into next
Josh Durgin [Sat, 16 Mar 2013 22:45:18 +0000 (15:45 -0700)]
Merge branch 'wip-rbd-import' into next

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agoFileJournal: queue_pos \in [get_top(), header.max_size)
Samuel Just [Wed, 13 Mar 2013 23:04:23 +0000 (16:04 -0700)]
FileJournal: queue_pos \in [get_top(), header.max_size)

If queue_pos == header.max_size when we create the entry
header magic, the entry will be rejected at get_top() on
replay.

Fixes: #4436
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoOSD: expand_pg_num after pg removes
Samuel Just [Fri, 15 Mar 2013 01:52:02 +0000 (18:52 -0700)]
OSD: expand_pg_num after pg removes

Otherwise:
1) expand_pg_num removes a splitting pg entry
2) peering thread grabs pg lock and starts split
3) OSD::consume_map grabs pg lock and starts removal

At step 2), we run afoul of the assert(is_splitting)
check in split_pgs.  This way, the would be splitting
pg is marked as removed prior to the splitting state
being updated.

Backport: bobtail
Fixes: #4449
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: ignore non MISSING pg query in ReplicaActive
Samuel Just [Fri, 15 Mar 2013 02:59:36 +0000 (19:59 -0700)]
PG: ignore non MISSING pg query in ReplicaActive

1) Replica sends notify
2) Prior to processing notify, primary queues query to replica
3) Primary processes notify and activates sending MOSDPGLog
to replica.
4) Primary does do_notifies at end of process_peering_events
and sends to Query.
5) Replica sees MOSDPGLog and activates
6) Replica sees Query and asserts.

In the above case, the Replica should simply ignore the old
Query.

Fixes: #4050
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: only try to bump max if leader
Sage Weil [Fri, 15 Mar 2013 04:10:09 +0000 (21:10 -0700)]
mon: only try to bump max if leader

I broke this in 4637752db6f8520abba160b4817323379c4a7fe0 when I
restructured this function.  Only try to increase the max if we are
the leader.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian/control: Fix for moved file
Gary Lowell [Tue, 12 Mar 2013 23:59:42 +0000 (16:59 -0700)]
debian/control:  Fix for moved file

The ceph-mds.conf file moced from the ceph package to the
ceph-mds package.  Add replaces/breaks statements to the
control file to handle this on upgrade.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agodebian: add start ceph-mds-all on ceph-mds install
Sage Weil [Thu, 14 Mar 2013 19:33:08 +0000 (12:33 -0700)]
debian: add start ceph-mds-all on ceph-mds install

This ensures that when we then start individual mds instances, we can
stop ceph-mds-all and they will get stopped.  We do the same already for
ceph-all.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 41897fcba168b409fd370d0b26016fe4d30c5a59)

12 years agoceph_common.sh: Fix sed regex in get_local_daemon_list
Gary Lowell [Thu, 14 Mar 2013 06:39:34 +0000 (23:39 -0700)]
ceph_common.sh:  Fix sed regex in get_local_daemon_list

In get_local_daemon_list() the sed expression trimming the cluster
name from the host name was trimming too much if the host name
contained hyphens.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agorbd: clean up do_import() a bit
Josh Durgin [Thu, 14 Mar 2013 16:22:56 +0000 (09:22 -0700)]
rbd: clean up do_import() a bit

Move declarations above error conditons so we can goto done almost
everywhere. Remove cpp_strerror printing, since it will be done by the
caller.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: remove fiemap use from import
Josh Durgin [Thu, 14 Mar 2013 00:05:42 +0000 (17:05 -0700)]
rbd: remove fiemap use from import

On some kernels and filesystems fiemap can be racy and provide
incorrect data even after an fsync. Later we can use SEEK_HOLE and
SEEK_DATA, but for now just detect zero runs like we do with stdin.

Basically this adapts import from stdin to work in the case of a file
or block device, and gets rid of other cruft in the import that used
fiemap.

Fixes: #4388
Backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomon: simplify assign_global_id()
Sage Weil [Wed, 13 Mar 2013 20:11:42 +0000 (13:11 -0700)]
mon: simplify assign_global_id()

Simplify the logic a bit so it is easier to follow.

Small behavior change: we will successfully allocate and return a gid that
== the max when we can't bump it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: AuthMonitor: don't return global_id right away if we're increasing it
Joao Eduardo Luis [Mon, 11 Mar 2013 23:06:19 +0000 (23:06 +0000)]
mon: AuthMonitor: don't return global_id right away if we're increasing it

This only happens on the Leader and leads to duplicate global_ids.

Fixes: #4285
Signed-off-by: Joao Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Paxos: only finish a queued proposal if there's actually *any*
Joao Eduardo Luis [Tue, 12 Mar 2013 12:37:01 +0000 (12:37 +0000)]
mon: Paxos: only finish a queued proposal if there's actually *any*

When proposing an older value learned during recovery, we don't create
a queued proposal -- we go straight through Paxos.  Therefore, when
finishing a proposal, we must be sure that we have a proposal in the queue
before dereferencing it, otherwise we will segfault.

Fixes: #4250
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agorgw: set up curl with CURL_NOSIGNAL
Yehuda Sadeh [Tue, 12 Mar 2013 19:56:01 +0000 (12:56 -0700)]
rgw: set up curl with CURL_NOSIGNAL

Fixes: #4425
Backport: bobtail
Apparently, libcurl needs that in order to be thread safe. Side
effect is that if libcurl is not compiled with c-ares support,
domain name lookups are not going to time out.
Issue affected keystone.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge branch 'wip-rbd-flatten-cache' into next
Josh Durgin [Mon, 11 Mar 2013 23:56:35 +0000 (16:56 -0700)]
Merge branch 'wip-rbd-flatten-cache' into next

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agodebian: stop ceph-mds before uninstalling ceph-mds
Sage Weil [Tue, 12 Mar 2013 00:09:37 +0000 (17:09 -0700)]
debian: stop ceph-mds before uninstalling ceph-mds

Fixes: #4384
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: invalidate cache when flattening
Josh Durgin [Sat, 9 Mar 2013 02:57:24 +0000 (18:57 -0800)]
librbd: invalidate cache when flattening

The cache stores which objects don't exist. Flatten bypasses the cache
when doing its copyups, so when it is done the -ENOENT from the cache
is treated as zeroes instead of 'need to read from parent'.

Clients that have the image open need to forgot about the cached
non-existent objects as well. Do this during ictx_refresh, while the
parent_lock is held exclusively so no new reads from the parent can
happen until the updated parent metadata is visible, so no new reads
from the parent will occur.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: add a method to clear -ENOENT caching
Josh Durgin [Sat, 9 Mar 2013 01:53:31 +0000 (17:53 -0800)]
ObjectCacher: add a method to clear -ENOENT caching

Clear the exists and complete flags for any objects that have exists
set to false, and force any in-flight reads to retry if they get
-ENOENT instead of generating zeros.

This is useful for getting the cache into a consistent state for rbd
after an image has been flattened, since many objects which previously
did not exist and went up to the parent to retrieve data may now exist
in the child.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: keep track of outstanding reads on an object
Josh Durgin [Sat, 9 Mar 2013 01:49:27 +0000 (17:49 -0800)]
ObjectCacher: keep track of outstanding reads on an object

Reads always use C_ReadFinish as a callback (and they are the only
user of this callback). Keep an xlist of these for each object, so
they can remove themselves as they finish. To prevent racing requests
and with discard removing objects from the cache, clear the xlist in
the object destructor, so if the Object is still valid the set_item
will still be on the list.

Make the ObjectCacher constructor take an Object* instead of the pool
and object id, which are derived from the Object* anyway.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoRevert "Use start-stop-daemon --chuid option to setuid to www-data."
Sage Weil [Mon, 11 Mar 2013 20:23:13 +0000 (13:23 -0700)]
Revert "Use start-stop-daemon --chuid option to setuid to www-data."

This reverts commit a99ed038ecaf170574ee75cd5ddb12f252f9bc26.

On second thought, this will require a bit more care to ensure that all
of the paths radosgw needs to read/write from have the correct permissions
in the packages and so forth.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: Paxos: increase trim tolerance from 3 to 30.
Joao Eduardo Luis [Mon, 11 Mar 2013 16:45:10 +0000 (16:45 +0000)]
mon: Paxos: increase trim tolerance from 3 to 30.

This increase only means that we'll keep more versions around before we
trim.  It doesn't change the number of versions we'll keep around after
trimming (that's still as much as 'paxos_max_join_drift', i.e. 10), nor
does it change the criteria used to consider a monitor as having drifted
(same rule applies, 'paxos_max_join_drift').

This change however will enable the leader to put off trimming for a longer
period of time, giving a better chance for a monitor to join the cluster.
See, after going through the probing phase, at which point a monitor may
only be, say, 5 versions off, the same monitor may end up getting into the
quorum only to find that in-between probing and finally triggering an
election some 6 versions might have come to existence.  Before this patch,
by then the state had been trimmed and the monitor would have to bootstrap
to perform a full store sync.  With this patch in place, the monitor would
be able to sync the remaining 11 versions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Paxos: bootstrap leader if he has fallen behind upon reaching collect
Joao Eduardo Luis [Mon, 11 Mar 2013 16:25:35 +0000 (16:25 +0000)]
mon: Paxos: bootstrap leader if he has fallen behind upon reaching collect

Fixes: #4256
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #100 from jaharkes/init
Sage Weil [Mon, 11 Mar 2013 19:00:52 +0000 (12:00 -0700)]
Merge pull request #100 from jaharkes/init

Fixes for RadosGW init script

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoUse start-stop-daemon --chuid option to setuid to www-data. 100/head
Jan Harkes [Fri, 8 Mar 2013 21:40:06 +0000 (16:40 -0500)]
Use start-stop-daemon --chuid option to setuid to www-data.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agoFix radosgw actually reloading after rotating logs.
Jan Harkes [Fri, 8 Mar 2013 17:45:57 +0000 (12:45 -0500)]
Fix radosgw actually reloading after rotating logs.

The --signal argument to Debian's start-stop-daemon doesn't
make it send a signal, but defines which signal should be send
when --stop is specified.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agomon/MonMap: don't crash on dup IP in mon host
Sage Weil [Sun, 10 Mar 2013 06:12:00 +0000 (22:12 -0800)]
mon/MonMap: don't crash on dup IP in mon host

If the mon_host line has an IP twice, we shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph_common.sh: add warning if 'host' contains dots
Dan Mick [Fri, 8 Mar 2013 23:18:54 +0000 (15:18 -0800)]
ceph_common.sh: add warning if 'host' contains dots

This is a common error and there's no reason the script can't
at least tell you it's a really bad idea.  One might argue it
could even successfully proactively truncate the host parameter
at the first dot, but that's a little controlling, perhaps.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip-osd-map' into next
Samuel Just [Fri, 8 Mar 2013 20:44:42 +0000 (12:44 -0800)]
Merge branch 'wip-osd-map' into next

Fixes: 4369
Backport: bobtail
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: mark down connections from old peers
Sage Weil [Fri, 8 Mar 2013 16:56:44 +0000 (08:56 -0800)]
osd: mark down connections from old peers

Close out any connection with an old peer.  This avoids a race like:

- peer marked down
- we get map, mark down the con
- they reconnect and try to send us some stuff
- we share our map to tell them they are old and dead, but leave the con
  open
...
- peer marks itself up a few times, eventually reuses the same port
- sends messages on their fresh con
- we discard because of our old con

This could cause a tight reconnect loop, but it is better than wrong
behavior.

Other possible fixes:
 - make addr nonce truly unique (augment pid in nonce)
 - make a smarter 'disposable' msgr state (bleh)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/PG: rename require_same_or_newer_map -> is_same_or_newer_map
Sage Weil [Fri, 8 Mar 2013 16:53:40 +0000 (08:53 -0800)]
osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map

This avoids confusion with the OSD method of the same name, and better
matches what the function tests (and does not do).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: set attrs on various list bucket xml results (swift)
Yehuda Sadeh [Fri, 22 Feb 2013 23:04:37 +0000 (15:04 -0800)]
rgw: set attrs on various list bucket xml results (swift)

Fixes: #4247
The list buckets operation was missing some attrs on the different
xml result entities. This fixes it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoformatter: add the ability to dump attrs in xml entities
Yehuda Sadeh [Fri, 22 Feb 2013 23:02:02 +0000 (15:02 -0800)]
formatter: add the ability to dump attrs in xml entities

xml entities may have attrs assigned to them. Add the ability
to set them. A usage example:

formatter->open_array_section_with_attrs("container",
     FormatterAttrs("name", "foo", NULL));

This will generate the following xml entity:
<container name="foo">

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agorgw: don't iterate through all objects when in namespace
Yehuda Sadeh [Thu, 7 Mar 2013 03:32:21 +0000 (19:32 -0800)]
rgw: don't iterate through all objects when in namespace

Fixes: #4363
Backport: argonaut, bobtail
When listing objects in namespace don't iterate through all the
objects, only go though the ones that starts with the namespace
prefix

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoosd: increate default pg log size from 1000 -> 3000
Sage Weil [Thu, 7 Mar 2013 18:31:27 +0000 (10:31 -0800)]
osd: increate default pg log size from 1000 -> 3000

This reduces the probability that we will fail to detect a dup op.  See
#4368.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-log-max' into next
Sage Weil [Thu, 7 Mar 2013 17:29:44 +0000 (09:29 -0800)]
Merge remote-tracking branch 'gh/wip-log-max' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoconfig: note which options are overridden by common_preinit()
Josh Durgin [Thu, 7 Mar 2013 01:49:51 +0000 (17:49 -0800)]
config: note which options are overridden by common_preinit()

Defaults for these differ based on the context in which they're used.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocommon: reduce default in-memory logs for non-daemons
Josh Durgin [Thu, 7 Mar 2013 01:42:03 +0000 (17:42 -0800)]
common: reduce default in-memory logs for non-daemons

The default of 100000 can result in hundreds of MBs of extra memory
used. This was most obvious when using librbd with caching enabled,
since there was a dout(0) accidentally left in the ObjectCacher.

refs: #4352
backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoinit-ceph: fix run dir
Sage Weil [Thu, 7 Mar 2013 01:09:51 +0000 (17:09 -0800)]
init-ceph: fix run dir

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: add ctor for clone_info
Sage Weil [Wed, 6 Mar 2013 18:21:59 +0000 (10:21 -0800)]
osd: add ctor for clone_info

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 439d0e334d7d0246806e5b7c6702b8198f9bed71)

12 years agoObjectCacher: fix debug log level in split
Josh Durgin [Thu, 28 Feb 2013 20:13:45 +0000 (12:13 -0800)]
ObjectCacher: fix debug log level in split

Level 0 should never be used for this kind of debugging.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge pull request #90 from grosskur/fix-debian-libsnappy
Sage Weil [Wed, 6 Mar 2013 15:54:13 +0000 (07:54 -0800)]
Merge pull request #90 from grosskur/fix-debian-libsnappy

debian: require libsnappy-dev for ceph

12 years agodebian: require libsnappy-dev for ceph 90/head
Alan Grosskurth [Wed, 6 Mar 2013 10:21:12 +0000 (02:21 -0800)]
debian: require libsnappy-dev for ceph

Debian builds are currently broken without this requirement.

12 years agorelease-process.rst: Fix typos
Gary Lowell [Wed, 6 Mar 2013 06:08:15 +0000 (22:08 -0800)]
release-process.rst:  Fix typos

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoMerge branch 'wip-prepare'
Sage Weil [Tue, 5 Mar 2013 21:33:05 +0000 (13:33 -0800)]
Merge branch 'wip-prepare'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Tested-by: Tamil Muthamizhan <tamil.muthamizhan@inktank.com>
12 years agoceph-disk-prepare: move in-use checks to the top, before zap
Sage Weil [Tue, 5 Mar 2013 21:08:26 +0000 (13:08 -0800)]
ceph-disk-prepare: move in-use checks to the top, before zap

Move the in-use checks to the very top, before we (say) zap!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/release-notes: v0.58
Sage Weil [Tue, 5 Mar 2013 19:02:19 +0000 (11:02 -0800)]
doc/release-notes: v0.58

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoUpdate doc/radosgw/s3/python.rst
carsonoid [Thu, 21 Feb 2013 22:49:17 +0000 (15:49 -0700)]
Update doc/radosgw/s3/python.rst

Note about creating conn object for non-ssl implementations.

12 years agoMerge branch 'wip-4207'
David Zafman [Tue, 5 Mar 2013 18:25:49 +0000 (10:25 -0800)]
Merge branch 'wip-4207'

Feature: #4207: osd/librados: add ops to list snaps for an object

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reported-by: Sam Just <sam.just@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
Gary Lowell [Tue, 5 Mar 2013 17:06:24 +0000 (09:06 -0800)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agoMerge branch 'next'
Gary Lowell [Tue, 5 Mar 2013 17:05:21 +0000 (09:05 -0800)]
Merge branch 'next'

12 years agoAdd list_snaps() calls to snapshots test cases
David Zafman [Sat, 2 Mar 2013 02:27:03 +0000 (18:27 -0800)]
Add list_snaps() calls to snapshots test cases

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoAdd rados listsnaps command
David Zafman [Sat, 23 Feb 2013 04:36:28 +0000 (20:36 -0800)]
Add rados listsnaps command

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosd/librados: add op to list clones/snaps for an object
David Zafman [Fri, 22 Feb 2013 23:15:06 +0000 (15:15 -0800)]
osd/librados: add op to list clones/snaps for an object

Returning snap_set_t with clone info
and snapshots in ascending order
Add clones with snapshots to obj_list_snap_response_t
New rados_types.hpp with snap_set_t/clone_info_t
Move snap_t to rados_types.hpp
Add generate_test_instances() and TYPE() to encoding/types.h

Feature: #4207

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoRemove unused SnapContext in librados.hpp
David Zafman [Thu, 28 Feb 2013 01:49:17 +0000 (17:49 -0800)]
Remove unused SnapContext in librados.hpp

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosd: Improve snapshot test
David Zafman [Wed, 27 Feb 2013 04:54:48 +0000 (20:54 -0800)]
osd: Improve snapshot test

In SelfManagedSnapRollbackPP add some overlapping writes
New SelfManagedSnapOverlap creates overlapping writes

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoosd: correct comment
David Zafman [Wed, 27 Feb 2013 01:09:14 +0000 (17:09 -0800)]
osd: correct comment

SnapSet snaps are in descending order

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoceph-disk-prepare: verify device is not in use by device-mapper
Sage Weil [Tue, 5 Mar 2013 04:57:52 +0000 (20:57 -0800)]
ceph-disk-prepare: verify device is not in use by device-mapper

Be nice and tell the user which devices/mappings are consuming the device,
too.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-prepare: verify device is not mounted before using
Sage Weil [Tue, 5 Mar 2013 00:38:57 +0000 (16:38 -0800)]
ceph-disk-prepare: verify device is not mounted before using

Make sure the data and/or journal device(s) are not in use (mounted)
before using them.  Make room for additional "in-use" checks in the future.

Closes: #3256
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian: require >= python2.6 for ceph as well
Josh Durgin [Tue, 5 Mar 2013 00:47:49 +0000 (16:47 -0800)]
debian: require >= python2.6 for ceph as well

ceph-disk-prepare and ceph-disk-activate use the with statement,
str.format, and possibly other new features from python 2.6.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoceph-disk-prepare: clean up stupid check for a digit
Sage Weil [Tue, 5 Mar 2013 00:29:57 +0000 (16:29 -0800)]
ceph-disk-prepare: clean up stupid check for a digit

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-prepare: use os.path.realpath()
Sage Weil [Tue, 5 Mar 2013 00:08:15 +0000 (16:08 -0800)]
ceph-disk-prepare: use os.path.realpath()

My janky symlink resolution is broken in various ways.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agov0.58 v0.58
Gary Lowell [Mon, 4 Mar 2013 23:18:24 +0000 (15:18 -0800)]
v0.58

12 years agoAdd X-Python-Version >=2.6 to debian control file.
Filippos Giannakos [Wed, 27 Feb 2013 11:56:08 +0000 (13:56 +0200)]
Add X-Python-Version >=2.6 to debian control file.

python-ceph complains when installed to debian squeeze about the 'with'
statement. Apparently installation tries to install the python-ceph package for
python 2.5, which does not support the 'with' statement natively.

Signed-off-by: Filippos Giannakos <philipgian@grnet.gr>
12 years agoPG,ReplicatedPG: use pg_has_reset_since to discard old async events
Samuel Just [Mon, 25 Feb 2013 21:28:31 +0000 (13:28 -0800)]
PG,ReplicatedPG: use pg_has_reset_since to discard old async events

Local async events are obsolete if the pg is deleting or if the
epoch at which they were created is prior to last_peering_reset.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 62999ea2d362b32dfc86a15dcb03b06fb5cb0572)

12 years agoPG::build_scrub_map: detect race with peering via last_peering_reset
Samuel Just [Mon, 25 Feb 2013 20:40:06 +0000 (12:40 -0800)]
PG::build_scrub_map: detect race with peering via last_peering_reset

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 67225339dc3d62d7fe5a32eec65d51e53e8d35bb)

12 years agoReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg
Samuel Just [Mon, 25 Feb 2013 20:36:29 +0000 (12:36 -0800)]
ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 04ee8f478bbd587a711d0668c471cfc5c1cab06c)

12 years agoReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted
Samuel Just [Mon, 25 Feb 2013 20:35:26 +0000 (12:35 -0800)]
ReplicatedPG::C_OSD_CommittedPushedObject take epoch submitted

What we really care about is that the epoch in which the Context
was submitted is at complete() time >= last_peering_reset.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit a01dea6af9aacf0614570ebb5fa161d9dde9b6b6)

12 years agoinit-ceph: fix --restart option
Sage Weil [Mon, 4 Mar 2013 20:34:40 +0000 (12:34 -0800)]
init-ceph: fix --restart option

Reported-by: Bryan K. Wright <bkw1a@ayesha.phys.virginia.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Updated year in footer.
John Wilkins [Mon, 4 Mar 2013 19:48:14 +0000 (11:48 -0800)]
doc: Updated year in footer.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Mon, 4 Mar 2013 18:59:50 +0000 (10:59 -0800)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: Added instructions for ensuring ceph config file and keyring prior to mounting...
John Wilkins [Mon, 4 Mar 2013 18:59:18 +0000 (10:59 -0800)]
doc: Added instructions for ensuring ceph config file and keyring prior to mounting ceph fuse.

fixes: #3796

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge pull request #89 from Elbandi/master
Sage Weil [Mon, 4 Mar 2013 18:33:15 +0000 (10:33 -0800)]
Merge pull request #89 from Elbandi/master

remove unused variable from makefile

12 years agojounal: disable aio
Sage Weil [Mon, 4 Mar 2013 18:08:49 +0000 (10:08 -0800)]
jounal: disable aio

There is a deadlock issue in the aio code, see #4079.  Disable for the time
being.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-3484'
Sage Weil [Mon, 4 Mar 2013 17:18:28 +0000 (09:18 -0800)]
Merge remote-tracking branch 'gh/wip-3484'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoBuild: no longer need to use LEVELDB_INCLUDE 89/head
Andras Elso [Fri, 1 Mar 2013 15:34:01 +0000 (16:34 +0100)]
Build: no longer need to use LEVELDB_INCLUDE

Signed-off-by: Andras Elso <elso.andras@gmail.com>
12 years agotools: ceph: add 'ceph df' usage
Joao Eduardo Luis [Sat, 2 Mar 2013 18:36:37 +0000 (18:36 +0000)]
tools: ceph: add 'ceph df' usage

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: Monitor: 'ceph df'
Joao Eduardo Luis [Fri, 1 Mar 2013 16:32:24 +0000 (16:32 +0000)]
mon: Monitor: 'ceph df'

Fixes: #3484
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agoREADME: Add libsnappy-dev to build requirements.
Gary Lowell [Sat, 2 Mar 2013 07:32:54 +0000 (23:32 -0800)]
README:  Add libsnappy-dev to build requirements.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agodoc: missing blank line in radosgw/config-ref
Dan Mick [Sat, 2 Mar 2013 03:53:33 +0000 (19:53 -0800)]
doc: missing blank line in radosgw/config-ref

12 years agoMerge pull request #85 from dalgaaf/wip-da-spec-1
Gary Lowell [Sat, 2 Mar 2013 03:09:04 +0000 (19:09 -0800)]
Merge pull request #85 from dalgaaf/wip-da-spec-1

Fix package requirements to get sgdisk and merge some changes back from SUSE spec file.

Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoMerge pull request #88 from nmtadam/master
Sage Weil [Sat, 2 Mar 2013 01:50:00 +0000 (17:50 -0800)]
Merge pull request #88 from nmtadam/master

librados.hpp typo

12 years agolibrados.hpp: replace paris with pairs 88/head
Adam Manzanares [Fri, 1 Mar 2013 23:49:26 +0000 (15:49 -0800)]
librados.hpp: replace paris with pairs

Signed-off-by: Adam Manzanares <nmtadam@gmail.com>
Working on a lua-rados library I noticed that paris was used
in the place of pairs in some comments.

12 years agodoc: Instruction should have been noout, not nodown.
John Wilkins [Fri, 1 Mar 2013 23:09:31 +0000 (15:09 -0800)]
doc: Instruction should have been noout, not nodown.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed OSD pool config settings. Should be in [global], not [osd].
John Wilkins [Fri, 1 Mar 2013 19:35:47 +0000 (11:35 -0800)]
doc: Fixed OSD pool config settings. Should be in [global], not [osd].

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoceph.spec.in: Require gptfdisk for Suse, gdisk for otherwise
Gary Lowell [Fri, 1 Mar 2013 18:38:49 +0000 (10:38 -0800)]
ceph.spec.in: Require gptfdisk for Suse, gdisk for otherwise

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoMerge pull request #87 from dalgaaf/wip-da-sca-style-2
Sage Weil [Fri, 1 Mar 2013 18:18:57 +0000 (10:18 -0800)]
Merge pull request #87 from dalgaaf/wip-da-sca-style-2

Fix more issues found via cppcheck

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoosd/Watch.cc: init NotifyTimeoutCB::canceled in constructor with false 87/head
Danny Al-Gaaf [Fri, 1 Mar 2013 17:52:27 +0000 (18:52 +0100)]
osd/Watch.cc: init NotifyTimeoutCB::canceled in constructor with false

Initialize NotifyTimeoutCB::canceled in the constructor with
false as already done in onter cases.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosd/ReplicatedPG.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Fri, 1 Mar 2013 17:44:59 +0000 (18:44 +0100)]
osd/ReplicatedPG.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoReplicatedPG.cc: remove unused variables
Danny Al-Gaaf [Fri, 1 Mar 2013 16:58:19 +0000 (17:58 +0100)]
ReplicatedPG.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoReplicatedPG.cc: remove consecutive return/break statement
Danny Al-Gaaf [Fri, 1 Mar 2013 16:55:55 +0000 (17:55 +0100)]
ReplicatedPG.cc: remove consecutive return/break statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosd/PG.cc: reduce scope of listed_collection in read_log_old()
Danny Al-Gaaf [Fri, 1 Mar 2013 16:14:53 +0000 (17:14 +0100)]
osd/PG.cc: reduce scope of listed_collection in read_log_old()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosd/PG.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Fri, 1 Mar 2013 16:11:31 +0000 (17:11 +0100)]
osd/PG.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosd/OSD.cc: remove unused variable 'map<int64_t, int> pool_resize'
Danny Al-Gaaf [Fri, 1 Mar 2013 16:05:03 +0000 (17:05 +0100)]
osd/OSD.cc: remove unused variable 'map<int64_t, int> pool_resize'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosd/OSD.cc: reduce scope of "PG *pg" in OSD::handle_pg_query()
Danny Al-Gaaf [Fri, 1 Mar 2013 15:57:13 +0000 (16:57 +0100)]
osd/OSD.cc: reduce scope of "PG *pg" in OSD::handle_pg_query()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosd/OSD.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Fri, 1 Mar 2013 15:54:26 +0000 (16:54 +0100)]
osd/OSD.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoos/IndexManager.cc: reduce scope of 'int r' in IndexManager::build_index()
Danny Al-Gaaf [Fri, 1 Mar 2013 15:37:36 +0000 (16:37 +0100)]
os/IndexManager.cc: reduce scope of 'int r' in IndexManager::build_index()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoos/LevelDBStore.h: pass const string by reference to past_prefix()
Danny Al-Gaaf [Fri, 1 Mar 2013 15:33:40 +0000 (16:33 +0100)]
os/LevelDBStore.h: pass const string by reference to past_prefix()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoos/FileStore.cc: fix warning about comparing int with bool
Danny Al-Gaaf [Fri, 1 Mar 2013 15:27:38 +0000 (16:27 +0100)]
os/FileStore.cc: fix warning about comparing int with bool

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>