]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agomon/PaxosService: not active during paxos UPDATING_PREVIOUS 342/head
Sage Weil [Fri, 7 Jun 2013 18:41:21 +0000 (11:41 -0700)]
mon/PaxosService: not active during paxos UPDATING_PREVIOUS

Treat this as an extension of the recovery process, e.g.

 RECOVERING -> ACTIVE
or
 RECOVERING -> UPDATING_PREVIOUS -> ACTIVE

and we are not active until we get to "the end" in both cases.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: simplify states
Sage Weil [Fri, 7 Jun 2013 18:40:22 +0000 (11:40 -0700)]
mon: simplify states

- make states mutually exclusive (an enum)
- rename locked -> updating_previous
- set state prior to begin() to simplify things a bit

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: not readable when LOCKED
Sage Weil [Fri, 7 Jun 2013 18:14:58 +0000 (11:14 -0700)]
mon/Paxos: not readable when LOCKED

If we are re-proposing a previously accepted value from a previous quorum,
we should not consider it readable, because it is possible it was exposed
to clients as committed (2/3 accepted) but not recored to be committed, and
we do not want to expose old state as readable when new state was
previously readable.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: cleanup: drop unused PREPARING state bit
Sage Weil [Fri, 7 Jun 2013 18:07:38 +0000 (11:07 -0700)]
mon/Paxos: cleanup: drop unused PREPARING state bit

This is never set when we block, and nobody looks at it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: simplify is_writeable
Sage Weil [Thu, 6 Jun 2013 22:20:05 +0000 (15:20 -0700)]
mon/PaxosService: simplify is_writeable

Recast this in terms of paxos check + our conditions, and make it
match wait_for_writeable().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: simplify readable check
Sage Weil [Wed, 5 Jun 2013 00:03:15 +0000 (17:03 -0700)]
mon/PaxosService: simplify readable check

Recast this in terms of the paxos check and our additional conditions,
which match wait_for_readable().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/MonmapMonitor: remove some dead code
Sage Weil [Fri, 31 May 2013 22:35:55 +0000 (15:35 -0700)]
mon/MonmapMonitor: remove some dead code

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/MonmapMonitor: fix typo in check to remove mkfs info
Sage Weil [Fri, 31 May 2013 21:53:19 +0000 (14:53 -0700)]
mon/MonmapMonitor: fix typo in check to remove mkfs info

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix whitespace
Sage Weil [Fri, 31 May 2013 21:53:05 +0000 (14:53 -0700)]
mon: fix whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: debug proposal timers
Sage Weil [Fri, 31 May 2013 21:30:13 +0000 (14:30 -0700)]
mon: debug proposal timers

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: simplify Monitor::init_paxos()
Sage Weil [Fri, 31 May 2013 23:45:08 +0000 (16:45 -0700)]
mon: simplify Monitor::init_paxos()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: go active *after* refreshing
Sage Weil [Fri, 31 May 2013 23:39:37 +0000 (16:39 -0700)]
mon/Paxos: go active *after* refreshing

The update_from_paxos() methods occasionally like to trigger new activity.
As long as they check is_readable() and is_writeable(), they will defer
until we go active and that activity will happen in the normal callbacks.

This fixes the problem where we active but is_writeable() is still false,
triggered by PGMonitor::check_osd_map().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: safely signal bootstrap from MonmapMonitor::update_from_paxos()
Sage Weil [Fri, 31 May 2013 22:32:06 +0000 (15:32 -0700)]
mon: safely signal bootstrap from MonmapMonitor::update_from_paxos()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: do paxos refresh in finish_proposal; and refactor
Sage Weil [Sun, 2 Jun 2013 23:57:11 +0000 (16:57 -0700)]
mon/Paxos: do paxos refresh in finish_proposal; and refactor

Do the paxos refresh inside finish_proposal, ordered *after* the leader
assertion so that MonmapMonitor::update_from_paxos() calling bootstrap()
does not kill us.

Also, remove unnecessary finish_queued_proposal() and move the logic inline
where the bad leader assertion is obvious.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: cache {first,last}_committed
Joao Eduardo Luis [Sun, 2 Jun 2013 23:15:02 +0000 (16:15 -0700)]
mon/PaxosService: cache {first,last}_committed

