]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agomon/Paxos: commit only after entire quorum acks
Sage Weil [Mon, 17 Mar 2014 23:21:17 +0000 (16:21 -0700)]
mon/Paxos: commit only after entire quorum acks

If a subset of the quorum accepts the proposal and we commit, we will start
sharing the new state.  However, the mon that didn't yet reply with the
accept may still be sharing the old and stale value.

The simplest way to prevent this is not to commit until the entire quorum
replies.  In the general case, there are no failures and this is just fine.
In the failure case, we will call a new election and have a smaller quorum
of (live) nodes and will recommit the same value.

A more performant solution would be to have a separate message invalidate
the old state and commit once we have all invalidations and a majority of
accepts.  This will lower latency a bit in the non-failure case, but not
change the failure case significantly.  Later!

Fixes: #7736
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit fa1d957c115a440e162dba1b1002bc41fc1eac43)

11 years agoPrioritizedQueue: cap costs at max_tokens_per_subqueue
Samuel Just [Thu, 13 Mar 2014 21:04:19 +0000 (14:04 -0700)]
PrioritizedQueue: cap costs at max_tokens_per_subqueue

Otherwise, you can get a recovery op in the queue which has a cost
higher than the max token value.  It won't get serviced until all other
queues also do not have enough tokens and higher priority queues are
empty.

Fixes: #7706
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 2722a0a487e77ea2aa0d18caec0bdac50cb6a264)

11 years agoFix byte-order dependency in calculation of initial challenge
Dan Mick [Thu, 3 Apr 2014 20:59:59 +0000 (13:59 -0700)]
Fix byte-order dependency in calculation of initial challenge

Fixes: #7977
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 4dc62669ecd679bc4d0ef2b996b2f0b45b8b4dc7)

11 years agorbd: return 0 and an empty list when pool is entirely empty
Josh Durgin [Wed, 1 Jan 2014 01:00:06 +0000 (17:00 -0800)]
rbd: return 0 and an empty list when pool is entirely empty

rbd_list will return -ENOENT when no rbd_directory object
exists. Handle this in the cli tool and interpret it as success with
an empty list.

Add this to the release notes since it changes command line behavior.

Fixes: #6693
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit ac547a5b7dc94282f079aef78e66348d99d9d5e9)

Conflicts:
PendingReleaseNotes
src/rbd.cc

11 years agotest: use older names for module setup/teardown
Josh Durgin [Thu, 21 Nov 2013 02:35:34 +0000 (18:35 -0800)]
test: use older names for module setup/teardown

setUp and tearDown require nosetests 0.11, but 0.10.4 is the latest on
centos. Rename to use the older aliases, which still work with newer
versions of nosetests as well.

Fixes: #6368
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit f753d56a9edba6ce441520ac9b52b93bd8f1b5b4)

11 years agoOSD: don't clear peering_wait_for_split in advance_map()
Samuel Just [Sun, 3 Nov 2013 19:06:10 +0000 (11:06 -0800)]
OSD: don't clear peering_wait_for_split in advance_map()

I really don't know why I added this...  Ops can be discarded from the
waiting_for_pg queue if we aren't primary simply because there must have
been an exchange of peering events before subops will be sent within a
particular epoch.  Thus, any events in the waiting_for_pg queue must be
client ops which should only be seen by the primary.  Peering events, on
the other hand, should only be discarded if we are in a new interval,
and that check might as well be performed in the peering wq.

Fixes: #6681
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 9ab513334c7ff9544bac07bd420c6d5d200cf535)

11 years agoMerge remote-tracking branch 'gh/wip-7888-dumpling' into dumpling
Sage Weil [Wed, 2 Apr 2014 19:57:30 +0000 (12:57 -0700)]
Merge remote-tracking branch 'gh/wip-7888-dumpling' into dumpling

11 years agoPG: fix operator<<,log_wierdness log bound warning
Samuel Just [Wed, 6 Nov 2013 05:48:53 +0000 (21:48 -0800)]
PG: fix operator<<,log_wierdness log bound warning

Split may cause holes such that head != tail and yet
log.empty().

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit c6826c1e8a301b2306530c6e5d0f4a3160c4e691)

11 years agoPGLog::rewind_divergent_log: log may not contain newhead
Samuel Just [Wed, 6 Nov 2013 01:47:48 +0000 (17:47 -0800)]
PGLog::rewind_divergent_log: log may not contain newhead

Due to split, there may be a hole at newhead.

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit f4648bc6fec89c870e0c47b38b2f13496742b10f)

11 years agoqa/workunits/fs/misc/layout_vxattrs: ceph.file.layout is not listed
Sage Weil [Sat, 29 Mar 2014 21:23:21 +0000 (14:23 -0700)]
qa/workunits/fs/misc/layout_vxattrs: ceph.file.layout is not listed

As of 08a3d6bd428c5e78dd4a10e6ee97540f66f9729c.  A similar change was made
in the kernel.

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

11 years agoMerge pull request #1519 from ceph/wip-6951-dumpling
Sage Weil [Sat, 29 Mar 2014 01:01:08 +0000 (18:01 -0700)]
Merge pull request #1519 from ceph/wip-6951-dumpling

rgw: reset objv tracker on bucket recreation

11 years agoMerge pull request #1559 from ceph/wip-7881-dumpling
Sage Weil [Sat, 29 Mar 2014 00:02:39 +0000 (17:02 -0700)]
Merge pull request #1559 from ceph/wip-7881-dumpling

