]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoceph: drop --threshold hack for 'pg dump_stuck'
Sage Weil [Sat, 13 Jul 2013 21:09:10 +0000 (14:09 -0700)]
ceph: drop --threshold hack for 'pg dump_stuck'

We can live with the incompatibility here; the hack is currently
not working anyway (see #5623).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agomsg/Pipe: be a bit more explicit about encoding outgoing messages
Sage Weil [Sun, 14 Jul 2013 15:55:52 +0000 (08:55 -0700)]
msg/Pipe: be a bit more explicit about encoding outgoing messages

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomessages/MClientReconnect: clear data when encoding
Sage Weil [Sun, 14 Jul 2013 22:54:29 +0000 (15:54 -0700)]
messages/MClientReconnect: clear data when encoding

The MClientReconnect puts everything in the data payload portion of
the message and nothing in the front portion.  That means that if the
message is resent (socket failure or something), the messenger thinks it
hasn't been encoded yet (front empty) and reencodes, which means
everything gets added (again) to the data portion.

Decoding keep decoding until it runs out of data, so the second copy
means we decode garbage snap realms, leading to the crash in bug

Clearing data each time around resolves the problem, although it does
mean we do the encoding work multiple times.  We could alternatively
(or also) stick some data in the front portion of the payload
(ignored), but that changes the wire protocol and I would rather not
do that.

Fixes: #4565
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge pull request #436 from ceph/wip-mon-fixes
Sage Weil [Mon, 15 Jul 2013 20:46:43 +0000 (13:46 -0700)]
Merge pull request #436 from ceph/wip-mon-fixes

Wip mon fixes

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomon: set forwarded message recv stamp 436/head
Sage Weil [Sat, 13 Jul 2013 04:52:30 +0000 (21:52 -0700)]
mon: set forwarded message recv stamp

Set it to the stamp of the MForward that carried us.  One could argue
we really want the original receive stamp on the origin, but that is
not available to us, and this is better than nothing.

In particular, this gives 'ceph log ...' commands a timestamp when they
are forwarded via a peon.  The stamp is still between when the request
is sent and when it is committed/acked, so all is well from the
client's perspective.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: drop win_election() _reset() kludge and strengthen assertions
Sage Weil [Sat, 13 Jul 2013 15:38:40 +0000 (08:38 -0700)]
mon: drop win_election() _reset() kludge and strengthen assertions

This is only there for the benefit of win_standalone_election(), but it
doesn't need it, it clutters the code, and weakens our assertions.

Now the only win_election() callers are win_standalone_election() (which
is a single path that just did _reset()) and from the elector.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: set peon state to electing if other mons call an election
Sage Weil [Sat, 13 Jul 2013 15:36:25 +0000 (08:36 -0700)]
mon: set peon state to electing if other mons call an election

Previously we would call mon->reset() and set various flags (like
exited_quorum timestamp), but the state would remain PEON.  Make an
explicit join_election() callback and set the state there, and add
asserts in reset() (renamed to be private) so that we ensure all
callers are well-behaved.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: once sync full is chosen, make sure we don't change our mind
Sage Weil [Sat, 13 Jul 2013 15:11:45 +0000 (08:11 -0700)]
mon: once sync full is chosen, make sure we don't change our mind

It is possible for a sequence like:

 - probe
 - first probe reply has paxos trim that indicates a full sync is
   needed
 - start sync
 - clear store
 - something happens that makes us abort and bootstrap (e.g., the
   provider mon restarts
 - probe
 - first probe reply has older paxos trim bound and we call an election
 - on election completion, we crash because we have no data.

Non-determinism of the probe decision aside, we need to ensure that
the info we share during probe (fc, lc) is accurate, and that once we
clear the store we know we *must* do a full sync.

Fixes: #5621
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: consolidate resetting in restart()
Sage Weil [Mon, 15 Jul 2013 19:56:26 +0000 (12:56 -0700)]
mon/PaxosService: consolidate resetting in restart()

We had duplicated code in election_finished() and restart(), and it was
incomplete.  Put it all in restart() only (the mon should have called
restart() long before the election finishes).  Note that we cannot
assert as much in election_finished() because another service may have
just cross-proposed.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: assert not proposing in propose_pending
Sage Weil [Fri, 12 Jul 2013 22:04:00 +0000 (15:04 -0700)]
mon/PaxosService: assert not proposing in propose_pending

Drop the useless active check after the assert, too.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: separate proposal commit from the end of the round
Sage Weil [Sat, 13 Jul 2013 04:20:05 +0000 (21:20 -0700)]
mon/Paxos: separate proposal commit from the end of the round

Each commit should match with exactly one proposal; finish it when we
actually commit it and make sensible asserts.

The old finish_proposal() turns into finish_round(), and performs
generic checks and cleanup associated with the transition from
updating -> active.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: make all handle_accept paths go via out label
Sage Weil [Mon, 15 Jul 2013 19:57:40 +0000 (12:57 -0700)]
mon/Paxos: make all handle_accept paths go via out label

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Mon, 15 Jul 2013 20:20:32 +0000 (13:20 -0700)]
Merge branch 'next'

12 years agomon: fix scrub vs paxos race: refresh on commit, not round completion
Sage Weil [Fri, 12 Jul 2013 21:47:09 +0000 (14:47 -0700)]
mon: fix scrub vs paxos race: refresh on commit, not round completion

Consider:

 - paxos starts a commit N+1
 - a majority of the peers ack it
  - paxos::commit() writes N+1 it to disk
  - tells peers to commit
 - peers commit N+1, *and* refresh_from_paxos(), and generate N+1 full map
 - leader does _scrub on N+1, without latest full osdmap
 - peers do _scrub on N+1, with latest full osdmap
 - leader finishes paxos gather, does refresh_from_paxos()
 -> scrub fails.

Fix this by doing the refresh_from_paxos() at commit time and not when
the paxos round finishes.  We move the refresh out of finish_proposal
and into its own helper, and update all callers accordingly.  This
keeps on-disk state more tightly in sync with in-memory state and
avoids the need for a e.g., kludgey workaround in the scrub code.

We also simplify the bootstrap checks a bit by doing so immediately
and relying on the normal bootstrap paxos reset paths to clean up
any waiters.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #437 from kri5/wip-fix-typo-rgw
Yehuda Sadeh [Mon, 15 Jul 2013 19:20:15 +0000 (12:20 -0700)]
Merge pull request #437 from kri5/wip-fix-typo-rgw

rgw: Fix typo in rgw_user.cc

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge remote-tracking branch 'origin/wip-rgw-warnings' into next
Yehuda Sadeh [Mon, 15 Jul 2013 18:17:03 +0000 (11:17 -0700)]
Merge remote-tracking branch 'origin/wip-rgw-warnings' into next

Conflicts:
src/test/test_rgw_admin_log.cc
src/test/test_rgw_admin_meta.cc
src/test/test_rgw_admin_opstate.cc

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix bucket instance json encoding
Yehuda Sadeh [Sat, 13 Jul 2013 03:26:06 +0000 (20:26 -0700)]
rgw: fix bucket instance json encoding

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw_admin: fix gc list encoding
Yehuda Sadeh [Sat, 13 Jul 2013 02:10:25 +0000 (19:10 -0700)]
rgw_admin: fix gc list encoding

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge pull request #434 from gregsfortytwo/next
Yehuda Sadeh [Mon, 15 Jul 2013 17:24:18 +0000 (10:24 -0700)]
Merge pull request #434 from gregsfortytwo/next

test_rgw: fix a number of unsigned/signed comparison warnings

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agodoc: Fixed link in Calxeda repo instruction.
John Wilkins [Mon, 15 Jul 2013 17:05:28 +0000 (10:05 -0700)]
doc: Fixed link in Calxeda repo instruction.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agomon: once sync full is chosen, make sure we don't change our mind
Sage Weil [Sat, 13 Jul 2013 15:11:45 +0000 (08:11 -0700)]
mon: once sync full is chosen, make sure we don't change our mind

It is possible for a sequence like:

 - probe
 - first probe reply has paxos trim that indicates a full sync is
   needed
 - start sync
 - clear store
 - something happens that makes us abort and bootstrap (e.g., the
   provider mon restarts
 - probe
 - first probe reply has older paxos trim bound and we call an election
 - on election completion, we crash because we have no data.

Non-determinism of the probe decision aside, we need to ensure that
the info we share during probe (fc, lc) is accurate, and that once we
clear the store we know we *must* do a full sync.

Fixes: #5621
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agorgw: fix more warnings
Sage Weil [Mon, 15 Jul 2013 16:58:08 +0000 (09:58 -0700)]
rgw: fix more warnings

test/test_rgw_admin_opstate.cc: In member function 'int admin_log::test_helper::extract_input(int, char**)':
warning: test/test_rgw_admin_opstate.cc:129:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_opstate.cc:131:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_opstate.cc:133:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_opstate.cc:135:24: comparison between signed and unsigned integer expressions [-Wsign-compare]

test/test_rgw_admin_log.cc: In member function 'int admin_log::test_helper::extract_input(int, char**)':
warning: test/test_rgw_admin_log.cc:132:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_log.cc:134:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_log.cc:136:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_log.cc:138:24: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest_rgw: fix a number of unsigned/signed comparison warnings 434/head
Greg Farnum [Fri, 12 Jul 2013 23:38:39 +0000 (16:38 -0700)]
test_rgw: fix a number of unsigned/signed comparison warnings

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agorgw: Fix typo in rgw_user.cc 433/head 437/head
Christophe Courtaut [Mon, 15 Jul 2013 11:47:58 +0000 (13:47 +0200)]
rgw: Fix typo in rgw_user.cc

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
12 years agotest_rgw_admin_meta: fix warnings
Sage Weil [Sun, 14 Jul 2013 23:37:45 +0000 (16:37 -0700)]
test_rgw_admin_meta: fix warnings

test/test_rgw_admin_meta.cc: In member function 'int admin_meta::test_helper::extract_input(int, char**)':
warning: test/test_rgw_admin_meta.cc:126:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_meta.cc:128:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_meta.cc:130:24: comparison between signed and unsigned integer expressions [-Wsign-compare]
warning: test/test_rgw_admin_meta.cc:132:24: comparison between signed and unsigned integer expressions [-Wsign-compare]

on arm7l

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocls_rgw: fix warning
Sage Weil [Sun, 14 Jul 2013 23:36:21 +0000 (16:36 -0700)]
cls_rgw: fix warning

cls/rgw/cls_rgw.cc: In function 'int get_obj_vals(cls_method_context_t, const string&, const string&, int, std::map, ceph::buffer::list>*)':
warning: cls/rgw/cls_rgw.cc:175:28: narrowing conversion of '129' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]

on arm7l

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-hadoop-doc'
Noah Watkins [Sun, 14 Jul 2013 23:32:28 +0000 (16:32 -0700)]
Merge branch 'wip-hadoop-doc'

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agodoc: update Hadoop docs with plugin download
Noah Watkins [Sun, 24 Mar 2013 18:22:11 +0000 (11:22 -0700)]
doc: update Hadoop docs with plugin download

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agodoc: document new hadoop config options
Noah Watkins [Sun, 17 Mar 2013 19:10:16 +0000 (12:10 -0700)]
doc: document new hadoop config options

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMakefile: cls_rgw needs cls_rgw_types linked in now too
Sage Weil [Sun, 14 Jul 2013 23:24:46 +0000 (16:24 -0700)]
Makefile: cls_rgw needs cls_rgw_types linked in now too

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #429 from llonchj/hypertable_changes
Sage Weil [Sun, 14 Jul 2013 22:32:41 +0000 (15:32 -0700)]
Merge pull request #429 from llonchj/hypertable_changes

Hypertable changes

12 years agoUse mon_host instead of mon_addr in ceph_conf 429/head
Jordi Llonch [Sun, 14 Jul 2013 21:28:02 +0000 (07:28 +1000)]
Use mon_host instead of mon_addr in ceph_conf

Signed-off-by: Jordi Llonch <llonchj@gmail.com>
12 years agohypertable recent version prototyping includes bool verify in length and read functions
Jordi Llonch [Sun, 14 Jul 2013 21:26:58 +0000 (07:26 +1000)]
hypertable recent version prototyping includes bool verify in length and read functions

Signed-off-by: Jordi Llonch <llonchj@gmail.com>
12 years agoMakefile: build cls_rgw even if we're not building radosgw
Sage Weil [Sat, 13 Jul 2013 21:56:21 +0000 (14:56 -0700)]
Makefile: build cls_rgw even if we're not building radosgw

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: fix cls_rgw linkage
Sage Weil [Sat, 13 Jul 2013 21:51:26 +0000 (14:51 -0700)]
Makefile: fix cls_rgw linkage

Broken by 0c83b5fec233b7fc63205233403e7df32139d039.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: fix cls_refcount linkage
Sage Weil [Sat, 13 Jul 2013 21:02:41 +0000 (14:02 -0700)]
Makefile: fix cls_refcount linkage

Broken by d0bee5d85c1c862639450bad69c0ad20a98ef5c9.

Fixes: #5622
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoqa/workunits/rbd/simple_big: fix unmap
Sage Weil [Sat, 13 Jul 2013 20:26:21 +0000 (13:26 -0700)]
qa/workunits/rbd/simple_big: fix unmap

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoqa/workunits/fs/test_o_trunc.sh: fix path
Sage Weil [Sat, 13 Jul 2013 20:25:16 +0000 (13:25 -0700)]
qa/workunits/fs/test_o_trunc.sh: fix path

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: bootstrap peon too if monmap updates
Sage Weil [Fri, 12 Jul 2013 21:27:04 +0000 (14:27 -0700)]
mon/Paxos: bootstrap peon too if monmap updates

If we get a monmap update, the leader bootstraps.  Peons should do the
same.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomon/PaxosService: do not prepare new pending if still proposing
Sage Weil [Fri, 12 Jul 2013 20:50:49 +0000 (13:50 -0700)]
mon/PaxosService: do not prepare new pending if still proposing

The _active callback can get called while are already proposing.  If
that happens, we should not prepare a fresh new pending but should
wait for the previous proposal to finish.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomon/PaxosService: remove redundant check
Sage Weil [Fri, 12 Jul 2013 21:59:30 +0000 (14:59 -0700)]
mon/PaxosService: remove redundant check

_active checks is_active() and rescheduled itself already.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomon/PaxosService: fix trim completion
Sage Weil [Sat, 13 Jul 2013 04:42:19 +0000 (21:42 -0700)]
mon/PaxosService: fix trim completion

Do not call C_Committed after trim or else we will prematurely clear
the bool proposing, propose something again using the same version, and
crash.  We do not in fact need anything to happen here aside from the
refresh_from_paxos() that happens on its own.

Broken by 39b71c582628d26e749c23343aa69db079ee40a1.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-wsgi' into next
Dan Mick [Fri, 12 Jul 2013 23:38:10 +0000 (16:38 -0700)]
Merge branch 'wip-wsgi' into next

* wip-wsgi:
  ceph-rest-api: separate into module and front-end for WSGI deploy
  ceph-rest-api: make main program be "shell" around WSGI guts

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoceph-rest-api: separate into module and front-end for WSGI deploy
Dan Mick [Fri, 12 Jul 2013 20:58:36 +0000 (13:58 -0700)]
ceph-rest-api: separate into module and front-end for WSGI deploy

To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported.  ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.

Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions.  Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors.  This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.

Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.

Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)

