Commit Graph

19503 Commits

Author SHA1 Message Date
Josh Durgin
1ec3245d11 config: improve comments for rbd caching options
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 17:02:55 -07:00
Josh Durgin
49c6ad44b4 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>
2012-05-16 17:02:53 -07:00
Sage Weil
ef71d85eef Merge remote-tracking branch 'gh/wip-mon-encoding'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-05-16 16:55:04 -07:00
Sage Weil
f161c62322 Merge branch 'wip-upstart'
Reviewed-by: Tommi Virtanen <tv@inktank.com>
2012-05-16 16:53:45 -07:00
Sage Weil
5e3bc57e55 init-radosgw: skip sections without host= line
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:37:40 -07:00
Sage Weil
eaea7aa9b2 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>
2012-05-16 16:36:53 -07:00
Sage Weil
ec732816ef keyring: always encode in plaintext
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:36:53 -07:00
Sage Weil
6d4e79ace2 mon: make 'auth get-key <name>' return key
Same as 'print-key'.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:36:53 -07:00
Sage Weil
86f24868e4 mon: 'auth list' is a read-only operation
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
c9b220ffb6 mon: 'auth get-or-create-key name capsys capval capsys2 capval2 ...'
Fixes: #2406
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
66e27375d8 auth: EntityName ==, != operators
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
d079018617 mon: make 'auth get <name>' dump plaintext keyring
This is friendlier.

Fixes: #2406
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
288635843a 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>
2012-05-16 16:36:52 -07:00
Josh Durgin
23deb43baa 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>
2012-05-16 16:32:03 -07:00
Josh Durgin
59c6816542 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>
2012-05-16 16:31:35 -07:00
Sage Weil
24fddf2174 ceph-dencoder: add AuthMonitor::Incremental
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:10:52 -07:00
Sage Weil
7f1485451a mon: use new encoder macros for AuthMonitor::Incremantal
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:06:42 -07:00
Sage Weil
7aaccacff6 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>
2012-05-16 16:04:19 -07:00
Sage Weil
515649558d 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>
2012-05-16 15:37:34 -07:00
Greg Farnum
48d97fe796 doc: add ioctx parameter to rbd pybind examples.
This parameter is required and was missing. And fix a typo
2012-05-16 13:43:12 -07:00
Josh Durgin
1109c13238 librados: avoid overflow in the return value of reads
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 13:40:51 -07:00
Josh Durgin
2f1f808811 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>
2012-05-16 13:40:43 -07:00
Sage Weil
1c53f34b68 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>
2012-05-16 13:07:38 -07:00
Joao Eduardo Luis
2b446620ce workloadgen: Add transaction throughput infos.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-05-16 12:55:32 -07:00
Ross Turk
3d2d0ecd2c 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>
2012-05-15 11:16:29 -07:00
Sage Weil
067cd5fb48 monmap: new encoder
Introduce a feature bit so that we can interoperate with older
peers.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-14 21:15:52 -07:00
Sage Weil
31cb3aa6f0 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>
2012-05-14 21:03:42 -07:00
Sage Weil
a9f5d77406 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>
2012-05-14 21:01:58 -07:00
Sage Weil
31dc3945f5 mon: new encoding for MonCaps
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-14 20:53:31 -07:00
Sage Weil
5b0c7043ba Merge branch 'stable'
Conflicts:
	src/osdc/Objecter.cc
2012-05-14 20:30:35 -07:00
Josh Durgin
d7343814a0 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>
2012-05-14 20:23:10 -07:00
Yehuda Sadeh
ac85b9e867 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>
2012-05-14 20:22:54 -07:00
Sage Weil
7830f859e0 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>
2012-05-14 20:13:46 -07:00
Sage Weil
7be78101da 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>
2012-05-14 20:13:40 -07:00
Ross Turk
784d1d3a11 Documentation theme updates:
1) Background color in navbar
2) Correct body fonts
3) Document pane background (below the content)
2012-05-14 12:57:54 -07:00
Sage Weil
84f335a689 Merge branch 'wip-osdmap'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-05-14 11:34:03 -07:00
Ross Turk
ab717bc53f Updated link to publications 2012-05-14 11:27:06 -07:00
Sage Weil
5922e2c2b8 crush: pass weight vector size to map function
Pass the size of the weight vector into crush_do_rule() to ensure that we
don't access values past the end.  This can happen if the caller misbehaves
and passes a weight vector that is smaller than max_devices.

Currently the monitor tries to prevent that from happening, but this will
gracefully tolerate previous bad osdmaps that got into this state.  It's
also a bit more defensive.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-14 11:24:32 -07:00
Sage Weil
376f0d509b crush: adjust max_devices appropriately in insert_item()
If we insert a new item, make sure max_devices is still the max id + 1.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-14 11:24:31 -07:00
Sage Weil
320d1ebf9e mon: fail 'osd crush set ...' is osd doesn't exist
If an osd doesn't exist, don't let users add/update it in the crush map.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-14 11:24:28 -07:00
Sage Weil
f2380f4d4f cephfs: pass -1 for old preferred_osd field
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-12 20:03:53 -07:00
Sage Weil
bb74b8b3aa osdmap: filter out nonexistent osds from map
It is possible that the crush map contains device ids that do not exist as
osds.  Filter them out of the CRUSH result.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-12 14:18:27 -07:00
Sage Weil
80bbe5e4fd keyring: make child of KeyStore
This lets us pass a keyring to the auth methods as a source for keys for
doing the authentication handshaking.  Normally we pass a RotatatingKeyring
or the KeyServer, but for mon->mon we don't use a service key.  This will
let us use a simple KeyRing for that.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-10 10:10:56 -07:00
Sage Weil
7ce157d60f utime_t: no double ctor
error: os/FileJournal.h:48:51: call of overloaded ‘utime_t(int)’ is ambiguous

Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-10 10:09:30 -07:00
Sage Weil
90fb40303f objectcacher: make *_max_dirty_age tunables; pass to ctor
This replaces the hard-coded 1 second writeback timer.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-08 16:19:51 -07:00
Sage Weil
82a3600378 librbd: set cache defaults to 32/24/16 mb
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-08 16:08:22 -07:00
Sage Weil
f9a9888015 Merge branch 'wip-rbd-wt'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-08 16:04:12 -07:00
Sage Weil
d96bf6c95a test_filestore_workloadgen: name the Mutex variable
This is for interpreting lockdep reports.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-07 21:42:51 -07:00
Sage Weil
5c3e985c23 Merge remote branch 'gh/wip-wrkldgen-throughput' 2012-05-07 21:41:46 -07:00
Joao Eduardo Luis
8bacc51b83 workloadgen: time tracking using ceph's utime_t's instead of timevals.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-05-07 19:54:32 -07:00