Wip 7881 dumpling

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon/MonClient: use keepalive2 to verify the mon session is live
Sage Weil [Fri, 28 Mar 2014 04:33:21 +0000 (21:33 -0700)]
mon/MonClient: use keepalive2 to verify the mon session is live

Verify that the mon is responding by checking the keepalive2 reply
timestamp.  We cannot rely solely on TCP timing out and returning an
error.

Fixes: #7888
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 056151a6334c054505c54e59af40f203a0721f28)

11 years agomsgr: add KEEPALIVE2 feature
Sage Weil [Fri, 28 Mar 2014 04:09:13 +0000 (21:09 -0700)]
msgr: add KEEPALIVE2 feature

This is similar to KEEPALIVE, except a timestamp is also exchanged.  It is
sent with the KEEPALIVE, and then returned with the ACK.  The last
received stamp is stored in the Connection so that it can be queried for
liveness.  Since all of the users of keepalive are already regularly
triggering a keepalive, they can check the liveness at the same time.

See #7888.

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

Conflicts:

src/include/ceph_features.h

11 years agoPipe: rename keepalive->send_keepalive
Greg Farnum [Wed, 26 Mar 2014 22:58:10 +0000 (15:58 -0700)]
Pipe: rename keepalive->send_keepalive

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 38d4c71a456c1cc9a5044dbcae5378836a34484d)

11 years agoclient: pin Inode during readahead
Sage Weil [Thu, 27 Mar 2014 04:52:00 +0000 (21:52 -0700)]
client: pin Inode during readahead

Make sure the Inode does not go away while a readahead is in progress.  In
particular:

 - read_async
   - start a readahead
   - get actual read from cache, return
 - close/release
   - call ObjectCacher::release_set() and get unclean > 0, assert

Fixes: #7867
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit f1c7b4ef0cd064a9cb86757f17118d17913850db)

11 years agoosdc/ObjectCacher: call read completion even when no target buffer
Sage Weil [Fri, 28 Mar 2014 19:34:07 +0000 (12:34 -0700)]
osdc/ObjectCacher: call read completion even when no target buffer

If we do no assemble a target bl, we still want to return a valid return
code with the number of bytes read-ahead so that the C_RetryRead completion
will see this as a finish and call the caller's provided Context.

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

11 years agoPGLog: remove obsolete assert in merge_log 1559/head
Samuel Just [Wed, 30 Oct 2013 23:54:39 +0000 (16:54 -0700)]
PGLog: remove obsolete assert in merge_log

This assert assumes that if olog.head != log.head, olog contains
a log entry at log.head, which may not be true since pg splitting
might have left the log with arbitrary holes.

Related: 0c2769d3321bff6e85ec57c85a08ee0b8e751bcb
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 353813b2e1a98901b876790c7c531f8a202c661d)

11 years agoPGLog: on split, leave log head alone
Samuel Just [Mon, 30 Sep 2013 22:54:27 +0000 (15:54 -0700)]
PGLog: on split, leave log head alone

This way last_update doesn't go backwards.

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

11 years agoMerge pull request #1539 from ceph/wip-6910-dumpling
Sage Weil [Thu, 27 Mar 2014 00:18:24 +0000 (17:18 -0700)]
Merge pull request #1539 from ceph/wip-6910-dumpling

PG: don't query unfound on empty pgs

11 years agoPG: don't query unfound on empty pgs 1539/head
Samuel Just [Wed, 27 Nov 2013 03:17:59 +0000 (19:17 -0800)]
PG: don't query unfound on empty pgs

When the replica responds, it responds with a notify
rather than a log, which the primary then ignores since
it is already in the peer_info map.  Rather than fix that
we'll simply not send queries to peers we already know to
have no unfound objects.

Fixes: #6910
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 838b6c8387087543ce50837277f7f6b52ae87d00)

11 years agoMerge pull request #1313 from ceph/dumpling-osd-subscribe
Sage Weil [Fri, 21 Mar 2014 21:53:23 +0000 (14:53 -0700)]
Merge pull request #1313 from ceph/dumpling-osd-subscribe

Dumpling backport: clean up osd subscriptions

11 years agoMerge pull request #1485 from ceph/wip-7212.dumpling
Sage Weil [Fri, 21 Mar 2014 21:52:20 +0000 (14:52 -0700)]
Merge pull request #1485 from ceph/wip-7212.dumpling

backport 7212 fixes to dumpling

11 years agorgw: reset objv tracker on bucket recreation 1519/head
Yehuda Sadeh [Wed, 19 Feb 2014 16:11:56 +0000 (08:11 -0800)]
rgw: reset objv tracker on bucket recreation

Fixes: #6951
If we cannot create a new bucket (as it already existed), we need to
read the old bucket's info. However, this was failing as we were holding
the objv tracker that we created for the bucket creation. We need to
clear it, as subsequent read using it will fail.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 859ed33ed7f9a96f4783dfb3e130d5eb60c622dd)

11 years agoReplicatedPG: don't skip missing if sentries is empty on pgls
Samuel Just [Wed, 6 Nov 2013 22:33:03 +0000 (14:33 -0800)]
ReplicatedPG: don't skip missing if sentries is empty on pgls

Formerly, if sentries is empty, we skip missing.  In general,
we need to continue adding items from missing until we get
to next (returned from collection_list_partial) to avoid
missing any objects.