Also: doc updates, packaging updates to include ceph_rest_api.py

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomsg/Pipe: fix RECONNECT_SEQ behavior
Sage Weil [Fri, 12 Jul 2013 23:21:24 +0000 (16:21 -0700)]
msg/Pipe: fix RECONNECT_SEQ behavior

Calling handle_ack() here has no effect because we have already
spliced sent messages back into our out queue.  Instead, pull them out
of there and discard.  Add a few assertions along the way.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomon: make ancestor arg for 'osd crush rm|remove <name>' optional
Sage Weil [Fri, 12 Jul 2013 21:42:47 +0000 (14:42 -0700)]
mon: make ancestor arg for 'osd crush rm|remove <name>' optional

It was there for unlink, but not rm or remove.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: AuthMonitor: don't try to auth import a null buffer
Sage Weil [Fri, 12 Jul 2013 20:12:51 +0000 (13:12 -0700)]
mon: AuthMonitor: don't try to auth import a null buffer

Hangs result if 'ceph auth import' is attempted without -i.
Check for this case and return error status.  Also,
update auth import help to more-clearly indicate that "input"
means "-i <file>".

Fixes: #4599
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPendingReleaseNotes: ceph -s --format=json output change
Sage Weil [Fri, 12 Jul 2013 20:57:43 +0000 (13:57 -0700)]
PendingReleaseNotes: ceph -s --format=json output change

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-5371-next' into next
David Zafman [Fri, 12 Jul 2013 21:25:26 +0000 (14:25 -0700)]
Merge branch 'wip-5371-next' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agotest: idempotent filestore test failure
David Zafman [Fri, 12 Jul 2013 02:47:47 +0000 (19:47 -0700)]
test: idempotent filestore test failure

