]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agomonmap: fix rename
Sage Weil [Mon, 21 May 2012 20:00:59 +0000 (13:00 -0700)]
monmap: fix rename

Update addr_name map appropriately.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: drop useless rank racalc in init
Sage Weil [Mon, 21 May 2012 18:46:06 +0000 (11:46 -0700)]
mon: drop useless rank racalc in init

bootstrap() handles this, no need to worry about it here.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: fix leak of MonMap
Sage Weil [Mon, 21 May 2012 18:38:07 +0000 (11:38 -0700)]
mon: fix leak of MonMap

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonmap: filter_initial_members -> set_initial_members
Sage Weil [Mon, 21 May 2012 18:36:43 +0000 (11:36 -0700)]
monmap: filter_initial_members -> set_initial_members

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonmaptool: fix clitests
Sage Weil [Sat, 19 May 2012 22:08:26 +0000 (15:08 -0700)]
monmaptool: fix clitests

- epoch is always 0
- new options in usage string

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoqa: use full paths for mon bootstrap tests
Sage Weil [Sat, 19 May 2012 00:12:17 +0000 (17:12 -0700)]
qa: use full paths for mon bootstrap tests

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: show quorum names in health warning
Sage Weil [Sat, 19 May 2012 00:12:35 +0000 (17:12 -0700)]
mon: show quorum names in health warning

Names, not just ranks (which nobody cares about).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonmaptool: add --generate, --filter-initial options
Sage Weil [Fri, 18 May 2012 17:52:04 +0000 (10:52 -0700)]
monmaptool: add --generate, --filter-initial options

Generate a monmap from conf/args, and apply the mon initial hosts to it.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonmap: move build_initial() from MonClient
Sage Weil [Fri, 18 May 2012 17:38:26 +0000 (10:38 -0700)]
monmap: move build_initial() from MonClient

This belongs here, not in MonClient.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: move initial_members filtering into MonMap method
Sage Weil [Fri, 18 May 2012 16:52:09 +0000 (09:52 -0700)]
mon: move initial_members filtering into MonMap method

This is cleaner.  Also, we can perform/test this functionality from the
monmaptool.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: always mark seed/mkfs monmap as epoch 0
Sage Weil [Fri, 18 May 2012 16:38:52 +0000 (09:38 -0700)]
mon: always mark seed/mkfs monmap as epoch 0

This isn't strictly necessary, since the MonmapMonitor resets this on first
commit, but it's cleaner.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoqa: add mon test for seeding bootstrap mon peers via admin socket
Sage Weil [Fri, 18 May 2012 01:18:10 +0000 (18:18 -0700)]
qa: add mon test for seeding bootstrap mon peers via admin socket

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: add -or- update blank mon addr with join command
Sage Weil [Fri, 18 May 2012 01:14:33 +0000 (18:14 -0700)]
mon: add -or- update blank mon addr with join command

Update blank addrs with the join command (in addition to adding new mons).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: send join message if we are in monmap with blank addr
Sage Weil [Fri, 18 May 2012 01:13:57 +0000 (18:13 -0700)]
mon: send join message if we are in monmap with blank addr

Being in the monmap with a blank ip is possible if we were a initial member
seed but weren't part of the first election/quorum.  If that's the case,
first update ourselves before we try to call an election and join the
quorum.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: simplify/clean up dummy addrs used for initial members
Sage Weil [Fri, 18 May 2012 01:17:18 +0000 (18:17 -0700)]
mon: simplify/clean up dummy addrs used for initial members

Use a complete blank IP, but set the nonce.  This way
entity_addr_t::is_blank_ip() works.  We're also outside of the namespace of
possible addrs that the mons *could* use, which is a bit cleaner.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: learn peer addrs when probing
Sage Weil [Fri, 18 May 2012 00:52:54 +0000 (17:52 -0700)]
mon: learn peer addrs when probing

If we have a monmap with dummy addrs for initial members, and we probe one
of those peers and learn their address, update our monmap appropriately.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: set our addr when populating monmap with initial members
Sage Weil [Fri, 18 May 2012 00:51:47 +0000 (17:51 -0700)]
mon: set our addr when populating monmap with initial members