Fixes: #6633
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit c7a30b881151e08b37339bb025789921e7115288)

11 years agomon/Elector: bootstrap on timeout 1485/head
Sage Weil [Sat, 15 Feb 2014 16:59:51 +0000 (08:59 -0800)]
mon/Elector: bootstrap on timeout

Currently if an election times out we call a new
election.  If we have never joined a quorum, bootstrap
instead. This is heavier weight, but captures the case
where, during bootstrap:

 - a and b have learned each others' addresses
 - everybody calls an election
 - a and b form a quorum
 - c loops trying to call an election, but is ignored
   because a and b don't see its address in the monmap

See logs:
  ubuntu@teuthology:/var/lib/teuthworker/archive/sage-2014-02-14_13:50:04-ceph-deploy-wip-7212-sage-b-testing-basic-plana/83194

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

11 years agomon: tell MonmapMonitor first about winning an election
Sage Weil [Fri, 14 Feb 2014 19:25:52 +0000 (11:25 -0800)]
mon: tell MonmapMonitor first about winning an election

It is important in the bootstrap case that the very first paxos round
also codify the contents of the monmap itself in order to avoid any manner
of confusing scenarios where subsequent elections are called and people
try to recover and modify paxos without agreeing on who the quorum
participants are.

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

11 years agomon: only learn peer addresses when monmap == 0
Sage Weil [Fri, 14 Feb 2014 19:13:26 +0000 (11:13 -0800)]
mon: only learn peer addresses when monmap == 0

It is only safe to dynamically update the address for a peer mon in our
monmap if we are in the midst of the initial quorum formation (i.e.,
monmap.epoch == 0).  If it is a later epoch, we have formed our initial
quorum and any and all monmap changes need to be agreed upon by the quorum
and committed via paxos.

Fixes: #7212
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 7bd2104acfeff0c9aa5e648d82ed372f901f767f)
(cherry picked from commit 1996fd89fb3165a63449b135e05841579695aabd)

11 years agoceph.in: do not allow using 'tell' with interactive mode
Joao Eduardo Luis [Mon, 17 Mar 2014 14:37:09 +0000 (14:37 +0000)]
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>
(cherry picked from commit e39c213c1d230271d23b74086664c2082caecdb9)

11 years agoRGWListBucketMultiparts: init max_uploads/default_max with 0
Danny Al-Gaaf [Wed, 12 Mar 2014 21:56:44 +0000 (22:56 +0100)]
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 b23a141d54ffb39958aba9da7f87544674fa0e50)

11 years agoceph_test_rados: wait for commit, not ack
Sage Weil [Thu, 13 Mar 2014 21:49:30 +0000 (14:49 -0700)]
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>
(cherry picked from commit f2124c5846f1e9cb44e66eb2e957b8c7df3e19f4)

Conflicts:

src/test/osd/RadosModel.h

11 years agotest-upgrade-firefly: skip watch-notify system test
Josh Durgin [Thu, 13 Mar 2014 16:50:16 +0000 (09:50 -0700)]
test-upgrade-firefly: skip watch-notify system test

This also fails on mixed version clusters due to watch on a
non-existent object returning ENOENT in firefly and 0 in dumpling.

Reviewed-by: Sage Weil <sage.weil@inktank.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoqa/workunit/rados/test-upgrade-firefly: skip watch-notify test
Sage Weil [Thu, 13 Mar 2014 04:30:12 +0000 (21:30 -0700)]
qa/workunit/rados/test-upgrade-firefly: skip watch-notify test

A watch on a non-existent object now returns ENOENT in firefly; skip this
test as it will fail on a hybrid or upgraded cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1411 from ceph/wip-7076-dumpling
Sage Weil [Wed, 12 Mar 2014 04:33:40 +0000 (21:33 -0700)]
Merge pull request #1411 from ceph/wip-7076-dumpling

dumpling backport of watchers check for rbd_remove()

11 years agorgw: off-by-one in rgw_trim_whitespace()
Ray Lv [Wed, 26 Feb 2014 13:17:32 +0000 (21:17 +0800)]
rgw: off-by-one in rgw_trim_whitespace()

Fixes: #7543
Backport: dumpling

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Ray Lv <raylv@yahoo-inc.com>
(cherry picked from commit 195d53a7fc695ed954c85022fef6d2a18f68fe20)

11 years agorbd: check for watchers before trimming an image on 'rbd rm' 1411/head
Ilya Dryomov [Wed, 29 Jan 2014 14:12:01 +0000 (16:12 +0200)]
rbd: check for watchers before trimming an image on 'rbd rm'

Check for watchers before trimming image data to try to avoid getting
into the following situation:

  - user does 'rbd rm' on a mapped image with an fs mounted from it
  - 'rbd rm' trims (removes) all image data, only header is left
  - 'rbd rm' tries to remove a header and fails because krbd has a
    watcher registered on the header
  - at this point image cannot be unmapped because of the mounted fs
  - fs cannot be unmounted because all its data and metadata is gone

Unfortunately, this fix doesn't make it impossible to happen (the
required atomicity isn't there), but it's a big improvement over the
status quo.

Fixes: http://tracker.ceph.com/issues/7076
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
(cherry picked from commit 0a553cfa81b06e75585ab3c39927e307ec0f4cb6)