Refresh the in-memory values when we are told the on-disk paxos state
may have changed.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: no need to refresh from _active
Sage Weil [Fri, 31 May 2013 21:30:48 +0000 (14:30 -0700)]
mon: no need to refresh from _active

The refresh is done explicitly by the monitor, independent of the more
fragile PaxosService callbacks.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: remove unnecessary update_from_paxos calls
Sage Weil [Sun, 2 Jun 2013 23:10:57 +0000 (16:10 -0700)]
mon: remove unnecessary update_from_paxos calls

The refresh() will do this when the state changes; no need to
opportunistically call this method all of the time.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: explicitly refresh_from_paxos() when leveldb state changes
Sage Weil [Sun, 2 Jun 2013 23:14:01 +0000 (16:14 -0700)]
mon: explicitly refresh_from_paxos() when leveldb state changes

Instead of opportunistically calling each service's update_from_paxos(),
instead explicitly refresh all in-memory state whenever we know the
paxos state may have changed.  This is simpler and less fragile.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix warning
Sage Weil [Wed, 19 Jun 2013 17:50:49 +0000 (10:50 -0700)]
client: fix warning

client/Client.cc: In member function 'int Client::_read_sync(Fh*, uint64_t, uint64_t, ceph::bufferlist*)':
warning: client/Client.cc:5831:13: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Wed, 19 Jun 2013 16:58:54 +0000 (09:58 -0700)]
Merge branch 'next'

12 years agoRevert "client: fix warning"
Sage Weil [Wed, 19 Jun 2013 16:58:41 +0000 (09:58 -0700)]
Revert "client: fix warning"

This reverts commit 4a3127f48d75121745f81d1aba723cb7f867f790.

Wrong branch.

12 years agomon: Monitor: make sure we backup a monmap during sync start
Joao Eduardo Luis [Wed, 19 Jun 2013 01:50:45 +0000 (02:50 +0100)]
mon: Monitor: make sure we backup a monmap during sync start

First of all, we must find a monmap to backup.  The newest version.

Secondly, we must make sure we back it up before clearing the store.

Finally, we must make sure that we don't remove said backup while
clearing the store; otherwise, we would be out of a backup monmap if the
sync happened to fail (and if the monitor happened to be killed before a
new sync had finished).

This patch makes sure these conditions are met.

Fixes: #5256 (partially)
Backport: cuttlefish

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: obtain latest monmap on sync store init
Joao Eduardo Luis [Wed, 19 Jun 2013 01:36:44 +0000 (02:36 +0100)]
mon: Monitor: obtain latest monmap on sync store init

Always use the highest version amongst all the typically available
monmaps: whatever we have in memory, whatever we have under the
MonmapMonitor's store, and whatever we have backed up from a previous
sync.  This ensures we always use the newest version we came across
with.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: don't remove 'mon_sync' when clearing the store during abort
Joao Eduardo Luis [Wed, 19 Jun 2013 01:21:58 +0000 (02:21 +0100)]
mon: Monitor: don't remove 'mon_sync' when clearing the store during abort

Otherwise, we will end up losing the monmap we backed up when we started
the sync, and the monitor may be unable to start if it is killed or
crashes in-between the sync abort and finishing a new sync.

Fixes: #5256 (partially)
Backport: cuttlefish

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'upstream/wip-log-rewrite-sam'
Samuel Just [Wed, 19 Jun 2013 03:54:48 +0000 (20:54 -0700)]
Merge remote-tracking branch 'upstream/wip-log-rewrite-sam'

Fixes: #5232
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoAuthMonitor: auth export's status message to ss, not ds
Dan Mick [Tue, 18 Jun 2013 22:44:04 +0000 (15:44 -0700)]
AuthMonitor: auth export's status message to ss, not ds

This puts it on stderr, not stdout

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agodoc: Fixed OpenStack Keystone instruction.
John Wilkins [Tue, 18 Jun 2013 22:14:30 +0000 (15:14 -0700)]
doc: Fixed OpenStack Keystone instruction.

fixes: #5178