If the seed monmap doesn't contain us and we are populating it with
initial members, and one of those members is us, use our addr instead of
using a dummy one.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: add peers probing us to extra peer list
Sage Weil [Fri, 18 May 2012 00:50:49 +0000 (17:50 -0700)]
mon: add peers probing us to extra peer list

If we are probed by another monitor, add them to our extra probe list. This
lets us rely on the active probe/reply to gather information and not infer
anything from here.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: 'add_bootstrap_peer_hint <addr>' via admin socket
Sage Weil [Fri, 18 May 2012 00:50:01 +0000 (17:50 -0700)]
mon: 'add_bootstrap_peer_hint <addr>' via admin socket

Let user add peer hints via the admin socket while bootstrapping.  Once we
have joined a cluster this command is ignored.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: all starting with empty monmap
Sage Weil [Fri, 18 May 2012 00:49:00 +0000 (17:49 -0700)]
mon: all starting with empty monmap

It's okay to start up with an empty monmap.  It just means that you must:

 * set 'mon initial members'
 * feed hints via the admin socket, or learn hints from other mons probing
   us

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: multiword admin socket commands
Sage Weil [Fri, 18 May 2012 00:30:35 +0000 (17:30 -0700)]
cephtool: multiword admin socket commands

Slurp up anything on the command line that isn't an option, so that you can
do

 ceph --admin-socket /path/to/asok foo bar baz

instead of

 ceph --admin-socket /path/to/asok 'foo bar baz'

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoadmin_socket: match first word against command
Sage Weil [Fri, 18 May 2012 00:15:41 +0000 (17:15 -0700)]
admin_socket: match first word against command

This lets us do commands that take arguments.  We assume space is the
separator.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonmap: move monmap generation from ip/host list into MonMap
Sage Weil [Thu, 17 May 2012 22:12:23 +0000 (15:12 -0700)]
monmap: move monmap generation from ip/host list into MonMap

Also generalize the prefix so it's explicit in the caller and a bit less
magic.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: drop mon_initial_hosts
Sage Weil [Thu, 17 May 2012 22:11:39 +0000 (15:11 -0700)]
mon: drop mon_initial_hosts

Bad idea.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: clean up initial_members code slightly
Sage Weil [Thu, 17 May 2012 22:38:45 +0000 (15:38 -0700)]
mon: clean up initial_members code slightly

Don't recalc rank unless we need to.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoqa: add a bunch of mon bootstrap tests
Sage Weil [Thu, 17 May 2012 21:50:31 +0000 (14:50 -0700)]
qa: add a bunch of mon bootstrap tests

These's are comprehensive because a lot of the startup logic is about
picking a local address, and it's difficult to do test that on a single
host.  They cover the other variables surrounding mon bringing up, though:

 - part of initial monmap, or not
 - new nodes given all prior nodes, or not
 - new nodes have self included in monmap seed, or not
 - initial quorum members

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: ignore election messages from outside monmap
Sage Weil [Thu, 17 May 2012 21:46:46 +0000 (14:46 -0700)]
mon: ignore election messages from outside monmap

These shouldn't(tm) happen with new code, but with old code they do.  And
if we get them, elector can try to monmap->get_inst() on them and crash.
Throw them out here; they're nonsense from our perspective anyway if the
peer isn't part of our monmap.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: include quorum member names in 'mon stat'
Sage Weil [Thu, 17 May 2012 20:27:47 +0000 (13:27 -0700)]
mon: include quorum member names in 'mon stat'

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: limit initial quorum to mon_initial_members
Sage Weil [Thu, 17 May 2012 20:27:30 +0000 (13:27 -0700)]
mon: limit initial quorum to mon_initial_members

This is a two-stage process.

 * If we start up, and have never joined a quorum, and initial members are
   specified, only include them in the monmap; put all others in the
   extra probe list.
 * We add missing members if necessary to make the monmap (and initial
   quorum) the right size.
 * If we probe someone that *has* participated in a successful quorum, we
   get their monmap, and restart, so this is moot.
 * We only call an election to create a new cluster if outside_quorum gets
   big enough (it will only include initial members) and if it includes us.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: only include monmap mon's in outside_quorum, new quorum