11 years agoMerge pull request #1407 from dachary/wip-7188-dumpling
Sage Weil [Sun, 9 Mar 2014 17:56:31 +0000 (10:56 -0700)]
Merge pull request #1407 from dachary/wip-7188-dumpling

common: ping existing admin socket before unlink (dumpling)

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocommon: ping existing admin socket before unlink 1407/head
Loic Dachary [Sat, 15 Feb 2014 10:43:13 +0000 (11:43 +0100)]
common: ping existing admin socket before unlink

When a daemon initializes it tries to create an admin socket and unlinks
any pre-existing file, regardless. If such a file is in use, it causes
the existing daemon to loose its admin socket.

The AdminSocketClient::ping is implemented to probe an existing socket,
using the "0" message. The AdminSocket::bind_and_listen function is
modified to call ping() on when it finds existing file. It unlinks the
file only if the ping fails.

http://tracker.ceph.com/issues/7188 fixes: #7188

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 45600789f1ca399dddc5870254e5db883fb29b38)

11 years agoMerge pull request #1366 from ceph/wip-6820.dumpling
Sage Weil [Wed, 5 Mar 2014 22:19:31 +0000 (14:19 -0800)]
Merge pull request #1366 from ceph/wip-6820.dumpling

mon: OSDMonitor: don't crash if formatter is invalid during osd crush dump

11 years agoMerge pull request #1377 from ceph/wip-7584
Josh Durgin [Wed, 5 Mar 2014 20:45:57 +0000 (12:45 -0800)]
Merge pull request #1377 from ceph/wip-7584

qa/workunit/rados/test-upgrade-firely.sh

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoqa/workunit/rados/test-upgrade-firely.sh 1377/head
Sage Weil [Wed, 5 Mar 2014 20:37:10 +0000 (12:37 -0800)]
qa/workunit/rados/test-upgrade-firely.sh

Skip the tests that don't pass when run against firefly OSDs.

Fixes: #7584
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1357 from ceph/wip-dumpling-removewq
Samuel Just [Tue, 4 Mar 2014 15:28:44 +0000 (07:28 -0800)]
Merge pull request #1357 from ceph/wip-dumpling-removewq

OSD: ping tphandle during pg removal

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agomon: OSDMonitor: don't crash if formatter is invalid during osd crush dump 1366/head
Joao Eduardo Luis [Fri, 22 Nov 2013 02:17:16 +0000 (02:17 +0000)]
mon: OSDMonitor: don't crash if formatter is invalid during osd crush dump

Code would assume a formatter would always be defined. If a 'plain'
formatter or even an invalid formatter were to be supplied, the monitor
would crash and burn in poor style.

Fixes: 6820
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 49d2fb71422fe4edfe5795c001104fb5bc8c98c3)

11 years agoOSD: ping tphandle during pg removal 1357/head
Samuel Just [Tue, 15 Oct 2013 20:11:29 +0000 (13:11 -0700)]
OSD: ping tphandle during pg removal

Fixes: #6528
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c658258d9e2f590054a30c0dee14a579a51bda8c)

Conflicts:
src/osd/OSD.cc

11 years agoMerge pull request #1316 from ceph/dumpling-6922
Samuel Just [Tue, 25 Feb 2014 23:47:05 +0000 (15:47 -0800)]
Merge pull request #1316 from ceph/dumpling-6922

Dumpling: Prevent extreme PG split multipliers

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1315 from ceph/dumpling-hashpspool
Samuel Just [Tue, 25 Feb 2014 23:45:45 +0000 (15:45 -0800)]
Merge pull request #1315 from ceph/dumpling-hashpspool

mon: OSDMonitor: allow (un)setting 'hashpspool' flag via 'osd pool set'

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1314 from ceph/dumpling-osd-pgstatsack
Samuel Just [Tue, 25 Feb 2014 23:44:39 +0000 (15:44 -0800)]
Merge pull request #1314 from ceph/dumpling-osd-pgstatsack

Dumpling osd pgstatsack

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agomon: OSDMonitor: allow (un)setting 'hashpspool' flag via 'osd pool set' 1315/head
Joao Eduardo Luis [Fri, 11 Oct 2013 00:43:48 +0000 (17:43 -0700)]
mon: OSDMonitor: allow (un)setting 'hashpspool' flag via 'osd pool set'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 1c2886964a0c005545abab0cf8feae7e06ac02a8)

Conflicts:

src/mon/MonCommands.h
src/mon/OSDMonitor.cc

mon: ceph hashpspool false clears the flag
instead of toggling it.
Signed-off-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 589e2fa485b94244c79079f249428d4d545fca18

Replace some of the infrastructure required by this command that
was not present in Dumpling with single-use code.
Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSDMonitor: use a different approach to prevent extreme multipliers on PG splits 1316/head
Greg Farnum [Tue, 3 Dec 2013 18:57:09 +0000 (10:57 -0800)]
OSDMonitor: use a different approach to prevent extreme multipliers on PG splits

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d8ccd73968fbd0753ca08916ebf1062cdb4d5ac1)

Conflicts:

src/mon/OSDMonitor.cc

11 years agoOSDMonitor: prevent extreme multipliers on PG splits
Greg Farnum [Mon, 2 Dec 2013 23:13:40 +0000 (15:13 -0800)]
OSDMonitor: prevent extreme multipliers on PG splits

Fixes: #6922
Backport: emperor

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit f57dad6461171c903e8b5255eaed300374b00e74)

Conflicts:

src/mon/OSDMonitor.cc