Remove obsolete use of collection_move()
Allow operations to be skipped if random selections don't make sense
Track total number of possible objects in m_num_objects
BUG: do_remove() was calling _do_touch() instead of _do_remove()
For ops that require an object, select from among existing objects in collection
Initialize m_num_objects unique objects across collections

touch: don't create an object that already exists in another collection
remove: Use remove_obj() to clear object from m_objects to have accurate tracking
clone/clone_range(): Select 2 existing objects in the collection
add: Skip operation if selected target object name exists in target collection
move: Removed this buggy operation that is only present for upgrades

Fixes: #5371
Fixes: #5240
Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoRevert "test_filestore_idempotent: use obj name from source coll add"
David Zafman [Fri, 12 Jul 2013 21:18:11 +0000 (14:18 -0700)]
Revert "test_filestore_idempotent: use obj name from source coll add"

This reverts commit 0bc731ea93ae198afcdcba285751a6201c3de8de.

12 years agoRevert "test_filestore_idempotent: make newly created objects globally unique"
David Zafman [Fri, 12 Jul 2013 21:17:55 +0000 (14:17 -0700)]
Revert "test_filestore_idempotent: make newly created objects globally unique"

This reverts commit cdf5785c5e8b744f35ea34b2deb2a71edf8b9580.

12 years agoceph-object-corpus: added cuttlefish objects
Sage Weil [Fri, 12 Jul 2013 20:33:34 +0000 (13:33 -0700)]
ceph-object-corpus: added cuttlefish objects

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: fix a typo
Yehuda Sadeh [Fri, 12 Jul 2013 20:31:17 +0000 (13:31 -0700)]
rgw: fix a typo

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-corpus' into next
Sage Weil [Fri, 12 Jul 2013 20:06:35 +0000 (13:06 -0700)]
Merge remote-tracking branch 'gh/wip-corpus' into next