Sage Weil [Thu, 17 May 2012 19:39:11 +0000 (12:39 -0700)]
mon: only include monmap mon's in outside_quorum, new quorum

Only include mons that are in the monmap in the outside_quorum set, which
we use to determine if we can form a new quorum.

In particular, if we ourselves are not in the monmap, we can't call an
election (that wouldn't include us anyway).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: add set of additional peers to probe
Sage Weil [Thu, 17 May 2012 19:37:36 +0000 (12:37 -0700)]
mon: add set of additional peers to probe

Probe an additional set of peers, not included in the monmap.

Incomplete; we'll still assume they *can* form a quorum.  See next patch.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: use current monmap for initial quorum
Sage Weil [Thu, 17 May 2012 19:36:41 +0000 (12:36 -0700)]
mon: use current monmap for initial quorum

This makes a bit more sense.  Don't use the seed monmap, but use the one
we ended up with when we formed our first quorum.  This will do a better
job of picking up names of peers, and also ensure we get a map based on
the mon initial members (if specified).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: take probed peer's monmap if it has ever joined a quorum
Sage Weil [Thu, 17 May 2012 18:08:38 +0000 (11:08 -0700)]
mon: take probed peer's monmap if it has ever joined a quorum

If we probe a peer and their monmap has actually been part of a started
cluster/quorum, and ours hasn't, take theirs.  Comparing versions isn't
sufficient.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonmaptool: don't increment epoch on modification
Sage Weil [Thu, 17 May 2012 18:09:24 +0000 (11:09 -0700)]
monmaptool: don't increment epoch on modification

This just confuses things, because a manually manipulated map might have
some epoch number that bears no relation to the actual published/committed
maps.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: pass has_ever_joined in probe messages
Sage Weil [Thu, 17 May 2012 18:07:45 +0000 (11:07 -0700)]
mon: pass has_ever_joined in probe messages

This will allow monitors to behave appropriately with that important info..

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: clean up "joined" flag
Sage Weil [Thu, 17 May 2012 18:00:46 +0000 (11:00 -0700)]
mon: clean up "joined" flag

- check flag on init, keep in memory
- set flag only when we are active and have a committed monmap.  i.e., when
  we are active participants in a bootstrapped/created mon cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: add initial quorum config options
Sage Weil [Thu, 17 May 2012 04:15:28 +0000 (21:15 -0700)]
mon: add initial quorum config options

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: discover peer names during probe
Sage Weil [Thu, 17 May 2012 04:09:58 +0000 (21:09 -0700)]
mon: discover peer names during probe

Fill in noname- entires in initial generate monmap (e.g., from mon_host)
with real peer names as we discover them.

This will make the upcoming initial quorum config check work by letting us
identify peers by name.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonclient: name resolved mon hosts noname-* too
Sage Weil [Tue, 1 May 2012 20:15:11 +0000 (13:15 -0700)]
monclient: name resolved mon hosts noname-* too

This would allow you to do

  mon host = foo, bar, baz

or

  mon host = multiarecordhostname.foo.com

and have the generated monmap tag monitors as noname-, so that the ceph-mon
mkfs will identify itself as one of them and initialize itself
properly.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: include health in status
Sage Weil [Fri, 18 May 2012 22:07:29 +0000 (15:07 -0700)]
mon: include health in status

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: move health check into helper function
Sage Weil [Fri, 18 May 2012 21:08:11 +0000 (14:08 -0700)]
mon: move health check into helper function

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-mon-refactor'
Sage Weil [Fri, 18 May 2012 20:54:05 +0000 (13:54 -0700)]
Merge remote-tracking branch 'gh/wip-mon-refactor'

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
13 years agomon: fix a bug that was preventing us from subscribing to some log levels.
Joao Eduardo Luis [Fri, 18 May 2012 19:07:45 +0000 (12:07 -0700)]
mon: fix a bug that was preventing us from subscribing to some log levels.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agomon: fix the priority filter.
Joao Eduardo Luis [Fri, 18 May 2012 18:32:43 +0000 (11:32 -0700)]
mon: fix the priority filter.

When a given log level L was specified, we would reply with all the
messages of "level L and below"; for instance, for a 'log-error' we would
present all the messages of level 'error', 'warn', 'sec', 'info' and
'debug'.

We shouldn't be doing it that way, so we just inverted the filter
condition. Now we show only 'L and above'; i.e., for a log level of
'log-warn', show only 'log-warn' and 'log-error'.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agoceph-authtool: fix clitests
Sage Weil [Fri, 18 May 2012 17:59:52 +0000 (10:59 -0700)]
ceph-authtool: fix clitests

No more --bin option.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoceph-authtool: fix usage
Sage Weil [Fri, 18 May 2012 17:59:28 +0000 (10:59 -0700)]
ceph-authtool: fix usage

No more -b, --bin.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'wip-mon-keyring'
Sage Weil [Fri, 18 May 2012 03:29:42 +0000 (20:29 -0700)]
Merge branch 'wip-mon-keyring'

Reviewed-by: Greg Farnum <greg@inktank.com>
13 years agomon: monmap first from 'status' command
Sage Weil [Fri, 18 May 2012 03:21:19 +0000 (20:21 -0700)]
mon: monmap first from 'status' command

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: only log map state changes from primary
Sage Weil [Fri, 18 May 2012 03:19:58 +0000 (20:19 -0700)]
mon: only log map state changes from primary

We still get noise after elections, but only from the winner.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: aesthetic change to ceph -w output
Sage Weil [Fri, 18 May 2012 03:18:35 +0000 (20:18 -0700)]
cephtool: aesthetic change to ceph -w output

* no seq
* name, not ip addr

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: aesthetic changes to map change log entries
Sage Weil [Fri, 18 May 2012 03:18:13 +0000 (20:18 -0700)]
mon: aesthetic changes to map change log entries

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMakefile: drop MMonObserve*
Sage Weil [Fri, 18 May 2012 03:12:14 +0000 (20:12 -0700)]
Makefile: drop MMonObserve*

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoremove gceph
Sage Weil [Fri, 18 May 2012 03:11:41 +0000 (20:11 -0700)]
remove gceph

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoceph.spec: don't package gceph
Sage Weil [Fri, 18 May 2012 03:08:16 +0000 (20:08 -0700)]
ceph.spec: don't package gceph

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agodebian: don't package gceph
Sage Weil [Fri, 18 May 2012 03:08:11 +0000 (20:08 -0700)]
debian: don't package gceph

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agosrc: get rid of the Observers throughout the code base.
Joao Eduardo Luis [Thu, 17 May 2012 20:48:46 +0000 (13:48 -0700)]
src: get rid of the Observers throughout the code base.

This is a big patch that will remove all references to the observers
throughout the code, including a complete removal of the Observer-related
messages' source files.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agocephtool: Slight rework and pub/sub log support.
Joao Eduardo Luis [Thu, 17 May 2012 00:19:45 +0000 (17:19 -0700)]
cephtool: Slight rework and pub/sub log support.

We reworked the code a bit to accommodate the introduction for the log
monitor's publish/subscribe mechanisms. With this patch we no longer
depend on the observer's, and use instead the much broader approach of
subscribing to events. In our case, we will subscribe to log levels.
If the '-w'/'--watch' flag is defined, the tool will be subscribed to the
'log-info' level by default, unless one of the following flags are defined
(in which case the level will be changed accordingly): '--watch-debug',
'--watch-info', '--watch-sec', '--watch-warn' and '--watch-error'.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agomon: Add publish/subscribe capabilities to the log monitor and status cmd.
Joao Eduardo Luis [Thu, 17 May 2012 00:19:06 +0000 (17:19 -0700)]
mon: Add publish/subscribe capabilities to the log monitor and status cmd.

This patch allows us to stir away from the monitor's observer mechanism,
by using instead the already existing publish/subscribe mechanism.
We follow the log levels used by the log monitor, and will recognize any
one of the following subscriptions: 'log-error' (higher priority),
'log-warn', 'log-sec', 'log-info' and 'log-debug' (lowest priority).

Also, add a new 'status' command to the monitor, which may be invoked by
any client (such as the ceph tool), and which shall return the status of
the various cluster components (osdmap, pgmap, ...).

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agodoc: fix sizes in librbd python examples
Josh Durgin [Thu, 17 May 2012 20:56:32 +0000 (13:56 -0700)]
doc: fix sizes in librbd python examples

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoMerge remote branch 'origin/wip-misc'
Josh Durgin [Thu, 17 May 2012 20:06:26 +0000 (13:06 -0700)]
Merge remote branch 'origin/wip-misc'

Reviewed-by: Sage Weil <sage@inktank.com>
13 years agodoc: fix link to hardware recommendations section
Josh Durgin [Thu, 17 May 2012 19:57:18 +0000 (12:57 -0700)]
doc: fix link to hardware recommendations section

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agodoc: fix formatting and a couple config defaults
Josh Durgin [Thu, 17 May 2012 18:54:02 +0000 (11:54 -0700)]
doc: fix formatting and a couple config defaults

``ceph.conf`` needed spaces around it to be parsed correctly.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoFileJournal: Clarify log message on journal too small.
Tommi Virtanen [Thu, 17 May 2012 16:54:02 +0000 (09:54 -0700)]
FileJournal: Clarify log message on journal too small.

The OSDs tolerate a full journal, it will just result in a latency
spike. Make the error message say operation will continue, just
slower.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
13 years agoReplicatedPG: fill in data_off in OSDOpReply
Josh Durgin [Thu, 17 May 2012 01:37:05 +0000 (18:37 -0700)]
ReplicatedPG: fill in data_off in OSDOpReply

The assignment was accidentally made unreachable by
ff55d2f310312bb5390326dcc35961d39ccad416

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoMerge branch 'next'
Josh Durgin [Thu, 17 May 2012 00:43:54 +0000 (17:43 -0700)]
Merge branch 'next'

13 years agoMerge branch 'wip-oc-error-handling' into next
Josh Durgin [Thu, 17 May 2012 00:42:21 +0000 (17:42 -0700)]
Merge branch 'wip-oc-error-handling' into next

Reviewed-by: Sage Weil <sage@inktank.com>
13 years agoconfig: improve comments for rbd caching options
Josh Durgin [Wed, 16 May 2012 21:06:55 +0000 (14:06 -0700)]
config: improve comments for rbd caching options

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: check for cache flush errors
Josh Durgin [Wed, 16 May 2012 19:41:27 +0000 (12:41 -0700)]
librbd: check for cache flush errors

Return errors from flushing to the caller. Warn
if an error occurs during invalidation, but don't retry,
since the higher level handles these cases, namely:

* rollback (doing this with an image open is asking for trouble)
* shrink (doing this with writes in flight may create extra objects anyway)
* shutdown (qemu flushes before closing the device)

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-mon-encoding'
Sage Weil [Wed, 16 May 2012 23:55:04 +0000 (16:55 -0700)]
Merge remote-tracking branch 'gh/wip-mon-encoding'

Reviewed-by: Greg Farnum <greg@inktank.com>
13 years agoMerge branch 'wip-upstart'
Sage Weil [Wed, 16 May 2012 23:53:45 +0000 (16:53 -0700)]
Merge branch 'wip-upstart'

Reviewed-by: Tommi Virtanen <tv@inktank.com>
13 years agoinit-radosgw: skip sections without host= line
Sage Weil [Wed, 16 May 2012 23:37:40 +0000 (16:37 -0700)]
init-radosgw: skip sections without host= line

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agokeyring: drop binary encoder
Sage Weil [Wed, 16 May 2012 21:02:26 +0000 (14:02 -0700)]
keyring: drop binary encoder

Drop the keyring encode method, and binary encoder.

Don't just encode in plaintext because we assume we get the whole
bufferlist, and encoding something like list<KeyRing> would thus fail.

Fixes: #2435
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agokeyring: always encode in plaintext
Sage Weil [Wed, 16 May 2012 20:58:57 +0000 (13:58 -0700)]
keyring: always encode in plaintext

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: make 'auth get-key <name>' return key
Sage Weil [Wed, 16 May 2012 20:12:29 +0000 (13:12 -0700)]
mon: make 'auth get-key <name>' return key

Same as 'print-key'.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: 'auth list' is a read-only operation
Sage Weil [Mon, 14 May 2012 22:19:31 +0000 (15:19 -0700)]
mon: 'auth list' is a read-only operation

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: 'auth get-or-create-key name capsys capval capsys2 capval2 ...'
Sage Weil [Mon, 14 May 2012 22:10:20 +0000 (15:10 -0700)]
mon: 'auth get-or-create-key name capsys capval capsys2 capval2 ...'

Fixes: #2406
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoauth: EntityName ==, != operators
Sage Weil [Mon, 14 May 2012 21:41:45 +0000 (14:41 -0700)]
auth: EntityName ==, != operators

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: make 'auth get <name>' dump plaintext keyring
Sage Weil [Mon, 14 May 2012 21:21:52 +0000 (14:21 -0700)]
mon: make 'auth get <name>' dump plaintext keyring

This is friendlier.

Fixes: #2406
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoinit-ceph: ignore sections without 'host' defined
Sage Weil [Mon, 14 May 2012 21:16:25 +0000 (14:16 -0700)]
init-ceph: ignore sections without 'host' defined

This will make it easier for sysvinit and upstart to coexist.

We will break existing users who have a separate .conf for each node and
didn't add host lines.  We'll need to make note of that in the release
notes.

Fixes: #2404
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoObjectCacher: handle write errors
Josh Durgin [Tue, 15 May 2012 22:21:50 +0000 (15:21 -0700)]
ObjectCacher: handle write errors

If a write error occurs, mark the BufferHead dirty again, and
pass the return value to the completion. This makes flushing
return the write error, if one occurs, since the flush callback
is passed as the write callback.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoObjectCacher: propagate read errors to the caller
Josh Durgin [Tue, 15 May 2012 17:58:59 +0000 (10:58 -0700)]
ObjectCacher: propagate read errors to the caller

Previously the return value of a read operation was ignored.  Now a
read error sets the error field, and changes the BufferHead to a new
error state. Error state BufferHeads are treated as misses so they can
be retried when requested by a user of the ObjectCacher.  When _readx
is called again internally, they're treated as hits so the error can
be returned to the user.

The error value is ignored if the BufferHead is not in the error
state.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoceph-dencoder: add AuthMonitor::Incremental
Sage Weil [Wed, 16 May 2012 23:10:52 +0000 (16:10 -0700)]
ceph-dencoder: add AuthMonitor::Incremental

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: use new encoder macros for AuthMonitor::Incremantal
Sage Weil [Wed, 16 May 2012 23:06:42 +0000 (16:06 -0700)]
mon: use new encoder macros for AuthMonitor::Incremantal

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agofeatures: explicitly use CEPH_FEATURES_ALL instead of -1
Sage Weil [Wed, 16 May 2012 23:04:19 +0000 (16:04 -0700)]
features: explicitly use CEPH_FEATURES_ALL instead of -1

Make it clear to readers what that -1 is all about.  Alex would be proud.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: fix mon removal check
Sage Weil [Wed, 16 May 2012 22:37:34 +0000 (15:37 -0700)]
mon: fix mon removal check

Only take our absence from the monmap to mean that we were removed if we
were ever a member in the first places.

This fixes the bootstrap case:

 - create temp_monmap with existing member(s) plus new guy
 - ceph-mon --mkfs --monmap temp_monmap --fsid ...
 - start ceph-mon

Basically, this is just using the seed monmap as a way to tell the new
daemon which ip:port to use.  Specifying mon addr, public network, or
public addr would also work.

Fixes: #2436
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agodoc: add ioctx parameter to rbd pybind examples.
Greg Farnum [Wed, 16 May 2012 20:42:55 +0000 (13:42 -0700)]
doc: add ioctx parameter to rbd pybind examples.

This parameter is required and was missing. And fix a typo

13 years agolibrados: avoid overflow in the return value of reads
Josh Durgin [Wed, 16 May 2012 20:40:51 +0000 (13:40 -0700)]
librados: avoid overflow in the return value of reads

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoObjectCacher: only perfcount reads requested by the client
Josh Durgin [Wed, 16 May 2012 20:40:43 +0000 (13:40 -0700)]
ObjectCacher: only perfcount reads requested by the client

_readx is called again after each bh is read by C_RetryRead. This
resulted in the read being counted many times for the internal
caller that was just checking whether it was done yet.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoosd: include age in 'slow request' messages
Sage Weil [Wed, 16 May 2012 20:07:38 +0000 (13:07 -0700)]
osd: include age in 'slow request' messages

Make log messages easier to interpret, without subtracting timestamps in
your head.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoworkloadgen: Add transaction throughput infos.
Joao Eduardo Luis [Mon, 14 May 2012 16:53:21 +0000 (09:53 -0700)]
workloadgen: Add transaction throughput infos.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agoAdditional documentation theme changes:
Ross Turk [Tue, 15 May 2012 18:16:09 +0000 (11:16 -0700)]
Additional documentation theme changes:

1) Adjust h2 tags so that section titles are visually differentiated
2) Add 1.5em of margin to all pre blocks and tables