11 years agoosd: fix off-by-one is boot subscription 1313/head
Sage Weil [Sat, 22 Feb 2014 16:08:37 +0000 (08:08 -0800)]
osd: fix off-by-one is boot subscription

If we have osdmap N, we want to onetime subscribe
starting at N+1.  Among other things, it means we
hear when the NOUP flag is cleared.

This appears to have broken somewhere around
3c76b81f2f96b790b72f2088164ed8e9d5efbba1.

Fixes: #7511
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
(cherry picked from commit 70d23b9a0ad9af5ca35a627a7f93c7e610e17549)
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: use the osdmap_subscribe helper
Greg Farnum [Tue, 11 Feb 2014 20:51:19 +0000 (12:51 -0800)]
OSD: use the osdmap_subscribe helper

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 3c76b81f2f96b790b72f2088164ed8e9d5efbba1)

11 years agoOSD: create a helper for handling OSDMap subscriptions, and clean them up
Greg Farnum [Tue, 11 Feb 2014 21:34:39 +0000 (13:34 -0800)]
OSD: create a helper for handling OSDMap subscriptions, and clean them up

We've had some trouble with not clearing out subscription requests and
overloading the monitors (though only because of other bugs). Write a
helper for handling subscription requests that we can use to centralize
safety logic. Clear out the subscription whenever we get a map that covers
it; if there are more maps available than we received, we will issue another
subscription request based on "m->newest_map" at the end of handle_osd_map().

Notice that the helper will no longer request old maps which we already have,
and that unless forced it will not dispatch multiple subscribe requests
to a single monitor.
Skipping old maps is safe:
1) we only trim old maps when the monitor tells us to,
2) we do not send messages to our peers until we have updated our maps
from the monitor.
That means only old and broken OSDs will send us messages based on maps
in our past, and we can (and should) ignore any directives from them anyway.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6db3ae851d1c936de045390d18b1c6ae95f2a209)

Conflicts:

src/osd/OSD.h

11 years agomonc: new fsub_want_increment( function to make handling subscriptions easier
Greg Farnum [Tue, 11 Feb 2014 21:31:26 +0000 (13:31 -0800)]
monc: new fsub_want_increment( function to make handling subscriptions easier

Provide a subscription-modifying function which will not decrement
the start version.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 5b9c187caf6f7847aaa4a1003d200158dd32bf63)

11 years agoOSD: disable the PGStatsAck timeout when we are reconnecting to a monitor 1314/head
Greg Farnum [Wed, 12 Feb 2014 19:30:15 +0000 (11:30 -0800)]
OSD: disable the PGStatsAck timeout when we are reconnecting to a monitor

Previously, the timeout counter started as soon as we issued the reopen,
but if the reconnect process itself took a while, we might time out and
issue another reopen just as we get to the point where it's possible to
get work done. Since the mon client has its own reconnect timeouts (that is,
the OSD doesn't need to trigger those), we instead disable our timeouts
while the reconnect is happening, and then turn them back on again starting
from when we get the reconnect callback.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 64cedf6fa3ee309cc96554286bfb805e4ca89439)

Conflicts:

src/osd/OSD.cc

11 years agomonc: backoff the timeout period when reconnecting
Greg Farnum [Wed, 12 Feb 2014 21:51:48 +0000 (13:51 -0800)]
monc: backoff the timeout period when reconnecting

If the monitors are systematically slowing down, we don't want to spam
them with reconnect attempts every three seconds. Instead, every time
we issue a reconnect, multiply our timeout period by a configurable; when
we complete the connection, reduce that multipler by 50%. This should let
us respond to monitor load.
Of course, we don't want to do that for initial startup in the case of a
couple down monitors, so don't apply the backoff until we've successfully
connected to a monitor at least once.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 794c86fd289bd62a35ed14368fa096c46736e9a2)

11 years agomonc: set "hunting" to true when we reopen the mon session
Greg Farnum [Wed, 12 Feb 2014 21:37:50 +0000 (13:37 -0800)]
monc: set "hunting" to true when we reopen the mon session

If we don't have a connecton to a monitor, we want to retry to another
monitor regardless of whether it's the first time or not.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 60da8abe0ebf17ce818d6fcc6391401878123bb7)

11 years agomonc: let users specify a callback when they reopen their monitor session
Greg Farnum [Wed, 12 Feb 2014 01:53:56 +0000 (17:53 -0800)]
monc: let users specify a callback when they reopen their monitor session

Then the callback is triggered when a new session is established, and the
daemon can do whatever it likes. There are no guarantees about how long it
might take to trigger, though. In particular we call the provided callback
while not holding our own lock in order to avoid deadlock. This could lead
to some funny ordering from the user's perspective if they call
reopen_session() again before getting the callback, but there's no way around
that, so they just have to use it appropriately.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 1a8c43474bf36bfcf2a94bf9b7e756a2a99f33fd)

11 years agorgw: multi object delete should be idempotent
Yehuda Sadeh [Wed, 12 Feb 2014 00:54:05 +0000 (16:54 -0800)]
rgw: multi object delete should be idempotent

Fixes: #7346
When doing a multi object delete, if an object does not exist then we
should return a success code for that object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 8ca3d95bf633ea9616852cec74f02285a03071d5)

Conflicts:
src/rgw/rgw_op.cc