12 years agoceph.spec: create /var/run on package install
Sage Weil [Tue, 18 Jun 2013 21:51:08 +0000 (14:51 -0700)]
ceph.spec: create /var/run on package install

The %ghost %dir ... line will make this get cleaned up but won't install
it.

Reported-by: Derek Yarnell <derek@umiacs.umd.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Tue, 18 Jun 2013 21:27:16 +0000 (14:27 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: Updated deployment preflight.
John Wilkins [Tue, 18 Jun 2013 21:26:30 +0000 (14:26 -0700)]
doc: Updated deployment preflight.

fixes: #5266

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agotest_rados.py: add some tests for mon_command
Dan Mick [Tue, 18 Jun 2013 19:20:33 +0000 (12:20 -0700)]
test_rados.py: add some tests for mon_command

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorados.py: wrap target in c_char_p()
Dan Mick [Tue, 18 Jun 2013 18:05:52 +0000 (11:05 -0700)]
rados.py: wrap target in c_char_p()

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorados.py: return error strings even if ret != 0
Dan Mick [Tue, 18 Jun 2013 18:05:10 +0000 (11:05 -0700)]
rados.py: return error strings even if ret != 0

Key rados_free() off returned length, not ret

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoceph.in: pass parsed conffile to Rados constructor
Dan Mick [Tue, 18 Jun 2013 18:04:15 +0000 (11:04 -0700)]
ceph.in: pass parsed conffile to Rados constructor

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoceph.in: global var dontsplit should be capitalized
Dan Mick [Tue, 18 Jun 2013 18:03:24 +0000 (11:03 -0700)]
ceph.in: global var dontsplit should be capitalized

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoFileStore: optionally compact leveldb on mount
Samuel Just [Tue, 18 Jun 2013 20:09:12 +0000 (13:09 -0700)]
FileStore: optionally compact leveldb on mount

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoclient: fix warning
Sage Weil [Tue, 18 Jun 2013 21:09:18 +0000 (14:09 -0700)]
client: fix warning

signed/unsigned comparison

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoFileStore::lfn_open: don't call get_index under fdcache_lock
Samuel Just [Tue, 18 Jun 2013 20:11:45 +0000 (13:11 -0700)]
FileStore::lfn_open: don't call get_index under fdcache_lock

lfn_open() is called with indexes locked, so we cannot lock
and index under fdcache_lock.

Fixes: #5389
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agocommon/Preforker: fix warning
Sage Weil [Tue, 18 Jun 2013 03:32:15 +0000 (20:32 -0700)]
common/Preforker: fix warning

common/Preforker.h: In member function ‘int Preforker::signal_exit(int)’:
warning: common/Preforker.h:82:45: ignoring return value of ‘ssize_t safe_write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]

This is harder than it should be to fix.  :(
  http://stackoverflow.com/questions/3614691/casting-to-void-doesnt-remove-warn-unused-result-error

Whatever, I guess we can do something useful with this return value.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoclient: fix warning
Sage Weil [Tue, 18 Jun 2013 03:28:24 +0000 (20:28 -0700)]
client: fix warning

client/Client.cc: In member function 'virtual void Client::ms_handle_remote_reset(Connection*)':
warning: client/Client.cc:7892:9: enumeration value 'STATE_NEW' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_OPEN' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_CLOSED' not handled in switch [-Wswitch]

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoconfig.h: ensure U64 option defaults are computed as 64 bits
Samuel Just [Mon, 17 Jun 2013 21:49:51 +0000 (14:49 -0700)]
config.h: ensure U64 option defaults are computed as 64 bits

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Tue, 18 Jun 2013 02:55:55 +0000 (19:55 -0700)]
Merge branch 'next'

12 years agoclient: handle reset during initial mds session open
Sage Weil [Mon, 17 Jun 2013 23:38:26 +0000 (16:38 -0700)]
client: handle reset during initial mds session open

If we get a reset during our attempt to open an MDS session, close out the
Connection* and retry to open the session, moving the waiters over.

Fixes: #5379
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomon: fix 'osd dump <epoch>'
Sage Weil [Mon, 17 Jun 2013 23:39:30 +0000 (16:39 -0700)]
mon: fix 'osd dump <epoch>'