Rgw bits Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>

12 years agoqa/workunits/cls: remove new rgw tests
Sage Weil [Fri, 12 Jul 2013 19:43:25 +0000 (12:43 -0700)]
qa/workunits/cls: remove new rgw tests

These need extra arguments to connect to rgw...

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsgr: add 'ms die on old message' to help catch reconnect seq issues
Sage Weil [Thu, 11 Jul 2013 01:37:14 +0000 (18:37 -0700)]
msgr: add 'ms die on old message' to help catch reconnect seq issues

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: structure 'ceph status' json output
Sage Weil [Fri, 12 Jul 2013 18:36:18 +0000 (11:36 -0700)]
mon: structure 'ceph status' json output

Return the summary info in a structured for instead of just mimicing the
legacy plaintext format.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: fix copy/paste error
Sage Weil [Fri, 12 Jul 2013 18:34:22 +0000 (11:34 -0700)]
mon: fix copy/paste error

From rebase/squash into 96c48835d19923b467ced3032948af6c2b7959f2.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-mon-fixes' into next
Sage Weil [Fri, 12 Jul 2013 18:28:43 +0000 (11:28 -0700)]
Merge branch 'wip-mon-fixes' into next

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: clean up check_fsid() a bit
Sage Weil [Fri, 12 Jul 2013 00:46:48 +0000 (17:46 -0700)]
mon: clean up check_fsid() a bit