11 years agov0.67.7 v0.67.7
Ken Dreyer [Wed, 19 Feb 2014 18:09:39 +0000 (18:09 +0000)]
v0.67.7

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
11 years agoradosgw-admin: fix object policy read op
Yehuda Sadeh [Mon, 6 Jan 2014 20:53:58 +0000 (12:53 -0800)]
radosgw-admin: fix object policy read op

Fixes: #7083
This was broken when we fixed #6940. We use the same function to both
read the bucket policy and the object policy. However, each needed to be
treated differently. Restore old behavior for objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit b1976dd00f5b29c01791272f63a18250319f2edb)

11 years agoMerge pull request #1243 from dachary/wip-ceph-disk-dumpling
Sage Weil [Sun, 16 Feb 2014 06:20:45 +0000 (22:20 -0800)]
Merge pull request #1243 from dachary/wip-ceph-disk-dumpling

ceph-disk: unit tests (dumpling)

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoadd autotools-generated files to .gitignore
Ken Dreyer [Fri, 3 Jan 2014 23:38:25 +0000 (16:38 -0700)]
add autotools-generated files to .gitignore

When running "make check", Automake generates test-suite.log, along with
various *.log and *.trs files in the tree. Add these files to
.gitignore.

(It looks like this feature arrived in Automake 1.13.)

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
(cherry picked from commit bb8b7503b03fac5830fb71b9723963fdc803ca90)

11 years agoceph-disk: unit tests 1243/head
Loic Dachary [Sat, 15 Feb 2014 17:34:04 +0000 (18:34 +0100)]
ceph-disk: unit tests

src/test/ceph-disk.sh replaces src/test/cli/ceph-disk/data-dir.t

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: cannot run unit tests
Loic Dachary [Thu, 2 Jan 2014 21:42:17 +0000 (22:42 +0100)]
ceph-disk: cannot run unit tests

Because ceph-disk relies on hardcoded paths. The corresponding test will
be added back when ceph-disk can run from sources.

Fixes: #7085
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 2ba6930d62263a39f150ab43bf8cd860b9245188)

11 years agoRevert "librbd: remove limit on number of objects in the cache"
Sage Weil [Sat, 15 Feb 2014 07:52:06 +0000 (23:52 -0800)]
Revert "librbd: remove limit on number of objects in the cache"

This reverts commit 367cf1bbf86233eb20ff2304e7d6caab77b84fcc.

Removing the limit on objects means we leak memory, since Objects without
any buffers can exist in the cache.

11 years agoos/FileStore: fix ENOENT error code for getattrs()
Sage Weil [Mon, 7 Oct 2013 12:22:20 +0000 (05:22 -0700)]
os/FileStore: fix ENOENT error code for getattrs()

In commit dc0dfb9e01d593afdd430ca776cf4da2c2240a20 the omap xattrs code
moved up a block and r was no longer local to the block.  Translate
ENOENT -> 0 to compensate.

Fix the same error in _rmattrs().

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 6da4b91c07878e07f23eee563cf1d2422f348c2f)

11 years agotest/filestore/run_seed_to.sh: avoid obsolete --filestore-xattr-use-omap
Sage Weil [Tue, 15 Oct 2013 23:00:26 +0000 (16:00 -0700)]
test/filestore/run_seed_to.sh: avoid obsolete --filestore-xattr-use-omap

This option no longer exists.

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

11 years agorelease build 67.6 v0.67.6
Alfredo Deza [Thu, 13 Feb 2014 20:20:42 +0000 (20:20 +0000)]
release build 67.6

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
11 years agoMerge pull request #1232 from ceph/dumpling-7334
Sage Weil [Thu, 13 Feb 2014 14:55:37 +0000 (06:55 -0800)]
Merge pull request #1232 from ceph/dumpling-7334

backport ceph-disk improvements to dumpling

http://pulpito.ceph.com/ubuntu-2014-02-12_16:52:33-ceph-deploy-dumpling-7334-testing-basic-plana/

11 years agocommon,os: Remove filestore_xattr_use_omap option 1226/head
David Zafman [Fri, 27 Sep 2013 23:23:09 +0000 (16:23 -0700)]
common,os: Remove filestore_xattr_use_omap option

Now we operate just like when this was set to true

Fixes: #6143
Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit dc0dfb9e01d593afdd430ca776cf4da2c2240a20)

11 years agoadd support for absence of PATH 1232/head
Alfredo Deza [Wed, 12 Feb 2014 21:43:59 +0000 (16:43 -0500)]
add support for absence of PATH

Note that this commit is actually bisecting the changes from
Loic Dachary that touch ceph-disk only (ad515bf). As that changeset
also touches other files it causes conflicts that are not resolvable
for backporting it to dumpling.

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
11 years agoceph-disk: make initial journal files 0 bytes
Sage Weil [Tue, 10 Sep 2013 05:27:23 +0000 (22:27 -0700)]
ceph-disk: make initial journal files 0 bytes

The ceph-osd will resize journal files up and properly fallocate() them
so that the blocks are preallocated and (hopefully) contiguous.  We
don't need to do it here too, and getting fallocate() to work from
python is a pain in the butt.

Fixes: #5981
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a786ad773cd33880075f1deb3691528d1afd03ec)

11 years agoalert the user about error messages from partx
Alfredo Deza [Mon, 10 Feb 2014 20:07:55 +0000 (15:07 -0500)]
alert the user about error messages from partx

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit 9bcc42a3e6b08521694b5c0228b2c6ed7b3d312e)