Signed-off-by: Ross Turk <ross@inktank.com>
13 years agomonmap: new encoder
Sage Weil [Tue, 15 May 2012 04:15:52 +0000 (21:15 -0700)]
monmap: new encoder

Introduce a feature bit so that we can interoperate with older
peers.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: conditonally encode monmap for peer mon during probe
Sage Weil [Tue, 15 May 2012 04:03:42 +0000 (21:03 -0700)]
mon: conditonally encode monmap for peer mon during probe

This might be sufficient to let monitors with different versions of the
monmap encoding interoperate, but I'm too lazy to fully test it right now.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonmap: use feature bits and single encode() method
Sage Weil [Tue, 15 May 2012 04:01:58 +0000 (21:01 -0700)]
monmap: use feature bits and single encode() method

Instead of selecting an encode method in the caller, use a normal features
argument to encode() and branch there.

Leave behavior of all callers untouched.  We continue to assume, for
example, that all monitors have the same features, and that
'ceph mon getmap' should return the fully-featured encoding.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: new encoding for MonCaps
Sage Weil [Tue, 15 May 2012 03:53:31 +0000 (20:53 -0700)]
mon: new encoding for MonCaps

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'stable'
Sage Weil [Tue, 15 May 2012 03:30:35 +0000 (20:30 -0700)]
Merge branch 'stable'

