Commit Graph

19957 Commits

Author SHA1 Message Date
Sage Weil
030a2e3bf4 mon: include quorum in ceph status
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-18 14:02:29 -07:00
Sage Weil
2fc2cf03b3 mon: gracefully handle slow 'ceph -w' clients
If we are sending log updates to a client (ceph -w), and they are far
enough behind to drop behind first_committed, include a friendly message
in their stream but continue.

Drop useless return value from _create_sub_incremental().  Assert that we
can read the state file.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-18 14:00:06 -07:00
Samuel Just
51fcef2465 PG: best_info must have a last_epoch_started as high as any other info
We disregard incomplete infos during find_best_info, but we can't an
info with a last_epoch_started less that of the incomplete info.

This should avoid cases like #2462.  In that case, it appears that
a peer with empty info/log was chosen as authoritative even though
there was a non-empty incomplete peer.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-18 11:18:30 -07:00
Laszlo Boszormenyi (GCS)
95ac5baed4 debian: fix python-ceph depends
Signed-off-by: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
2012-06-17 13:21:24 -07:00
Laszlo Boszormenyi (GCS)
d7fe0e3fe4 debian: update homepage url
Signed-off-by: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
2012-06-17 13:21:19 -07:00
Sage Weil
82cb3d61ff filestore: fix 'omap' collection skipping
The if/else if/... structure was skipping this test if the file system
didn't support d_type.

Fixes: #2598
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-17 13:20:59 -07:00
Sage Weil
e3b6957dd0 run-cli-test: use new pip incantation
http://www.pip-installer.org/en/latest/news.html#id1

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-17 11:15:32 -07:00
Sage Weil
3d4ba4319c cls_rbd: do not pass snapid_t to vargs
On squeeze,

warning: cls_rbd.cc:534: cannot pass objects of non-POD type ‘struct snapid_t’ through ‘...’; call will abort at runtime

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-17 09:07:41 -07:00
Sage Weil
5efaa8d779 msg: fix buffer overflow in ipv6 addr parsing
Noticed because of failing i386 unit tests for long addrs; x86_64 passed
fine.  Sigh.  FTR, the failing address was

	2001:0db8:85a3:0000:0000:8a2e:0370:7334

Sadly the full length addrs don't turn it up on x86_64, still, nor does
valgrind notice.  But, this fixes it on i386.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-16 20:09:04 -07:00
Sage Weil
f8a196fb7d cls_rbd: drop useless snapshot metadata helpers
Now that cls_rbd_snap is encodable, we don't need these helpers; get_key()
will suffice.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-16 07:34:00 -07:00
Sage Weil
b08d7ba972 cls_rbd: use encode macros for on-disk snap metadata
This will let us version this encoding later when we add new information
and features, like a per-snap parent.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-16 07:33:43 -07:00
Sage Weil
1e899d08e6 filejournal: make less noise about open failures
The callers report errors and pass up errors, so do not spam stderr with
this.  Fixes the confusion that sparked #2595.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-15 14:48:22 -07:00
Yehuda Sadeh
b415fd219e rgw: obj copy respects -metadata-directive
Fixes #2542. The old behavior just merged src object attrs
and provided attributes. The new (and correct) behavior looks
at the x-[amz|rgw|...]-metadata-directive and either copies
the source attrs, or replaces them with the provided attrs.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-15 13:44:09 -07:00
Sage Weil
b5de839808 osd: optional verify that sparse_read holes are zero-filled
This should help us track down/verify #2535.  It seems to happen on several
different systems, but we haven't figured out which ones yet.

This detects the bug, but does not attempt to correct it.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-15 11:54:19 -07:00
Sage Weil
1156f9435d buffer: add list and ptr is_zero() method
Simple helper to check if a buffer is all zeros.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-15 11:54:17 -07:00
Sage Weil
9d4ce4bce6 filestore: disable 'filestore fiemap' by default
We've seen this failing on both btrfs (Guido) and XFS (Oliver).  This works
around #2535.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-15 10:00:54 -07:00
Sage Weil
01f480393c Merge branch 'wip-radosgw-upstart' 2012-06-14 15:17:03 -07:00
Sage Weil
b44092f557 radosgw: stop startup timer on failed start
This fixes crashes like

    -1> 2012-06-14 15:04:31.733009 7f544e18c780 -1 Couldn't init storage provider (RADOS)
     0> 2012-06-14 15:04:31.734110 7f544e18c780 -1 common/Timer.cc: In function 'SafeTimer::~SafeTimer()' thread 7f544e18c780 time 2012-06-14 15:04:31.733020
common/Timer.cc: 57: FAILED assert(thread == __null)

 ceph version 0.47.2-481-g6f30f1f (commit:6f30f1fcdecd6c9390d4678c754dadd305165e3e)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x80) [0x5399a0]
 2: (SafeTimer::~SafeTimer()+0x39) [0x533e77]
 3: (main()+0x6f5) [0x51bc9d]
 4: (__libc_start_main()+0xfd) [0x7f544b38eead]
 5: /home/sage/src/ceph/src/.libs/lt-radosgw() [0x4f9e09]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 15:09:16 -07:00
Sage Weil
6f30f1fcde upstart: make id charset include - _ and .
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 15:04:07 -07:00
Sage Weil
7bfcc7c4bd radosgw: takes --id, but not -i
The -i short versio doesn't work on 'client' code that tend to use it for
input files.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 15:03:46 -07:00
John Wilkins
7515b05e88 doc: added qemu-img documentation for rbd.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-14 14:18:53 -07:00
Yehuda Sadeh
5db4509b8e rgw: limit number of buckets per user
Adding a configurable max_buckets per user. Bucket creation
verifies that max_buckets has not reached.