11 years agouse partx for red hat or centos instead of partprobe
Alfredo Deza [Fri, 7 Feb 2014 16:55:01 +0000 (11:55 -0500)]
use partx for red hat or centos instead of partprobe

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit 42900ff9da9f5adcac239a84ebf4d2e407c29699)

11 years agoceph-disk: run the right executables from udev
Josh Durgin [Wed, 29 Jan 2014 01:26:58 +0000 (17:26 -0800)]
ceph-disk: run the right executables from udev

When run by the udev rules, PATH is not defined. Thus,
ceph-disk-activate relies on its which() function to locate the
correct executable.  The which() function used os.defpath if none was
set, and this worked for anything using it.

ad6b4b4b08b6ef7ae8086f2be3a9ef521adaa88c added a new default value to
PATH, so only /usr/bin was checked by callers that did not use
which(). This resulted in the mount command not being found when
ceph-disk-activate was run by udev, and thus osds failing to start
after being prepared by ceph-deploy.

Make ceph-disk consistently use the existing helpers (command() and
command_check_call()) that use which(), so lack of PATH does not
matter. Simplify _check_output() to use command(),
another wrapper around subprocess.Popen.

Fixes: #7258
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit d7b0c7faafd37e4ae8a1680edfa60c22b419cbd8)

11 years agoceph-disk: implement --sysconfdir as /etc/ceph
Loic Dachary [Fri, 3 Jan 2014 15:06:55 +0000 (16:06 +0100)]
ceph-disk: implement --sysconfdir as /etc/ceph

Replace hardcoded /etc/ceph with the SYSCONFDIR global variable and
implement the --sysconfdir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit a71025d33621257b6fd6632516cfed2849ff1637)

11 years agoceph-disk: implement --statedir as /var/lib/ceph
Loic Dachary [Fri, 3 Jan 2014 15:03:09 +0000 (16:03 +0100)]
ceph-disk: implement --statedir as /var/lib/ceph

Replace hardcoded /var/lib/ceph with the STATEDIR global variable and
implement the --statedir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit ca713f48ae7a1fece2869f1a1c97d23ab33fb441)

11 years agoceph-disk: add copyright notice
Loic Dachary [Wed, 1 Jan 2014 21:05:03 +0000 (22:05 +0100)]
ceph-disk: add copyright notice

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 51ee3c04777aaf6b9609dde9bc318b5c66c70787)

11 years agoceph-disk: create the data directory if it does not exist
Loic Dachary [Wed, 1 Jan 2014 21:11:30 +0000 (22:11 +0100)]
ceph-disk: create the data directory if it does not exist

Instead of failing if the OSD data directory does not exist, create
it. Only do so if the data directory is not enforced to be a device via
the use of the --data-dev flag. The directory is not recursively created.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 306b099ab093bfac466d68fe1cb87367bc01e577)

11 years agoceph-disk: run ceph-osd when --mark-init=none
Loic Dachary [Mon, 30 Dec 2013 23:03:42 +0000 (00:03 +0100)]
ceph-disk: run ceph-osd when --mark-init=none

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 0fcc081858fae4febbb6a613a93cfbbcedd5a320)

11 years agoceph-disk: implement --mark-init=none
Loic Dachary [Mon, 30 Dec 2013 22:57:39 +0000 (23:57 +0100)]
ceph-disk: implement --mark-init=none

It is meant to be used when preparing and activating a directory that is
not to be used with init. No file is created to identify the init
system, no symbolic link is made to the directory in /var/lib/ceph
and the init scripts are not called.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit e773b68f4c89ac56b425c710d7dcdc3d74a92926)

11 years agoceph-disk: fsid is a known configuration option
Loic Dachary [Wed, 1 Jan 2014 21:07:57 +0000 (22:07 +0100)]
ceph-disk: fsid is a known configuration option

Use get_conf_with_default instead of get_conf because fsid is a known
ceph configuration option. It allows overriding via CEPH_ARGS which is
convenient for testing. Only options that are not found in config_opts.h
are fetch via get_conf.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit b65eb377f5e93ea85644e4c0939365fd7ac36072)

11 years agoceph-disk: use CalledProcessError.returncode
Loic Dachary [Wed, 1 Jan 2014 21:06:29 +0000 (22:06 +0100)]
ceph-disk: use CalledProcessError.returncode

CalledProcessError has no errno data member

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 97f516a1ddfb2d014e1f7e762c4155e4b9bcb90b)

11 years agoceph-disk: display the command output on OSD creation failure
Loic Dachary [Wed, 1 Jan 2014 21:13:15 +0000 (22:13 +0100)]
ceph-disk: display the command output on OSD creation failure

The string form of a CalledProcessError instance does not include the
output datamember. Add it to the Error exception for debug purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit d09af0fa50f322c9e59765f3badd497f5ca184d4)

11 years agoceph-disk: which() uses PATH first
Loic Dachary [Mon, 30 Dec 2013 22:07:27 +0000 (23:07 +0100)]
ceph-disk: which() uses PATH first

Instead of relying on a hardcoded set of if paths. Although this has the
potential of changing the location of the binary being used by ceph-disk
on an existing installation, it is currently only used for sgdisk. It
could be disruptive for someone using a modified version of sgdisk but
the odds of this happening are very low.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 2b935bbf60bafb6dd488c0eb30f156fce1b9d197)

