Commit Graph

16608 Commits

Author SHA1 Message Date
Sage Weil
2a078f89d6 Makefile: more radosgw_admin -> radosgw-admin
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-03 13:18:59 -07:00
Brandon Seibel
5d54398cb8 mds: fix possible deadlock in multi-mds setup
This should fix the file_excl case on a file_max update when there
is more than one mds.

If we dont issue caps here its possible when we eval_gather on
the returning lockack that we don't push the lock forward which
will leave the inode auth pinned. If an export occurs that tries
to freeze a tree this inode is in, we'll have a freezing tree
waiting for an auth_pin that can no longer be removed.

Signed-off-by: Brandon Seibel <brandon@seibelnet.ca>
2011-10-03 13:18:59 -07:00
Josh Durgin
b968ff3a0e workunit: clean up temporary files
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-10-03 12:20:25 -07:00
Josh Durgin
12ce321b32 ReplicatedPG: reset return code after find_object_context
This way the object is actually deleted when it has no snapshots,
since the transaction is not aborted. This makes
test_rbd:TestImage.test_rollback_to_snap_sparse pass.

Fixes: #1554
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-10-03 11:13:28 -07:00
Sage Weil
6103ee9e88 more radosgw_admin -> radosgw-admin
Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-03 11:25:44 -07:00
Sage Weil
c5b0e3ee22 osd: trim ondisk log using Log::Entry::offset
The block_map is a waste of memory.  It is simpler just to keep track of
what offset a Log::Entry was read/written/appended to, and trim based on
that.

Motivated by alldown-to-cleanboth.pdf on #1583.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-03 11:19:09 -07:00
Sage Weil
f85dfa7448 osd: combine log_op into append_log
They're both short, and log_op only ends up hiding information that
append_log will soon need (the raw Log::Entry's).

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-03 10:59:15 -07:00
Sage Weil
8111b6190b mds: make jouranl writeable in MDLog::append()
When restarting a stopped MDS, we need to mark the Journaler read/write
before we use it.  Do this in MDLog::append(), when we position the write
pointer at the end of the journal.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-03 09:55:13 -07:00
Sage Weil
f4e61db8fc mdcache: tolerate no subtrees in create_subtree_map()
We don't really need mydir here.  It is normally opened up in the
subsequent call to open_root().  That will be identical on journal replay,
so no need to have it beforehand (and in the ESubtreeMap entry).

Signed-off-by: Sage Weil <sage@newdream.net>
2011-10-03 09:55:13 -07:00
Sage Weil
a827f0400f Merge remote branch 'gh/stable' 2011-10-03 09:45:14 -07:00
Sage Weil
877cacbbdb v0.36 2011-09-30 15:48:28 -07:00
Sage Weil
f5feda05fd Merge branch 'wip-pool-sharing' 2011-09-30 14:42:27 -07:00
Josh Durgin
c00e06f697 doc: add documentation for librbd python bindings
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-30 11:37:15 -07:00
Josh Durgin
683f4dca79 rbd.py: add class and method documentation
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-30 11:37:15 -07:00
Josh Durgin
1c1785da3e rbd.py: use a dict to translate error codes
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-30 11:37:15 -07:00
Josh Durgin
faeecd817b rbd.py: allow setting an image to no snapshot
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-09-30 11:37:15 -07:00
Josh Durgin
da61e1e757 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>
2011-09-30 11:37:15 -07:00
Greg Farnum
b1bed3552c 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>
2011-09-30 10:36:16 -07:00
Greg Farnum
19228d4a1e 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>
2011-09-30 10:36:16 -07:00
Sage Weil
30b814e267 rgw: don't remove bucket object twice
Or else the second attempt will faile with -ENOENT.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-30 10:15:53 -07:00
Sage Weil
b441ecf592 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>
2011-09-30 10:13:35 -07:00
Sage Weil
48558bb623 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>
2011-09-30 09:11:18 -07:00
Sage Weil
cb2d366020 radosgw-admin: fix acl vs content-length check
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-30 09:11:18 -07:00
Sage Weil
b269d3cd50 radosgw-admin: rename clitest dir
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-30 09:11:18 -07:00
Greg Farnum
f9792506f4 Merge branch 'wip-pool-sharing' of github.com:NewDreamNetwork/ceph into wip-pool-sharing
Conflicts:
	src/rgw/rgw_bucket.h
2011-09-29 16:47:08 -07:00
Sage Weil
44d311af8e radosgw-admin: fix help clitest
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-29 16:48:12 -07:00
Sage Weil
a47d7ada5e 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>
2011-09-29 16:36:35 -07:00
Sage Weil
a4e60491ad 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>
2011-09-29 16:35:02 -07:00
Sage Weil
aa7c5c5fd9 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>
2011-09-29 16:33:32 -07:00
Sage Weil
560f90c57f rgw: fix RGWBucketInfo encoding of owner
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-29 16:32:14 -07:00
Sage Weil
4b8d72b3cf 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>
2011-09-29 14:09:17 -07:00
Greg Farnum
444ca65638 rgw: store bucket information in the .rgw pool instead of .buckets
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-09-29 13:46:11 -07:00
Greg Farnum
80ba05e8ef radosgw_admin: we do want to set markers on these buckets
Commit 25499b644b 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>
2011-09-29 13:46:11 -07:00
Samuel Just
79fddd2097 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>
2011-09-29 12:04:34 -07:00
Samuel Just
d38b9a53b1 ReplicatedPG: dump_watchers in do_osd_op_effects
dump_watchers requires the osd watch_lock.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-29 12:04:21 -07:00
Samuel Just
1eb1ce4d36 librados: Make notify a linger op
Notifies must be refreshed when the mapping changes.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-09-29 12:04:21 -07:00
Sage Weil
2269dc255a test_async_snap: loop a finite number of times.
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-29 11:50:01 -07:00
Sage Weil
697e664cc5 qa: btrfs: test_async_snap
Hammer on the btrfs async sync/snap create/remove ioctls.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-29 11:48:00 -07:00
Sage Weil
4be33097ef 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>
2011-09-29 11:23:02 -07:00
Sage Weil
120736ab40 radosgw-admin: dump ints, not strings
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-29 09:18:00 -07:00
Sage Weil
a1942e6113 radosgw-admin: fix bucket stats
- 'usage' object instead of 'categories' array.
- dump ints, not strings.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-29 09:16:54 -07:00
Greg Farnum
fc8588ffcd 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>
2011-09-29 08:39:10 -07:00
Greg Farnum
47e5958f68 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>
2011-09-29 08:38:15 -07:00
Sage Weil
e701177b2d radosgw-admin: fix 'bucket stats --uid='
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-29 08:37:14 -07:00
Sage Weil
814784146e radosgw-admin: include 'suspended' in user info output
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-28 21:38:59 -07:00
Sage Weil
6891761945 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>
2011-09-28 21:38:50 -07:00
Sage Weil
0870764c45 radosgw-admin: use formatter for 'bucket list'
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-28 21:26:17 -07:00
Sage Weil
ab25a4bd9e radosgw-admin: 'bucket stats --uid'
List stats for all buckets on for the given user.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-28 16:09:55 -07:00
Sage Weil
0c75ec05d7 radosgw-admin: clean up 'bucket list' output
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-28 16:09:55 -07:00
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