Use the uuid_d type instead of kludging string comparisons.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: stash latest state when flagging force_sync
Sage Weil [Fri, 12 Jul 2013 00:42:14 +0000 (17:42 -0700)]
mon: stash latest state when flagging force_sync

Store our latest state when we set the force_sync flag.  This is important
because we will clear the store the next time we start up and may not be
able to get a useful monmap at that point.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: factor out stashing latest monmap
Sage Weil [Fri, 12 Jul 2013 00:40:45 +0000 (17:40 -0700)]
mon: factor out stashing latest monmap

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocls_rgw: add missing type tests
Sage Weil [Fri, 12 Jul 2013 18:14:28 +0000 (11:14 -0700)]
cls_rgw: add missing type tests

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocls_refcount: add type tests
Sage Weil [Fri, 12 Jul 2013 18:14:19 +0000 (11:14 -0700)]
cls_refcount: add type tests

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix sync_start doc
Sage Weil [Fri, 12 Jul 2013 00:40:13 +0000 (17:40 -0700)]
mon: fix sync_start doc

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix off-by-one: no need to reapply previous last_committed after sync
Sage Weil [Fri, 12 Jul 2013 00:45:46 +0000 (17:45 -0700)]
mon: fix off-by-one: no need to reapply previous last_committed after sync

