Commit Graph

27868 Commits

Author SHA1 Message Date
Sage Weil
5c31010795 mon/Paxos: make all handle_accept paths go via out label
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-15 13:42:53 -07:00
Sage Weil
2bf95e5a1c Merge branch 'next' 2013-07-15 13:20:32 -07:00
Sage Weil
f1ce8d7c95 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>
2013-07-15 12:54:56 -07:00
Yehuda Sadeh
e996e9bee2 Merge pull request #437 from kri5/wip-fix-typo-rgw
rgw: Fix typo in rgw_user.cc

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-15 12:20:15 -07:00
Yehuda Sadeh
1b5258155a 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>
2013-07-15 11:17:03 -07:00
Yehuda Sadeh
a722fb713e rgw: fix bucket instance json encoding
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-15 10:37:28 -07:00
Yehuda Sadeh
346d9f42bc rgw_admin: fix gc list encoding
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-15 10:37:28 -07:00
Yehuda Sadeh
791d51eb36 Merge pull request #434 from gregsfortytwo/next
test_rgw: fix a number of unsigned/signed comparison warnings

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-15 10:24:18 -07:00
John Wilkins
55ff523ef2 doc: Fixed link in Calxeda repo instruction.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-07-15 10:05:28 -07:00
Sage Weil
aa60f940ec 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>
2013-07-15 10:02:47 -07:00
Sage Weil
6d3e13f0e1 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>
2013-07-15 09:58:08 -07:00
Greg Farnum
1dfd06dfad test_rgw: fix a number of unsigned/signed comparison warnings
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-07-15 08:43:42 -07:00
Christophe Courtaut
01ec4f129b rgw: Fix typo in rgw_user.cc
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-07-15 13:47:58 +02:00
Christophe Courtaut
fe13f88c6c doc: Modifies keyring path in radosgw config page. 2013-07-15 13:39:05 +02:00
Sage Weil
cf9571c13c 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>
2013-07-14 16:37:45 -07:00
Sage Weil
bc3088c92f 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>
2013-07-14 16:36:21 -07:00
Noah Watkins
d277edd24a Merge branch 'wip-hadoop-doc'
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-07-14 16:32:28 -07:00
Noah Watkins
6ef48c7ec2 doc: update Hadoop docs with plugin download
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-07-14 16:31:33 -07:00
Noah Watkins
a805958f89 doc: document new hadoop config options
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-07-14 16:31:33 -07:00
Sage Weil
9baa66801a Makefile: cls_rgw needs cls_rgw_types linked in now too
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-14 16:24:46 -07:00
Sage Weil
6b7d9f2b3e mon: include some (basic) auth info in report
Nothing privileged!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-14 16:20:54 -07:00
Sage Weil
56c36fa914 mon: include paxos info in report
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-14 16:16:55 -07:00
Sage Weil
bf7c4022d6 mon: move quorum out of monmap
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-14 16:12:34 -07:00
Sage Weil
89ced1c26f mon: include service first_committed in report
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-14 16:12:16 -07:00
Sage Weil
e22f46fe08 Merge pull request #429 from llonchj/hypertable_changes
Hypertable changes
2013-07-14 15:32:41 -07:00
Jordi Llonch
629a9d77cd Use mon_host instead of mon_addr in ceph_conf
Signed-off-by: Jordi Llonch <llonchj@gmail.com>
2013-07-15 07:28:02 +10:00
Jordi Llonch
9ca4733d90 hypertable recent version prototyping includes bool verify in length and read functions
Signed-off-by: Jordi Llonch <llonchj@gmail.com>
2013-07-15 07:26:58 +10:00
Sage Weil
df45b167cf Makefile: build cls_rgw even if we're not building radosgw
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-13 14:56:21 -07:00
Sage Weil
35ef873237 Makefile: fix cls_rgw linkage
Broken by 0c83b5fec2.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-13 14:51:40 -07:00
Sage Weil
cda17fd1a9 Makefile: fix cls_refcount linkage
Broken by d0bee5d85c.

Fixes: #5622
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-13 14:02:41 -07:00
Sage Weil
8d9165a013 qa/workunits/rbd/simple_big: fix unmap
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-13 13:26:21 -07:00
Sage Weil
15e3c9a4e4 qa/workunits/fs/test_o_trunc.sh: fix path
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-13 13:25:16 -07:00
Sage Weil
efe5b67bb7 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>
2013-07-13 13:00:19 -07:00
Sage Weil
d4876c533c 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>
2013-07-13 13:00:06 -07:00
Sage Weil
f37c36e817 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>
2013-07-13 13:00:06 -07:00
Sage Weil
bf4f8024ba 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 39b71c5826.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 22:04:53 -07:00
Dan Mick
0d66c9ebbf MonCommands.h: use new validation for crush names (CephString goodchars)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:42:38 -07:00
Dan Mick
741757a3c3 ceph_argparse.py: allow valid char RE arg to CephString
Change badchars to goodchars (no one was using badchars); allow
goodchars to be a RE character class of valid characters for the
param.  First use: crush item names.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:42:38 -07:00
Dan Mick
089dfe8e9e ceph_argparse: ignore prefix mismatches, but quit if non-prefix
I don't know what I was thinking; this was always the right validation
algorithm, and I broke it trying to simplify.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:42:30 -07:00
Dan Mick
da4c749ad3 ceph_argparse.py: validate's 3rd arg is not verbose, it's partial
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:20:18 -07:00
Dan Mick
b5659b5e7f 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>
2013-07-12 16:38:28 -07:00
Dan Mick
cc10988850 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>
2013-07-12 16:37:32 -07:00
Sage Weil
495ee108db 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>
2013-07-12 16:21:24 -07:00
Sage Weil
48a2959867 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>
2013-07-12 15:51:24 -07:00
Sage Weil
c0845a9799 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>
2013-07-12 15:50:49 -07:00
Sage Weil
60a19e7412 PendingReleaseNotes: ceph -s --format=json output change
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 15:50:42 -07:00
David Zafman
f67e437b03 Merge branch 'wip-5371-next' into next
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-12 14:25:33 -07:00
David Zafman
5dd1d4b142 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>
2013-07-12 14:21:21 -07:00
David Zafman
c70216a237 Revert "test_filestore_idempotent: use obj name from source coll add"
This reverts commit 0bc731ea93.
2013-07-12 14:18:11 -07:00
David Zafman
0a3c902c16 Revert "test_filestore_idempotent: make newly created objects globally unique"
This reverts commit cdf5785c5e.
2013-07-12 14:17:55 -07:00