11 years agoceph-disk: add --prepend-to-path to control execution
Loic Dachary [Mon, 30 Dec 2013 21:48:46 +0000 (22:48 +0100)]
ceph-disk: add --prepend-to-path to control execution

/usr/bin is hardcoded in front of some ceph programs which makes it
impossible to control where they are located via the PATH.

The hardcoded path cannot be removed altogether because it will most
likely lead to unexpected and difficult to diagnose problems for
existing installations where the PATH finds the program elsewhere.

The --prepend-to-path flag is added and defaults to /usr/bin : it prepends
to the PATH environment variable. The hardcoded path is removed
and the PATH will be used: since /usr/bin is searched first, the
legacy behavior will not change.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit ad6b4b4b08b6ef7ae8086f2be3a9ef521adaa88c)

11 years agoceph-disk: make exception handling terse in main_activate_journal
Loic Dachary [Mon, 30 Dec 2013 16:15:29 +0000 (17:15 +0100)]
ceph-disk: make exception handling terse in main_activate_journal

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 908348b8047e8577ecf9133f2683f91423694416)

11 years agoceph-disk: do not hide main_activate() exceptions
Loic Dachary [Mon, 30 Dec 2013 16:13:47 +0000 (17:13 +0100)]
ceph-disk: do not hide main_activate() exceptions

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 55ca7bb2da73f1be1293710a635cfea42abd7682)

11 years agoceph-disk: fix activate() indent
Loic Dachary [Mon, 30 Dec 2013 16:11:30 +0000 (17:11 +0100)]
ceph-disk: fix activate() indent

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 324804a81c37ff89f2488e2ba106033c0e6e119e)

11 years agoceph-disk: remove noop try:
Loic Dachary [Mon, 30 Dec 2013 16:09:35 +0000 (17:09 +0100)]
ceph-disk: remove noop try:

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit de0050596b5f56863c3486c1cd5e7ffea62e3d00)

11 years agoceph-disk: fix Error() messages formatting
Loic Dachary [Mon, 30 Dec 2013 15:57:36 +0000 (16:57 +0100)]
ceph-disk: fix Error() messages formatting

Mainly using % instead of ,

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit b82ccfbfa786cd5436b48ec38276c5a48028ce1d)

11 years agoceph-disk: prepare --data-dir must not override files
Loic Dachary [Mon, 30 Dec 2013 11:26:20 +0000 (12:26 +0100)]
ceph-disk: prepare --data-dir must not override files

ceph-disk does nothing when given a device that is already prepared. If
given a directory that already contains a successfully prepared OSD, it
will however override it.

Instead of overriding the files in the osd data directory, return
immediately if the magic file exists. Make it so the magic file is
created last to accurately reflect the success of the OSD preparation.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 7dfe550ce18623cde4ae43a2416e31ef81381ab9)

11 years agoceph-disk: zap needs at least one device
Loic Dachary [Sun, 15 Dec 2013 14:34:17 +0000 (15:34 +0100)]
ceph-disk: zap needs at least one device

If given no argument, ceph-disk zap should display the usage instead of
silently doing nothing. Silence can be confused with "I zapped all the
disks".

http://tracker.ceph.com/issues/6981 fixes #6981

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 07888ef3fd4440332c8287d0faa9f23a32cf141c)

11 years agouse the new get_command helper in check_call
Alfredo Deza [Fri, 13 Dec 2013 17:06:25 +0000 (12:06 -0500)]
use the new get_command helper in check_call

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit 897dfc113fe3b86f3dda53172933bfd4f8089869)

11 years agouse the absolute path for executables if found
Alfredo Deza [Thu, 12 Dec 2013 16:16:38 +0000 (11:16 -0500)]
use the absolute path for executables if found

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit a9334a1c8c6681305e76b361377864d0dd1e3d34)

11 years agoremove trailing semicolon
Alfredo Deza [Thu, 12 Dec 2013 15:26:05 +0000 (10:26 -0500)]
remove trailing semicolon

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit 43561f791607f5fd6f03d5421e1f30a29fb4194e)

11 years agoreplace sgdisk subprocess calls with a helper
Alfredo Deza [Wed, 11 Dec 2013 20:41:45 +0000 (15:41 -0500)]
replace sgdisk subprocess calls with a helper

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
(cherry picked from commit e19e38012bc4579054f63865e682c8c3a7829c7b)

11 years agoCall --mbrtogpt on journal run of sgdisk should the drive require a GPT table.
Jonathan Davies [Tue, 3 Dec 2013 21:26:43 +0000 (21:26 +0000)]
Call --mbrtogpt on journal run of sgdisk should the drive require a GPT table.

Signed-off-by: Jonathan Davies <jonathan.davies@canonical.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 35011e0b01d65e4c001876882d597451f2028345)

11 years agoceph-disk: blacklist /dev/fd0
Loic Dachary [Thu, 21 Nov 2013 12:21:22 +0000 (13:21 +0100)]
ceph-disk: blacklist /dev/fd0

blkid -s TYPE /dev/fd0 has been verified to hang forever on a
H8DMR-82 supermicro motherboard running

3.8.0-33-generic #48~precise1-Ubuntu SMP Thu Oct 24 16:28:06 UTC 2013
x86_64

It is unlikely that ceph will ever be used on floppy disks, they
can be blacklisted.

http://tracker.ceph.com/issues/6827 fixes: #6827

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 65701978715237ff5a4c68573c0696fd9d438e4f)