]>
git.apps.os.sepia.ceph.com Git - ceph.git/log
Greg Farnum [Tue, 4 Oct 2011 18:03:19 +0000 (11:03 -0700)]
rgw: remove select_bucket_placement from RGWAccess interface.
RGWRados::create_bucket is the only user now, so make it private
and make the interface a little tighter.
(We are going to need to handle placement at some point in the future,
but the interface needs to be designed a lot more carefully than this
one [wasn't].)
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Tue, 4 Oct 2011 17:52:22 +0000 (10:52 -0700)]
rgw: remove rgw_create_bucket.
Push all its extra functionality down into RGWRados::create_bucket. Convert
callers to the different interface (there's no reason to pass in the
bucket name apart from the bucket, and all callers know if they're
using a system bucket or not).
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Tue, 4 Oct 2011 16:25:43 +0000 (09:25 -0700)]
rgw: new command to add pools to the list of available places for storage.
Do this by adding an add_bucket_placement function to RGWAccess. Hurray
leaky abstractions! :(
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Mon, 3 Oct 2011 22:40:35 +0000 (15:40 -0700)]
rgw: don't specify create_pool and set_marker in create_bucket.
It's wildly inappropriate for that kind of implementation detail to
leak out of the interface. For the moment, leave in a "system_bucket"
parameter, which provides the necessary information. But we should
probably be able to push all of that information down below the
interface layer eventually, and then get rid of that param too.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Mon, 3 Oct 2011 22:14:02 +0000 (15:14 -0700)]
rgw: move rgw_bucket_select_host_pool behind RGWAccess as select_bucket_placement
This doesn't really belong in front of the interface. Maybe later we
can hide it completely, but for now we can put it behind the RGWAccess
interface in a way that at least pretends to be backing-store-agnostic.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Mon, 3 Oct 2011 19:02:19 +0000 (12:02 -0700)]
rgw: remove withdraw_pool function.
I think its use was broken anyway?
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Mon, 3 Oct 2011 19:01:56 +0000 (12:01 -0700)]
rgw: remove preallocation of pools
Rename rgw_bucket_allocate_pool to rgw_bucket_select_host_pool, since
that better describes functionality we might actually use someday (and
what it's actually doing now).
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Mon, 3 Oct 2011 17:39:25 +0000 (10:39 -0700)]
rgw: remove preallocating pools maintenance tick
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Sage Weil [Fri, 30 Sep 2011 21:42:27 +0000 (14:42 -0700)]
Merge branch 'wip-pool-sharing'
Josh Durgin [Fri, 30 Sep 2011 18:30:28 +0000 (11:30 -0700)]
doc: add documentation for librbd python bindings
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Thu, 29 Sep 2011 00:44:10 +0000 (17:44 -0700)]
rbd.py: add class and method documentation
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Thu, 29 Sep 2011 00:37:44 +0000 (17:37 -0700)]
rbd.py: use a dict to translate error codes
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Thu, 29 Sep 2011 00:24:25 +0000 (17:24 -0700)]
rbd.py: allow setting an image to no snapshot
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Thu, 29 Sep 2011 00:20:06 +0000 (17:20 -0700)]
rbd.py: turn EROFS into an exception
This is returned when trying to write to a snapshot.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Greg Farnum [Fri, 30 Sep 2011 16:39:33 +0000 (09:39 -0700)]
rgw: don't remove on-disk bucket object in rgw_user::rgw_remove_bucket
This is the same object that rgw_rados removes from the root pool now.
And since nobody calls rgw_remove_bucket_info, kill it.
(Hopefully we can kill all of the pi_buckets functions soon.)
While we're at it, rename rgw_remove_bucket to rgw_remove_user_bucket_info,
since that's what it does.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Fri, 30 Sep 2011 17:36:06 +0000 (10:36 -0700)]
rgw: revert part of commit:
30b814e2677659ddda4109a1421f33a47d83a05b
It's more consistent for RGWRados to delete the bucket object, rather
than the rgw_user functions.
And commenting functions out is not a happy practice.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Sage Weil [Fri, 30 Sep 2011 17:15:53 +0000 (10:15 -0700)]
rgw: don't remove bucket object twice
Or else the second attempt will faile with -ENOENT.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Fri, 30 Sep 2011 17:13:35 +0000 (10:13 -0700)]
rgw: fix bucket-id assignment
Get the version from the same io_ctx that you write with.
Also, use a private one, so that we don't race with other threads.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Fri, 30 Sep 2011 16:10:56 +0000 (09:10 -0700)]
rgw: separate bucket vs object owner tracking
- track bucket_owner in session
- separte bucket and object owner fields in log entries
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Fri, 30 Sep 2011 06:17:12 +0000 (23:17 -0700)]
radosgw-admin: fix acl vs content-length check
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Fri, 30 Sep 2011 06:15:56 +0000 (23:15 -0700)]
radosgw-admin: rename clitest dir
Signed-off-by: Sage Weil <sage@newdream.net>
Greg Farnum [Thu, 29 Sep 2011 23:47:08 +0000 (16:47 -0700)]
Merge branch 'wip-pool-sharing' of github.com:NewDreamNetwork/ceph into wip-pool-sharing
Conflicts:
src/rgw/rgw_bucket.h
Sage Weil [Thu, 29 Sep 2011 23:48:12 +0000 (16:48 -0700)]
radosgw-admin: fix help clitest
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 23:36:35 +0000 (16:36 -0700)]
rgw: set log entry owner to user if s->acl is not set
This is probably wrong, but it fixes the immediate problem of the first
entry in the log not having the owner field set. The 'log show' looks at
that first entry to spit out key bucket metadata.
A better approach is probably to put that bucket/log metadata (bucket_id,
owner) that doesn't change as an xattr on the object instead of dupilcating
it in every record. Or something like that...
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 23:35:02 +0000 (16:35 -0700)]
rgw: simplify bucket info storage
Use a single method to store bucket metadata.
Store it in both locations, so it never diverges. (This can still be
cleaned up.. probably one object should just point to the other, so the
data is only in one place.)
Disable to 'pool create' thing for now, which is still confusing me...
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 23:33:32 +0000 (16:33 -0700)]
radosgw-admin: pull 'log show' owner+bucket from first entry
Don't rely on the bucketinfo object for this, as it may be deleted. Having
it there most of the time but not always is going to mean breakage for
users.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 23:32:14 +0000 (16:32 -0700)]
rgw: fix RGWBucketInfo encoding of owner
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 21:09:17 +0000 (14:09 -0700)]
radosgw: fix log retry after bucket creation
We were clobbering the object name for some reason.. probably cruft from
some old change.
Signed-off-by: Sage Weil <sage@newdream.net>
Greg Farnum [Thu, 29 Sep 2011 20:45:40 +0000 (13:45 -0700)]
rgw: store bucket information in the .rgw pool instead of .buckets
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 28 Sep 2011 21:33:55 +0000 (14:33 -0700)]
radosgw_admin: we do want to set markers on these buckets
Commit
25499b644b1c5a7b6f4c8876261334dda10fbec3 introduced the initial
work for pool sharing and markers, but didn't set radosgw_admin to
use that infrastructure. We definitely want to be doing so, though,
since radosgw_admin isn't creating system buckets. Do so.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Samuel Just [Thu, 29 Sep 2011 18:24:44 +0000 (11:24 -0700)]
Cond.h: adjust nlock during waits
Previously, is_locked could erroneously return true if there were any
threads waiting on a cond on that lock. In particular, any lock
associated with a timer would always return true for is_locked if any
events were scheduled on the timer.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Samuel Just [Thu, 29 Sep 2011 00:43:04 +0000 (17:43 -0700)]
ReplicatedPG: dump_watchers in do_osd_op_effects
dump_watchers requires the osd watch_lock.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Samuel Just [Wed, 28 Sep 2011 22:36:31 +0000 (15:36 -0700)]
librados: Make notify a linger op
Notifies must be refreshed when the mapping changes.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Sage Weil [Thu, 29 Sep 2011 18:50:01 +0000 (11:50 -0700)]
test_async_snap: loop a finite number of times.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 18:48:00 +0000 (11:48 -0700)]
qa: btrfs: test_async_snap
Hammer on the btrfs async sync/snap create/remove ioctls.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 18:23:02 +0000 (11:23 -0700)]
radosgw-admin: 'log list' and 'log rm'
The normal object listing API seemed like a real poor match here so I
hacked in something that just lists the raw rados objects. It also looks
like that may need some fixing.
This patch at least establishes a usable interface that is purely
radosgw-admin based for listing, fetching, and removing logs, so users can
avoid looking at rados pools directly.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 16:18:00 +0000 (09:18 -0700)]
radosgw-admin: dump ints, not strings
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 16:16:54 +0000 (09:16 -0700)]
radosgw-admin: fix bucket stats
- 'usage' object instead of 'categories' array.
- dump ints, not strings.
Signed-off-by: Sage Weil <sage@newdream.net>
Greg Farnum [Wed, 28 Sep 2011 21:37:06 +0000 (14:37 -0700)]
rgw: protect the id-based accesses from namespace collisions
Users can create buckets named "8", but they can't name them ".8". So
prepend the actual on-disk objects with a period.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 28 Sep 2011 21:26:17 +0000 (14:26 -0700)]
rgw: remove get_bucket_info and convert users.
This just lives in struct rgw_bucket now.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Sage Weil [Thu, 29 Sep 2011 15:37:14 +0000 (08:37 -0700)]
radosgw-admin: fix 'bucket stats --uid='
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 04:38:59 +0000 (21:38 -0700)]
radosgw-admin: include 'suspended' in user info output
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 04:38:50 +0000 (21:38 -0700)]
radosgw-admin: clean up some cout usage
Errors to stderr. Avoid cout for commands with structured output.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 29 Sep 2011 04:26:17 +0000 (21:26 -0700)]
radosgw-admin: use formatter for 'bucket list'
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Wed, 28 Sep 2011 22:56:09 +0000 (15:56 -0700)]
radosgw-admin: 'bucket stats --uid'
List stats for all buckets on for the given user.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Wed, 28 Sep 2011 22:37:05 +0000 (15:37 -0700)]
radosgw-admin: clean up 'bucket list' output
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Wed, 28 Sep 2011 23:08:59 +0000 (16:08 -0700)]
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
Sage Weil [Wed, 28 Sep 2011 23:08:23 +0000 (16:08 -0700)]
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
Sage Weil [Wed, 28 Sep 2011 21:01:39 +0000 (14:01 -0700)]
rgw_admin: default to json output
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 28 Sep 2011 21:58:17 +0000 (14:58 -0700)]
radosgw-admin: use formatter for 'bucket list'
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Wed, 28 Sep 2011 21:33:03 +0000 (14:33 -0700)]
rdosgw_admin -> radosgw-admin
Be consistent with other binary tool naming.
Signed-off-by: Sage Weil <sage@newdream.net>
Greg Farnum [Wed, 28 Sep 2011 21:18:32 +0000 (14:18 -0700)]
rgw: remove now-unused struct RGWPoolInfo
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 28 Sep 2011 20:51:20 +0000 (13:51 -0700)]
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>
Greg Farnum [Wed, 28 Sep 2011 17:50:48 +0000 (10:50 -0700)]
rgw: remove references to pool_id and replace with new bucket_id.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Hannes Reinecke [Wed, 28 Sep 2011 08:47:34 +0000 (10:47 +0200)]
Use LIBEDIT_LIBS in Makefile.am
The editline library might require some additional libs, so
instead of hardcoding '-ledit' we should be using LIBEDIT_LIBS
in Makefile.am
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Wed, 28 Sep 2011 04:47:03 +0000 (21:47 -0700)]
Merge branch 'wip-dotnames'
Sage Weil [Wed, 28 Sep 2011 04:46:26 +0000 (21:46 -0700)]
clientN -> client.N
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 28 Sep 2011 04:43:59 +0000 (21:43 -0700)]
monN -> mon.N
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 28 Sep 2011 04:42:35 +0000 (21:42 -0700)]
mdsN -> mds.N
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 28 Sep 2011 04:34:44 +0000 (21:34 -0700)]
osdN -> osd.N
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Mon, 26 Sep 2011 23:25:47 +0000 (16:25 -0700)]
msgr: print entity_name_t with a .
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Wed, 28 Sep 2011 04:28:27 +0000 (21:28 -0700)]
osd: fix leak of src_obc references
We never moved the src_obc map from the local var into the RepGather
member!
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 28 Sep 2011 04:19:48 +0000 (21:19 -0700)]
test-rados-api: test tmap rm
Make sure we get ENOENT if the entry doesn't exist.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Wed, 28 Sep 2011 04:16:38 +0000 (21:16 -0700)]
osd: error out current op only on tmap ENOENT
If an individual op in do_osd_ops() fails, set result, and continue to the
end of the loop. Normally we'll return the error then, but if the ignore
error flag is set we'll continue.
Fix the tmap error handling so that we don't modify the tmap if the op
failed.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Mon, 26 Sep 2011 03:56:56 +0000 (20:56 -0700)]
osd: some PgPriorSet comments, trivial cleanups, new FIXME
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Mon, 26 Sep 2011 03:55:18 +0000 (20:55 -0700)]
osd: skip replay phase if osd_replay_window=0
The replay phase is only useful if there are clients waiting for ACK (but
not COMMIT) and expect ordering to be preserved across OSD failures.
Currently nobody does that except the client in sync io mode (shared
writers). For installations where we don't care (e.g., using rados only),
we can disable replay altogether.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Samuel Just [Tue, 27 Sep 2011 22:25:20 +0000 (15:25 -0700)]
ReplicatedPG: remove assert in remove_watcher
notif is not in notif->session->notifs.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Greg Farnum [Tue, 27 Sep 2011 21:09:36 +0000 (14:09 -0700)]
rgw: don't encode the bucket name twice in RGWPoolInfo!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Samuel Just [Fri, 23 Sep 2011 19:32:48 +0000 (12:32 -0700)]
ReplicatedPG: clean up watched objects on role change
Also removes inconsistent watch handling in handle_notify_timeout.
We will need to handle watch timeouts elsewhere.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Sage Weil [Tue, 27 Sep 2011 21:07:50 +0000 (14:07 -0700)]
rgw: put bucketid allocator object in root (.rgw) pool
This keeps the .rgw.control pool disposable.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 27 Sep 2011 20:56:42 +0000 (13:56 -0700)]
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>
Sage Weil [Tue, 27 Sep 2011 20:09:59 +0000 (13:09 -0700)]
ceph-authtool: fix -C
Fixes: #1578
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 27 Sep 2011 20:08:13 +0000 (13:08 -0700)]
ceph.spec.in: radosgw init script
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 27 Sep 2011 19:54:44 +0000 (12:54 -0700)]
mon: auth: implement 'auth print-key <name>'
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 27 Sep 2011 19:49:56 +0000 (12:49 -0700)]
mon: fix error return codes for 'auth ...'
Signed-off-by: Sage Weil <sage@newdream.net>
Josh Durgin [Tue, 27 Sep 2011 19:31:41 +0000 (12:31 -0700)]
ceph.spec.in: add rbd python bindings
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Tue, 27 Sep 2011 18:23:09 +0000 (11:23 -0700)]
debian: make python-ceph depend on librbd
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Tue, 27 Sep 2011 17:34:55 +0000 (10:34 -0700)]
pybind: fix errors found by pyflakes
Unused imports, typos, and unused variables.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Sage Weil [Tue, 27 Sep 2011 19:41:32 +0000 (12:41 -0700)]
debian: move ceph and ceph-authtool into ceph-common
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 27 Sep 2011 19:41:11 +0000 (12:41 -0700)]
mon: auth: generate random key on 'auth add ...' if no keyring is provided
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 27 Sep 2011 17:02:47 +0000 (10:02 -0700)]
debian: ceph-client-tools -> ceph-common, now required, w/ ceph-conf etc.
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 27 Sep 2011 16:47:25 +0000 (09:47 -0700)]
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>
Sage Weil [Tue, 27 Sep 2011 16:15:37 +0000 (09:15 -0700)]
osdmap: remove dead code
Signed-off-by: Sage Weil <sage@newdream.net>
Greg Farnum [Tue, 27 Sep 2011 15:28:02 +0000 (08:28 -0700)]
Merge remote branch 'origin/master' into wip-pool-sharing
Conflicts:
src/osd/OSD.cc
src/rgw/rgw_rados.cc
Sage Weil [Tue, 27 Sep 2011 04:49:12 +0000 (21:49 -0700)]
Merge branch 'stable'
Sage Weil [Tue, 27 Sep 2011 04:46:39 +0000 (21:46 -0700)]
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>
Sage Weil [Tue, 27 Sep 2011 04:35:52 +0000 (21:35 -0700)]
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>
Josh Durgin [Mon, 26 Sep 2011 21:13:44 +0000 (14:13 -0700)]
librbd: fix end_block calculation for read_iterate
All end block calculations match now.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Mon, 26 Sep 2011 17:35:37 +0000 (10:35 -0700)]
test_rbd.py: Add large read and write tests
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Fri, 23 Sep 2011 21:04:14 +0000 (14:04 -0700)]
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>
Josh Durgin [Fri, 23 Sep 2011 01:26:34 +0000 (18:26 -0700)]
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>
Josh Durgin [Sat, 24 Sep 2011 00:02:29 +0000 (17:02 -0700)]
rbd.py: remove useless version object
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Fri, 23 Sep 2011 01:26:16 +0000 (18:26 -0700)]
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>
Josh Durgin [Thu, 22 Sep 2011 23:06:57 +0000 (16:06 -0700)]
rbd.py: explicitly cast strings to c_char_p for type clarity
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Thu, 22 Sep 2011 21:51:43 +0000 (14:51 -0700)]
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>
Josh Durgin [Thu, 22 Sep 2011 00:56:40 +0000 (17:56 -0700)]
rados.py: make exceptions inherit from a base class
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Wed, 21 Sep 2011 22:50:30 +0000 (15:50 -0700)]
rados.py: allow configuring rados through constructor options
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Wed, 21 Sep 2011 22:44:16 +0000 (15:44 -0700)]
rbd.py: make Image a context manager
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Wed, 21 Sep 2011 22:44:04 +0000 (15:44 -0700)]
rados.py: make Rados and Ioctx objects context managers
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Josh Durgin [Wed, 21 Sep 2011 22:43:36 +0000 (15:43 -0700)]
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>