The optional epoch argument was missing from the command spec.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge branch 'wip-5194' into next
Sage Weil [Mon, 17 Jun 2013 22:46:47 +0000 (15:46 -0700)]
Merge branch 'wip-5194' into next

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoceph-disk: add some notes on wth we are up to
Sage Weil [Mon, 17 Jun 2013 22:43:40 +0000 (15:43 -0700)]
ceph-disk: add some notes on wth we are up to

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest/osd/TestPGLog: %s/dirty()/is_dirty()
Samuel Just [Fri, 14 Jun 2013 21:53:38 +0000 (14:53 -0700)]
test/osd/TestPGLog: %s/dirty()/is_dirty()

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: check for dirty_to != eversion_t() and dirty_from != eversion_t::max()
Samuel Just [Fri, 14 Jun 2013 17:51:03 +0000 (10:51 -0700)]
PGLog: check for dirty_to != eversion_t() and dirty_from != eversion_t::max()

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: rename dirty() to is_dirty()
Samuel Just [Fri, 14 Jun 2013 17:47:27 +0000 (10:47 -0700)]
PGLog: rename dirty() to is_dirty()

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: only iterate over dirty portions of the log
Samuel Just [Thu, 13 Jun 2013 17:08:29 +0000 (10:08 -0700)]
PGLog: only iterate over dirty portions of the log

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog,PG: use normal log dirtying and writing for append and trim
Samuel Just [Thu, 13 Jun 2013 16:57:32 +0000 (09:57 -0700)]
PGLog,PG: use normal log dirtying and writing for append and trim

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: add debug check on written keys, verify on write
Samuel Just [Wed, 12 Jun 2013 21:43:23 +0000 (14:43 -0700)]
PGLog: add debug check on written keys, verify on write

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agotest/osd/TestPGLog: fix pglog unittests for dirty_log and ondisklog
Samuel Just [Mon, 10 Jun 2013 23:46:22 +0000 (16:46 -0700)]
test/osd/TestPGLog: fix pglog unittests for dirty_log and ondisklog

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG,PGLog: remove dirty_log arguments
Samuel Just [Mon, 10 Jun 2013 23:30:13 +0000 (16:30 -0700)]
PG,PGLog: remove dirty_log arguments

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: replace dirty_log with mark_dirty_*
Samuel Just [Thu, 13 Jun 2013 20:49:17 +0000 (13:49 -0700)]
PGLog: replace dirty_log with mark_dirty_*

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: move instances of log dirtying in PG into PGLog
Samuel Just [Mon, 10 Jun 2013 22:43:20 +0000 (15:43 -0700)]
PG: move instances of log dirtying in PG into PGLog

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: track dirty_to and dirty_from for log
Samuel Just [Mon, 10 Jun 2013 22:42:19 +0000 (15:42 -0700)]
PGLog: track dirty_to and dirty_from for log

This allows the log to only write out/clear the keys
which have actually changed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd_types: move code for pg_log_entry_t::get_key_name into eversion_t
Samuel Just [Mon, 10 Jun 2013 22:04:43 +0000 (15:04 -0700)]
osd_types: move code for pg_log_entry_t::get_key_name into eversion_t

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: remove OndiskLog
Samuel Just [Mon, 10 Jun 2013 21:43:42 +0000 (14:43 -0700)]
PGLog: remove OndiskLog

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: remove other ondisklog references
Samuel Just [Mon, 10 Jun 2013 20:57:32 +0000 (13:57 -0700)]
PGLog: remove other ondisklog references

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: pass only divergent_priors, not ondisklog
Samuel Just [Mon, 10 Jun 2013 20:54:18 +0000 (13:54 -0700)]
PGLog: pass only divergent_priors, not ondisklog

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: remove ondisklog usages from PG
Samuel Just [Mon, 10 Jun 2013 20:49:39 +0000 (13:49 -0700)]
PG: remove ondisklog usages from PG

ondisklog is now only relevant for the divergent priors mapping.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: add rmkeyrange
Sage Weil [Sun, 2 Jun 2013 21:03:45 +0000 (14:03 -0700)]
FileStore: add rmkeyrange

