Sage Weil
83c59cfb75
rgw_admin: rip out format.empty() special cases
...
If we want a plain output, we should implement a PlainFormatter of some
sort. For now, pretty json is good enough.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Conflicts:
src/rgw/rgw_admin.cc
2011-09-28 16:09:55 -07:00
Sage Weil
600126f34d
rgw_admin: fix --pretty-format and --purge-data flag parsing
...
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Conflicts:
src/rgw/rgw_admin.cc
2011-09-28 16:09:55 -07:00
Sage Weil
2f78faf11b
rgw_admin: default to json output
...
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-09-28 16:09:55 -07:00
Sage Weil
17603ee81e
radosgw-admin: use formatter for 'bucket list'
...
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-28 16:09:55 -07:00
Sage Weil
b69da1769a
rdosgw_admin -> radosgw-admin
...
Be consistent with other binary tool naming.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-28 16:09:55 -07:00
Greg Farnum
1392bbb803
rgw: remove now-unused struct RGWPoolInfo
...
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-28 14:18:32 -07:00
Greg Farnum
0eb433d41c
rgw: remove rgw_[retrieve|store]_pool_info and ".pool" pool
...
Convert these to rgw_[get|store]_bucket_info, add the owner field
to bucket info, and store both lookup formats in the ".bucket" pool.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-28 13:51:20 -07:00
Greg Farnum
c2fbde4df7
rgw: remove references to pool_id and replace with new bucket_id.
...
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-28 10:50:48 -07:00
Greg Farnum
57ea6b67e7
rgw: don't encode the bucket name twice in RGWPoolInfo!
...
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-27 15:19:40 -07:00
Sage Weil
e3eb2f258a
rgw: put bucketid allocator object in root (.rgw) pool
...
This keeps the .rgw.control pool disposable.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-27 14:07:50 -07:00
Sage Weil
8953c4d369
rgw: use same prefix for locator key as for oid
...
If the bucket has a prefix for oids, prepend the same prefix to the
locator key.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-27 13:56:42 -07:00
Sage Weil
68839a6820
rgw: list buckets using bucket objects
...
Don't assume the pools == buckets. List the bucket objects in the .rgw
pool.
Fixes : #1560
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-27 09:47:25 -07:00
Greg Farnum
d364628135
Merge remote branch 'origin/master' into wip-pool-sharing
...
Conflicts:
src/osd/OSD.cc
src/rgw/rgw_rados.cc
2011-09-27 08:28:02 -07:00
Sage Weil
9045b3f5a5
Merge branch 'stable'
2011-09-26 21:49:12 -07:00
Sage Weil
d340e8e742
radosgw: fix content-length checks
...
Ignore content-length check if the REQUEST_URI has a trailing ?acl.
(The object_str.find() check was wrong because object_str has the ?whatever
stripped off, and because it returns std::string::npos on failure.)
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 21:48:54 -07:00
Sage Weil
e47c11cf5d
radosgw: tolerate race creating .rgw* metadata pools
...
There may be multiple people trying to create these pools. That's just
fine.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-26 21:47:42 -07:00
Josh Durgin
916e49d710
librbd: fix end_block calculation for read_iterate
...
All end block calculations match now.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:40 -07:00
Josh Durgin
d71bf04f3f
test_rbd.py: Add large read and write tests
...
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:40 -07:00
Josh Durgin
8ca79a96c8
librbd: don't zero negative lengths
...
They are past the end of the buffer (and wrap around).
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:40 -07:00
Josh Durgin
4bb553b9f7
rados.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
a28eea8547
rbd.py: remove useless version object
...
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-26 18:10:40 -07:00
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
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
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
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