Commit Graph

16608 Commits

Author SHA1 Message Date
Josh Durgin
10157d2ef7 rbd.py: be paranoid about strings
This prevents bad conversions (i.e. from int to char *).

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:40 -07:00
Josh Durgin
5cd6fad4b2 rbd.py: explicitly cast strings to c_char_p for type clarity
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:40 -07:00
Josh Durgin
e8d476da79 rbd.py: pass 0 for the default order, not NULL
librbd expects the order pointer to be valid - if it points to 0, the
default order is used.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:40 -07:00
Josh Durgin
2d8f52f0d0 rbd: improve error messages
One of these was accidentally not negated.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
69a5e795bb rados.py: make exceptions inherit from a base class
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
c53d05af6a rados.py: allow configuring rados through constructor options
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
c60abe1b48 rbd.py: make Image a context manager
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
c34e87d098 rados.py: make Rados and Ioctx objects context managers
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
a381294e92 rbd.py: make exceptions inherit from a base class
This way you can catch them all.
Also remove the unused NoData exceptions
- this was just useful for xattrs in librados.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
bc16878cc5 Use cpp_strerror or strerror_r when appropriate.
The only remaining uses of strerror are in single-threaded programs
that don't depend on libcommon.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
5f9be6fb15 rbd.py: add partial bindings for librbd
This is all the basic operations, but nothing with callbacks yet.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
fa691dfe6c rados.py: raise specific error when write is too long
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
9983f0762d rbd: init counter to 0 so errors don't say '-1% done'
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
0cea48a64f ReplicatedPG, tmap: return -ENOENT if the key to remove does not exist
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
74f07fbd56 librbd: use pre-existing helper methods for tmap operations
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Josh Durgin
afa30640c8 librbd: add debugging for failing to remove a header object
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:39 -07:00
Sage Weil
56ce7c20e9 mon: fix it again
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 16:36:54 -07:00
Sage Weil
e1eea2b5ea mon: fix dup pool creation race
Fixes: #1574
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 16:25:04 -07:00
Greg Farnum
c780494d8d rgw: get bucket markers from the same object at all times
We use an object in the control pool here, rather than an object
local to each pool. This gives us a single value which can be used
for tracking data at all times.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-26 15:11:25 -07:00
Sage Weil
d27d9d8943 init-ceph: more c* -> ceph-* cleanup
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 14:25:54 -07:00
Sage Weil
9cb6c550b6 osd: fix warning more
Argh

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 14:08:19 -07:00
Sage Weil
7cd4c688de radosgw_admin: 'bucket list' or 'buckets list'
The plural looks weird to me.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 14:03:12 -07:00
Sage Weil
3b10fd78ba Makefile: include init-radosgw in tarball
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 13:30:43 -07:00
Sage Weil
0dc45beaa0 radosgw: shut down threadpool
Don't crash when run as a non-daemon without apache.. e.g. 'radosgw' with
no args.

Fixes: #1572
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 13:28:01 -07:00
Greg Farnum
774aa25b8c rgw: pass POD c-string instead of string to formatter
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-26 13:24:08 -07:00
Greg Farnum
38c6fa5d12 osd: fix warning more
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-26 13:23:45 -07:00
Greg Farnum
bd1625b15d Merge remote branch 'origin/master' into wip-pool-sharing 2011-09-26 13:18:15 -07:00
Sage Weil
b582e7cd7d osd: fix warning
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 13:10:33 -07:00
Sage Weil
8563b96fe6 debian: include radosgw init script in package
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 11:04:25 -07:00
Sage Weil
b19a200613 radosgw: init script
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 11:03:33 -07:00
Sage Weil
9da0fdf4aa Merge branch 'stable' 2011-09-25 13:54:26 -07:00
Sage Weil
30d81fe13b filejournal: improve debug error messge
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-25 13:54:05 -07:00
Sage Weil
8aa15e8c55 osd/mon: make max maps per MOSDMap message tunable
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-24 15:49:32 -07:00
Sage Weil
8711c32ad4 osd: limit size of osdmap messages
Limit size of MOSDMap messages sent from OSDs.  Send many smaller
messages instead of a single large one.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-24 15:49:16 -07:00
Sage Weil
56071cc1bc osd: drop map_cache_keep_from
The purpose here was to avoid trimming cached maps prior to what we have
on disk.  However, now that we have the map_bl cache, this isn't needed:
anything after that epoch will come out of that cache.

Also, it was broken anyway--the value was never read.  So clean it out!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-24 15:19:31 -07:00
Sage Weil
59bcb0deb7 osd: limit size of OSDMap cache
If we get way way behind on our maps, we may end up with a really large
OSDMap cache because we currently on trim old maps based on
oldest_last_clean, which may be way in the past.  Avoid eating up gobs of
RAM by putting a ceiling on the cache size.  It'll mean more disk IO in
those situations, but it also means that we'll only load up the old maps
that we actually need (not every single one).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-24 15:16:53 -07:00
Greg Farnum
720788c052 rgw: only require content-length to be set on non-acl puts
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-24 14:53:21 -07:00
Sage Weil
4aa90a5e68 osd: don't finish boot unless instance in map is really us
We were going BOOTING->ACTIVE as soon as we showed up in the map with the
same client_addr.  Also verify that we were up_from an epoch after when
we started or rebound, to avoid the case where we rebind to the same
ports for client_addr (but maybe not others) and get caught in a rebind
loop.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-24 14:47:39 -07:00
Sage Weil
9fe49f5daa init-ceph: don't umount btrfs by default
As an admin I find this very annoying, even though it isn't strictly
symmetrical with the mount behavior.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-24 14:08:07 -07:00
Stanislav Sedov
ad38abcffb - Fix atomic set. 2011-09-24 13:49:40 -07:00
Yehuda Sadeh
67094554a3 rgw: user async exec for index completion op 2011-09-23 23:13:20 -07:00
Yehuda Sadeh
c8bd67b4be librados: add async exec 2011-09-23 23:13:08 -07:00
Yehuda Sadeh
53695134a6 rgw: tmp objects can be removed async 2011-09-23 22:36:26 -07:00
Yehuda Sadeh
6b9817af8d rgw: fix bucket stats 2011-09-23 21:32:53 -07:00
Yehuda Sadeh
241761766c rgw: fix header encoding 2011-09-23 21:21:51 -07:00
Yehuda Sadeh
230ec89ef9 rgw: fix compilation warning 2011-09-23 17:26:10 -07:00
Yehuda Sadeh
37f5da4370 rgw: fix compilation 2011-09-23 17:22:17 -07:00
Yehuda Sadeh
b7ec4d5d5c cls_rgw: substract obj stats only if obj exists 2011-09-23 17:19:27 -07:00
Yehuda Sadeh
ca77ba7736 rgw: integrate index categories 2011-09-23 17:11:49 -07:00
Greg Farnum
5a39724160 rgw: only require content-length to be set on non-acl puts
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-23 15:49:39 -07:00