Handling it in DBObjectMap really only has efficiency
advantages if the object is a clone.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPGLog: clear missing on backfill reset
Samuel Just [Tue, 11 Jun 2013 22:42:28 +0000 (15:42 -0700)]
PGLog: clear missing on backfill reset

When backfill is reset, the missing set should be cleared
since all objects are >last_backfill.

Fixes: #5320
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years ago*: always include rados.h using types.h
Samuel Just [Mon, 17 Jun 2013 21:16:18 +0000 (14:16 -0700)]
*: always include rados.h using types.h

types.h redefines __le* to ceph_le* to ensure endian
safety.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge branch 'next'
Samuel Just [Mon, 17 Jun 2013 20:29:57 +0000 (13:29 -0700)]
Merge branch 'next'

12 years agoOSD: we need to check pg ?.0 for resurrection
Samuel Just [Mon, 17 Jun 2013 20:09:21 +0000 (13:09 -0700)]
OSD: we need to check pg ?.0 for resurrection

Fixes: #5269
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agolibcephfs: add a couple multiclient tests
Sage Weil [Mon, 17 Jun 2013 00:53:17 +0000 (17:53 -0700)]
libcephfs: add a couple multiclient tests

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix sync read zeroing at EOF
Sage Weil [Mon, 17 Jun 2013 02:48:52 +0000 (19:48 -0700)]
client: fix sync read zeroing at EOF

If we have a read that hits EOF, we need to do a short read.  Previously
we would zero the buffer if we were completely withing the file, but
we also need to zero things if we overlap with EOF.  This fixes a hang
of mpi-fsx on ceph-fuse.  Triggered/tested by
LibCephFS.MulticlientHoleEOF.

Fixes: #5368
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoceph-disk: clear TERM to avoid libreadline hijinx
Sage Weil [Fri, 14 Jun 2013 23:29:10 +0000 (16:29 -0700)]
ceph-disk: clear TERM to avoid libreadline hijinx

The weird output from libreadline users is related to the TERM variable.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-udev: set up by-partuuid, -typeuuid symlinks on ancient udev
Sage Weil [Mon, 17 Jun 2013 16:49:46 +0000 (09:49 -0700)]
ceph-disk-udev: set up by-partuuid, -typeuuid symlinks on ancient udev

Make the ancient-udev/blkid workaround script for RHEL/CentOS create the
symlinks for us too.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk: do not stop activate-all on first failure
Sage Weil [Sun, 16 Jun 2013 03:06:33 +0000 (20:06 -0700)]
ceph-disk: do not stop activate-all on first failure

Keep going even if we hit one activation error.  This avoids failing to
start some disks when only one of them won't start (e.g., because it
doesn't belong to the current cluster).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph.spec: include partuuid rules in package
Sage Weil [Fri, 14 Jun 2013 23:30:24 +0000 (16:30 -0700)]
ceph.spec: include partuuid rules in package

Commit f3234c147e083f2904178994bc85de3d082e2836 missed this.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: escape prefix correctly when listing objects
Yehuda Sadeh [Fri, 14 Jun 2013 21:53:54 +0000 (14:53 -0700)]
rgw: escape prefix correctly when listing objects

Fixes: #5362
When listing objects prefix needs to be escaped correctly (the
same as with the marker). Otherwise listing objects with prefix
that starts with underscore doesn't work.
Backport: bobtail, cuttlefish

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoclient: fix ancient typo in caps revocation path
Sage Weil [Sat, 15 Jun 2013 15:48:37 +0000 (08:48 -0700)]
client: fix ancient typo in caps revocation path

If we have dropped all references to a revoked capability, send the ack
to the MDS.  This typo has been there since v0.7 (early 2009)!

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoceph.spec: install/uninstall init script
Sage Weil [Fri, 14 Jun 2013 22:01:14 +0000 (15:01 -0700)]
ceph.spec: install/uninstall init script

This was commented out almost years ago in commit 9baf5ef4 but it is not
clear to me that it was correct to do so.  In any case, we are not
installing the rc.d links for ceph, which means it does not start up after
a reboot.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agosysvinit, upstart: ceph-disk activate-all on start
Sage Weil [Fri, 14 Jun 2013 20:39:03 +0000 (13:39 -0700)]
sysvinit, upstart: ceph-disk activate-all on start