The old last_committed is already committed; don't reapply. This also fixes
the case where lc was 0 (i.e., we did get_cookie_recent from the beginning
of time).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix recent paxos sync from 0 when first_committed == 1
Sage Weil [Thu, 11 Jul 2013 20:41:23 +0000 (13:41 -0700)]
mon: fix recent paxos sync from 0 when first_committed == 1

This is okay; allow it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc/dev: add corpus.rst
Sage Weil [Fri, 12 Jul 2013 17:36:38 +0000 (10:36 -0700)]
doc/dev: add corpus.rst

Structure of the corpus dir, how to add to it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Fri, 12 Jul 2013 17:16:27 +0000 (10:16 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoosd: reenable pg_query_t test
Sage Weil [Fri, 12 Jul 2013 02:08:43 +0000 (19:08 -0700)]
osd: reenable pg_query_t test

This was disabled back in 4ce17cca2e924b2ef9565d5c345cd602bcc6dd98; not
sure why.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: add encoding tests for newish MMonSync, MMonScrub
Sage Weil [Fri, 12 Jul 2013 02:08:01 +0000 (19:08 -0700)]
mon: add encoding tests for newish MMonSync, MMonScrub

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: add encoding test for inode_backtrace_t; note incompat in corpus
Sage Weil [Fri, 12 Jul 2013 02:07:36 +0000 (19:07 -0700)]
mds: add encoding test for inode_backtrace_t; note incompat in corpus

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: add encoding tests for PushOp, PullOp, PushReplyOp
Sage Weil [Fri, 12 Jul 2013 02:07:11 +0000 (19:07 -0700)]
osd: add encoding tests for PushOp, PullOp, PushReplyOp

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: add encoding tests for MonitorDBStore data types
Sage Weil [Fri, 12 Jul 2013 02:06:47 +0000 (19:06 -0700)]
mon: add encoding tests for MonitorDBStore data types

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-object-corpus: new objects for almost-dumpling
Sage Weil [Fri, 12 Jul 2013 01:47:18 +0000 (18:47 -0700)]
ceph-object-corpus: new objects for almost-dumpling

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/OSDmap: fix OSDMap::Incremental::dump() for new pool names
Sage Weil [Fri, 12 Jul 2013 01:43:24 +0000 (18:43 -0700)]
osd/OSDmap: fix OSDMap::Incremental::dump() for new pool names

The name is always present when pools are created, but not when they are
modified.  Also, a name may be present with a new_pools entry if the pool
is just renamed.  Separate it out completely in the dump.

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #426 from dalgaaf/wip-da-SCA-cppcheck-5
Sage Weil [Fri, 12 Jul 2013 15:52:56 +0000 (08:52 -0700)]
Merge pull request #426 from dalgaaf/wip-da-SCA-cppcheck-5

Fix some typical SCA issues from cppcheck

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agotest_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator 426/head
Danny Al-Gaaf [Fri, 12 Jul 2013 12:40:39 +0000 (14:40 +0200)]
test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocls/rgw/cls_rgw.cc: use empty() instead of checking for size() == 0
Danny Al-Gaaf [Fri, 12 Jul 2013 12:39:33 +0000 (14:39 +0200)]
cls/rgw/cls_rgw.cc: use empty() instead of checking for size() == 0

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_rgw_admin_log.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 12:21:59 +0000 (14:21 +0200)]
test_rgw_admin_log.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_rgw_admin_opstate.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 12:18:46 +0000 (14:18 +0200)]
test_rgw_admin_opstate.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 12:15:55 +0000 (14:15 +0200)]
test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rest_opstate.cc: prefer prefix ++operator for non-trivial iterator
Danny Al-Gaaf [Fri, 12 Jul 2013 10:10:24 +0000 (12:10 +0200)]
rgw/rgw_rest_opstate.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.cc: use empty() instead of checking for size() > 0
Danny Al-Gaaf [Fri, 12 Jul 2013 10:08:52 +0000 (12:08 +0200)]
rgw/rgw_rados.cc: use empty() instead of checking for size() > 0

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocmdparse.cc: catch exception by reference
Danny Al-Gaaf [Fri, 5 Jul 2013 09:32:13 +0000 (11:32 +0200)]
cmdparse.cc: catch exception by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-rest-api: Missing packaging (binary in .spec, manpage in both)
Dan Mick [Thu, 11 Jul 2013 23:21:55 +0000 (16:21 -0700)]
ceph-rest-api: Missing packaging (binary in .spec, manpage in both)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph-rest-api: make main program be "shell" around WSGI guts
Dan Mick [Fri, 12 Jul 2013 00:17:39 +0000 (17:17 -0700)]
ceph-rest-api: make main program be "shell" around WSGI guts

