Commit Graph

19952 Commits

Author SHA1 Message Date
Sage Weil
6fd91381d2 Merge remote-tracking branch 'gh/wip-osdcap'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-06-15 11:10:02 -07:00
Samuel Just
614d5a7bc5 LFNIndex.cc: escape null in append_[un]escaped
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-15 10:10:47 -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
dbbbe21f52 osdcap: 'allow rwx pool foo' or 'allow pool foo rwx'
Make the match vs spec order not matter.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 16:47:22 -07:00
Sage Weil
66df6be8bb ceph-authtool: update docs to reflect no more osdcap deny
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 16:36:10 -07:00
Sage Weil
f916168880 osdcap: make caps additive
Make 'allow pool foo r, allow pool foo w, allow x' sufficient when you
require rwx for pool foo.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-14 16:35:02 -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
051e1686cb osdcap: move semantics of cap check into OSDCap class
The class needs to understand the semantics of possible actions in enough
detail to apply the capabilities it describes, so it makes sense to pass
all of that information into a check method here.  That is preferable to
exposing the internal structure of the capability itself to an external
function to apply the same logic.

Specifically, this fixes the problem where we return the first matching
OSDCapSpec, not a union of all matching specs, and thus fixes a problem
where applying a cap like 'allow r, allow pool foo rwx' to a write
operation in pool foo.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 17:15:33 -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
762f6d9541 osdcap: whitespace to make grammar more readable
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 13:55:38 -07:00
Sage Weil
1cfd65b128 osdcap: use static const instead of #define
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 13:42:36 -07:00
Sage Weil
bf72a00e09 osdcap: drop unused 'auid' arg from get_cap(), is_match()
The intent was to do a cap like 'allow pools-that-i-own ...', but in
practice you just do 'allow pool <myuid> ...'.. the actual auid you
authenticate as is redundant, since the cap itself is authenticated.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 13:42:24 -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
c06e407530 osd: reimplement OSDCap struct
The old OSDCaps had a few undesireable features:

 - deny
 - weird 'default permissions' semantics when auid matches and no other
   cap is specified
 - difficult to understand, maintain parser

This version is renamed and has a few nice features:

 - spirit grammar for parsing
 - simple internal grant structure with simple semantics
 - support for object prefix maches
 - partial support for per-class (not yet implmeented by the OSD)

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 19:16:28 -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
Sage Weil
6fd80d3e56 cls_rgw: fix CLS_LOG macro usage
Now takes a level.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 11:27:36 -07:00
Sage Weil
c31b4e3100 remove ceph-kdump-copy
Moved to its own repo.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 10:10:58 -07:00
Sage Weil
d64600dfae debian: limit build archs
We depend on leveldb, which only builds on

 amd64 armel armhf i386 ia64 mipsel

Reported-by: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-12 10:08:20 -07:00
Sage Weil
6a3ec40138 Merge remote-tracking branch 'gh/wip-2516-2'
Reviewed-by: Sage Weil <sage@inktank.com>
2012-06-11 18:36:59 -07:00
Yehuda Sadeh
a3f86b80a6 rgw: usage statistics also count num of ops/successful_ops
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-11 16:39:15 -07:00