On 'service ceph start' or 'service ceph start osd' or start ceph-osd-all
we should activate any osd GPT partitions.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk: add 'activate-all'
Sage Weil [Fri, 14 Jun 2013 20:34:40 +0000 (13:34 -0700)]
ceph-disk: add 'activate-all'

Scan /dev/disk/by-parttypeuuid for ceph OSDs and activate them all.  This
is useful when the event didn't trigger on the initial udev event for
some reason.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoudev: /dev/disk/by-parttypeuuid/$type-$uuid
Sage Weil [Fri, 14 Jun 2013 20:23:52 +0000 (13:23 -0700)]
udev: /dev/disk/by-parttypeuuid/$type-$uuid

We need this to help trigger OSD activations.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: make mark_me_down asserts match check
Sage Weil [Mon, 17 Jun 2013 03:13:51 +0000 (20:13 -0700)]
mon: make mark_me_down asserts match check

The OSD may have sent a request where the message source does not match
the target in the message.  Verify that the target matches so that it
matches the assert.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Sun, 16 Jun 2013 23:49:47 +0000 (16:49 -0700)]
Merge branch 'next'

12 years agoceph: remove space when prefix is blank
Sage Weil [Sun, 16 Jun 2013 23:49:05 +0000 (16:49 -0700)]
ceph: remove space when prefix is blank

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph: fix return code for multi-target commands
Sage Weil [Sun, 16 Jun 2013 23:48:41 +0000 (16:48 -0700)]
ceph: fix return code for multi-target commands

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph: error out properly when failing to get commands
Sage Weil [Sun, 16 Jun 2013 23:48:27 +0000 (16:48 -0700)]
ceph: error out properly when failing to get commands

If we make ret positive here we miss the failure check below.  Instead,
just set outs appropriately.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest/admin_socket/objecter_requests: fix test
Sage Weil [Sun, 16 Jun 2013 23:42:27 +0000 (16:42 -0700)]
test/admin_socket/objecter_requests: fix test

Commit 2bda9db1c24530cbaaa161b7ff0a80efa913aa78 added command_ops
to the result.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph: do not print status to output file when talking to old mons
Sage Weil [Sun, 16 Jun 2013 20:36:19 +0000 (13:36 -0700)]
ceph: do not print status to output file when talking to old mons

The old cli would send the status message to stdout instead of stderr;
we try to emulate that behavior when talking to old monitors because
they send some useful data to outs instead of the data payload.
However, when outputting to a *file*, the outs would still go to
stdout.  Maintain that so that, e.g.,

 ceph mon getmap -o /tmp/foo

doesn't prefix the monmap with 'got latest monmap\n'.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/ReplicatedPG: length 0 writes are allowed
Sage Weil [Sun, 16 Jun 2013 15:50:50 +0000 (08:50 -0700)]
osd/ReplicatedPG: length 0 writes are allowed

From f1b6bd7988ab964c9167eff7bea51a49573f5175.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Sun, 16 Jun 2013 03:48:32 +0000 (20:48 -0700)]
Merge branch 'next'

12 years agocommon/Preforker: fix broken recursion on exit(3)
Sage Weil [Sat, 15 Jun 2013 15:14:40 +0000 (08:14 -0700)]
common/Preforker: fix broken recursion on exit(3)

If we exit via preforker, call exit(3) and not recursively back into
Preforker::exit(r).  Otherwise you get a hang with the child blocked
at:

Thread 1 (Thread 0x7fa08962e7c0 (LWP 5419)):
#0  0x000000309860e0cd in write () from /lib64/libpthread.so.0
#1  0x00000000005cc906 in Preforker::exit(int) ()
#2  0x00000000005c8dfb in main ()

and the parent at

#0  0x000000309860eba7 in waitpid () from /lib64/libpthread.so.0
#1  0x00000000005cc87a in Preforker::parent_wait() ()
#2  0x00000000005c75ae in main ()

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/OSDMap: fix is_blacklisted()
Sage Weil [Sat, 15 Jun 2013 16:10:46 +0000 (09:10 -0700)]
osd/OSDMap: fix is_blacklisted()

You can only call set_port() if is_ip() is true (there is an assert in
the accessor).