Move WSGI guts to pybind/ceph_rest_api.py for importability
into WSGI server frameworks.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph.in: output even a blank status line in compat mode
Dan Mick [Thu, 11 Jul 2013 05:56:42 +0000 (22:56 -0700)]
ceph.in: output even a blank status line in compat mode

Fixes: #5594
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomsg/Message: use old footer for encoded message dump
Sage Weil [Thu, 11 Jul 2013 18:42:02 +0000 (11:42 -0700)]
msg/Message: use old footer for encoded message dump

This avoids the need for a conditional decoding check on ceph-dencoder,
and makes it match up with what encode_message() is doing.  The new(ish)
fields in the footer (the signature) is not useful for the object
corpus.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: handle bucket removal by system user on master region
Babu Shanmugam [Tue, 9 Jul 2013 03:11:18 +0000 (08:41 +0530)]
rgw: handle bucket removal by system user on master region

intra region bucket creation, deletion and copy object to and from remote regions validated

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Reviewed-by:Yehuda Sadeh <yehuda@inktank.com>

12 years agoceph-rest-api: connect to cluster with configured client name
Dan Mick [Thu, 11 Jul 2013 04:55:38 +0000 (21:55 -0700)]
ceph-rest-api: connect to cluster with configured client name

Spotted by Noah Watkins

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph-rest-api manpage
Dan Mick [Thu, 11 Jul 2013 03:52:00 +0000 (20:52 -0700)]
ceph-rest-api manpage

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agocephtool/test.sh: sync status no longer supported
Dan Mick [Thu, 11 Jul 2013 01:17:04 +0000 (18:17 -0700)]
cephtool/test.sh: sync status no longer supported