Backport: dho
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-06-14 14:12:56 -07:00
John Wilkins
0adb33d867 doc: Added steps for OpenStack install with DevStack
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-14 09:46:32 -07:00
John Wilkins
446e5d8ed2 doc: fixed bash syntax error.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-14 09:35:17 -07:00
Sage Weil
97c9f01430 qa: disable xfstest 68 for now
Stop the qa noise we fix #2410.  Looks like a freeze/thaw thing.

Maybe Jan's new freeze/thaw code will address this?  That's probably
wishful thinking.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 09:07:26 -07:00
Sage Weil
7f4d1710e1 qa: disable xfstest 219 for now
The cause of 219 failing is non-obvious.  Disable it for now.  :(

Avoids #2522.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 09:01:42 -07:00
Sage Weil
529c48442c Makefile: fix leveldb dep for system library case
We conditionally add this below only if using the bundled version.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 16:30:56 -07:00
Sage Weil
3dbad22cfc Makefile: fix leveldb includes for system library case
Use the installed headers, not ours.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 16:30:56 -07:00
Tommi Virtanen
e48dab43ae doc: Multi-monitor support means ceph::single_mon was renamed.
This changed in ceph-cookbooks.git commit
8e56551b11fe28cc4f29f4fcdcf6c38516bdc833.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-06-13 16:23:14 -07:00
Sage Weil
67710a65c7 rbd: fix usage test
Fixes: #2347
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 11:24:19 -07:00
Sage Weil
66553d25f0 Makefile: link gtest statically
The problem:

 - the unittests link against gtest, and gtest is not installed.  that's
   normally fine, but...
 - rbd and rados api unit tests link against gtest, and are installed
   by 'make install'.  they are needed for teuthology runs, etc.
 - if we build gtest as an .la library, we can only control whether *all*
   or *no* .la libraries are linked statically.
 - we want librados to be linked dynamically.

The solution:

 - build gtest as .a instead of a libtool library
 - link it statically, always.

Unit test binaries are bigger now.  Oh well...

Fixes: #2331
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 11:05:53 -07:00
Sage Weil
d1fc562d9d debian: install radosgw upstart configs, daemon dir
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 09:22:19 -07:00
Sage Weil
282277dece radosgw: upstart support
Like the other upstart configs, these assume the default value for
'rgw data'.  Same pattern as ceph-mon and ceph-mds.

Fixes: #2415
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 09:22:19 -07:00
caleb miles
c4a607aa1f CrushTester.cc: eliminated old compiler warning of uninitialized pointer.
Signed-off-by: caleb miles <caselim@gmail.com>
2012-06-13 07:46:02 -07:00
Sage Weil
6e551f7341 init-ceph: make 'status' report running version
Try to report the running version with 'status'.

Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 13:58:22 -07:00
Samuel Just
f822c0257e PG: track purged pgs during active
See bug #2462.

The following sequence could cause a log assuming a non-empty pg
to an empty replica:

1. primary sends query to stray
2. stray sends notify to primary
3. primary sends purge to stray removing stray from peer_info
4. stray recieves query and sends a notify
5. stray recieves purge and purges its pg
6. primary recieves notify from stray and adds it to peer_info
	note: peer_info[stray] is now wrong
7. acting set changes, primary is still primary, stray is replica
8. primary sends log to replica based on incorrect info from 6.

This patch adds a purged_peer set which is populated during purge_strays
and cleared during start_peering_interval.  The primary will ignore
notifies from the peer once the peer is in this set.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-12 13:01:57 -07:00
Sage Weil
e9390bb495 Merge branch 'wip-keyrings'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-06-12 12:48:37 -07:00
Sage Weil
4ec4b4774d ceph_argparse: make entityname parsing error more helpful
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:55 -07:00
Sage Weil
6f9ecef7ce rgw: default keyring to $rgw_data/keyring
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
ca2010ee95 vstart.sh: set data dirs instead of keyring locations
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
e958efa29a new default keyring location for daemons
$osd_data/keyring
$mds_data/keyring

Fixes: #2498
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
eeeb5993b4 mds: add mds_data config
This is where the keyring will live.  Eventually more may move in too.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
ce79f9e62e config: improve variable substitution
- allow ${foo_bar}
- prevent $foogarbage from substitution variable 'foo'
- use std::string throughout
- improve tests

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
d422bf159d config: expand any config variable in config
This is currently broken wrt 'foo' vs 'foo_bar', but otherwise works.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
500c72e8ee config: make meta expansion in set_val optional
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
72edd353f4 osdcaps: drop dead peer_type code
Not sure what this wasn intended for.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
8b5336a1f8 osd: simplify session peer type check
Check the authenticated peer name directly; don't store a copy in the
OSDCaps struct.  Also set the entity_name member of the session!

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:54 -07:00
Sage Weil
4cc122cc93 entity_name: is_*() methods
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:50:53 -07:00
caleb miles
b88a5e5344 crush: fix retry histogram array overflow due to indexing error
Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-06-12 11:29:13 -07:00
Sage Weil
37dea2d8db cls_rgw: use updated internal omap api
These were changed by 23ebc093a6.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:28:04 -07:00