Conflicts:
src/osdc/Objecter.cc

13 years agoObjecter: don't throttle resent linger ops
Josh Durgin [Mon, 14 May 2012 18:49:49 +0000 (11:49 -0700)]
Objecter: don't throttle resent linger ops

Throttling is intended to stop the caller from submitting too many
requests, not blocking requests that are being resent internally. This
prevents a deadlock when handling an osdmap - previously
handle_osd_map could block when resending linger ops due to the
throttling. This would stop the messenger's dispatch thread from
delivering any subsequest messages, so the throttle budget would never
be replenished.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
13 years agoobjecter: ping connections with lingering ops every tick()
Yehuda Sadeh [Thu, 3 May 2012 00:33:43 +0000 (17:33 -0700)]
objecter: ping connections with lingering ops every tick()

Also, make sure that we initialize linger_op.session once
we have it.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agomon: use external keyring for mon->mon auth
Sage Weil [Tue, 8 May 2012 23:30:26 +0000 (16:30 -0700)]
mon: use external keyring for mon->mon auth

- Feed our keyring into the auth methods.
- Do not fail to build a ticket for type MON when we don't have a cap; it
  won't be in the auth database.  Also, we don't have caps on the monitors
  that are enfoced between each other.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: keep mon. secret in an external keyring
Sage Weil [Tue, 15 May 2012 03:13:40 +0000 (20:13 -0700)]
mon: keep mon. secret in an external keyring

- Keep the mon. key in a separate keyring files, "keyring", in the mon
  data dir.
- During init, if we don't find that file, copy the key from the keyserver
  database.
- During mkfs, put the mon. key in that file, and remove it from the seed
  file that primes the auth database.

This will allow admins to change the mon. key without bringing the cluster
online and doing something wonky.

Signed-off-by: Sage Weil <sage@newdream.net>