da0aff28ab478bcc3136715f92bc1af8d4b403c1 removed 'ceph sync status';
test script needs to stop trying it

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agocephtool/test.sh cleanup
Dan Mick [Wed, 10 Jul 2013 21:14:01 +0000 (14:14 -0700)]
cephtool/test.sh cleanup

1) don't pass subshell to expect_false
2) osd pause/unpause don't take arguments (apply to all OSDs)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoceph-rest-api tests
Dan Mick [Thu, 11 Jul 2013 00:42:33 +0000 (17:42 -0700)]
ceph-rest-api tests

Patterned after cephtool/test.sh, with some deeper validation of
output format and contents (because structured output is easier
to validate).

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoAdd 'ceph-rest-api'
Dan Mick [Thu, 11 Jul 2013 00:39:47 +0000 (17:39 -0700)]
Add 'ceph-rest-api'

ceph-rest-api is a Python WSGI module for accessing the Ceph cluster.
It supports most of the commands supported by the ceph CLI,
appropriately translated to HTTP GET/PUT requests.  It is not a
truly RESTful interface.

Not supported at this moment: "tell", "pg <pgid>", and "daemon"
commands.

Configuration options are specified in ceph.conf, specified with
-c/--conf or obtained from $CEPH_CONF, /etc/ceph/ceph.conf,
~/.ceph/ceph.conf, or ./ceph.conf.

-n/--name specifies the client name, used for the cluster
authentication key and for the ceph.conf section name (default
is client.restapi).

        restapi keyring = <keyring file>
        restapi public addr = listenIP:port (default 0.0.0.0:5000)
        restapi base url = <base path> (default /api/v0.1)
        restapi log level = (error, warning, info, debug)
        restapi log file = (default /var/log/ceph/<clientname>.log)

Primitive human-level command discovery is supported; GET from
BASEURL (say, http://localhost:5000/api/v0.1) will show an HTML
table of all commands and arguments, method supported, and help strings.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoOSDMonitor: return failure for 'osd lost' without safety switch
Dan Mick [Thu, 11 Jul 2013 00:25:32 +0000 (17:25 -0700)]
OSDMonitor: return failure for 'osd lost' without safety switch

If user doesn't supply --yes-i-really-mean-it, fail the operation

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoCompatSet, MDSMap: formatted dumps must avoid numeric tags
Dan Mick [Thu, 11 Jul 2013 00:24:40 +0000 (17:24 -0700)]
CompatSet, MDSMap: formatted dumps must avoid numeric tags

Tags made of numbers only confuse XML parsers.  Avoid them.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agomon: OSDMonitor: formatter output on 'osd map'
Dan Mick [Thu, 11 Jul 2013 00:26:34 +0000 (17:26 -0700)]
mon: OSDMonitor: formatter output on 'osd map'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>