Fixes: #5366
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoqa/workunits/misc/multiple_rsync.sh: wtf
Sage Weil [Sun, 16 Jun 2013 03:42:39 +0000 (20:42 -0700)]
qa/workunits/misc/multiple_rsync.sh: wtf

2013-06-15T12:55:29.808 INFO:teuthology.task.workunit.client.0.err:+ rsync -auv --exclude local/ /usr/ usr.1
2013-06-15T12:55:29.808 INFO:teuthology.task.workunit.client.0.err:+ tee a
2013-06-15T12:55:29.820 INFO:teuthology.task.workunit.client.0.out:sending incremental file list
2013-06-15T12:56:46.019 INFO:teuthology.task.workunit.client.0.out:
2013-06-15T12:56:46.020 INFO:teuthology.task.workunit.client.0.out:sent 1452634 bytes  received 7485 bytes  19086.52 bytes/sec
2013-06-15T12:56:46.020 INFO:teuthology.task.workunit.client.0.out:total size is 3205063225  speedup is 2195.07
2013-06-15T12:56:46.020 INFO:teuthology.task.workunit.client.0.err:+ wc -l a
2013-06-15T12:56:46.021 INFO:teuthology.task.workunit.client.0.out:4 a
2013-06-15T12:56:46.022 INFO:teuthology.task.workunit.client.0.err:+ wc -l a
2013-06-15T12:56:46.022 INFO:teuthology.task.workunit.client.0.err:+ grep 4
2013-06-15T12:56:46.023 INFO:teuthology.task.workunit.client.0.out:4 a
2013-06-15T12:56:46.024 INFO:teuthology.task.workunit.client.0.err:+ rsync -auv --exclude local/ /usr/ usr.2
2013-06-15T12:56:46.024 INFO:teuthology.task.workunit.client.0.err:+ tee a
2013-06-15T12:56:46.112 INFO:teuthology.task.workunit.client.0.out:sending incremental file list
2013-06-15T12:57:17.172 INFO:teuthology.task.workunit.client.0.out:
2013-06-15T12:57:17.174 INFO:teuthology.task.workunit.client.0.out:sent 1452634 bytes  received 7485 bytes  46352.98 bytes/sec
2013-06-15T12:57:17.174 INFO:teuthology.task.workunit.client.0.out:total size is 3205063225  speedup is 2195.07
2013-06-15T12:57:17.175 INFO:teuthology.task.workunit.client.0.err:+ wc -l a
2013-06-15T12:57:17.175 INFO:teuthology.task.workunit.client.0.out:3 a

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sat, 15 Jun 2013 04:05:18 +0000 (21:05 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoceph: pass --format=foo to old monitors
Sage Weil [Sat, 15 Jun 2013 00:30:02 +0000 (17:30 -0700)]
ceph: pass --format=foo to old monitors

And --threshold too, although.. really.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviwed-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph: add newline when using old monitors
Sage Weil [Sat, 15 Jun 2013 00:30:44 +0000 (17:30 -0700)]
ceph: add newline when using old monitors

The old tool would print a newline after outs, e.g. from 'ceph osd create'.
Do the same when we are talking to old monitors.  Also, put outs at the
top, not the bottom!

Tweak the json code to not add the newline again if we already did so
above.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agodoc: Added index tags.
John Wilkins [Fri, 14 Jun 2013 23:58:29 +0000 (16:58 -0700)]
doc: Added index tags.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added index tags.
John Wilkins [Fri, 14 Jun 2013 23:58:04 +0000 (16:58 -0700)]
doc: Added index tags.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added index tags.
John Wilkins [Fri, 14 Jun 2013 23:57:48 +0000 (16:57 -0700)]
doc: Added index tags.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added index tag.
John Wilkins [Fri, 14 Jun 2013 23:57:31 +0000 (16:57 -0700)]
doc: Added index tag.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Updated usage and index tags.
John Wilkins [Fri, 14 Jun 2013 23:57:15 +0000 (16:57 -0700)]
doc: Updated usage and index tags.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Updated usage and index tags.
John Wilkins [Fri, 14 Jun 2013 23:56:58 +0000 (16:56 -0700)]
doc: Updated usage and index tags.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>