]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agorgw: more sane defaults
Sage Weil [Tue, 4 Oct 2011 22:56:35 +0000 (15:56 -0700)]
rgw: more sane defaults

Notably, this gives us log_to_stderr = 1.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocommon: CINIT_FLAG_NO_BANNER
Sage Weil [Tue, 4 Oct 2011 22:59:08 +0000 (15:59 -0700)]
common: CINIT_FLAG_NO_BANNER

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: rgw_log -> debug_rgw
Sage Weil [Tue, 4 Oct 2011 22:40:10 +0000 (15:40 -0700)]
rgw: rgw_log -> debug_rgw

Normalize with the rest of the code base.

Also, 'rgw log' might be confused with 'log file'.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: remove useless RGWConf::log_level
Sage Weil [Tue, 4 Oct 2011 22:36:15 +0000 (15:36 -0700)]
rgw: remove useless RGWConf::log_level

Not used for anything.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: set dout condvar to rgw_log
Sage Weil [Tue, 4 Oct 2011 22:36:01 +0000 (15:36 -0700)]
rgw: set dout condvar to rgw_log

We would normally set DOUT_SUBSYS and get debug_$foo, but the setting in
this case is rgw_log.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: RGW_LOG -> dout
Sage Weil [Tue, 4 Oct 2011 21:59:44 +0000 (14:59 -0700)]
rgw: RGW_LOG -> dout

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorados-api/test: don't srand(time())
Sage Weil [Tue, 4 Oct 2011 21:08:16 +0000 (14:08 -0700)]
rados-api/test: don't srand(time())

This will give duplicate results if called more than once per second, which
leads to things like -EEXIST (#1558).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: make MPoolOp*::print() readable
Sage Weil [Tue, 4 Oct 2011 21:07:30 +0000 (14:07 -0700)]
mon: make MPoolOp*::print() readable

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge branch 'wip-oldmaps'
Sage Weil [Tue, 4 Oct 2011 20:46:52 +0000 (13:46 -0700)]
Merge branch 'wip-oldmaps'

13 years agoradosgw: run as 'user' field in ceph.conf
Sage Weil [Mon, 3 Oct 2011 22:13:31 +0000 (15:13 -0700)]
radosgw: run as 'user' field in ceph.conf

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: set xmlns on ListBucketResult element
Henry C Chang [Mon, 3 Oct 2011 20:23:31 +0000 (13:23 -0700)]
rgw: set xmlns on ListBucketResult element

Certain S3 clients (e.g., s3fs) require the xmlns to parse the
results correctly.

Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
13 years agoosd: get latest osdmaps before booting
Sage Weil [Tue, 4 Oct 2011 20:33:17 +0000 (13:33 -0700)]
osd: get latest osdmaps before booting

- get the latest osdmaps before adding/marking ourselves up
- behave if there is a discontinuity in the osdmap history

This lets us behave sanely if an osd has been down for a very long time,
or if we replace (wipe) an osd, or otherwise take a fresh new osd and add
it to an aged cluster (with lots of old maps or, more likely, an oldest
map that has a large epoch).

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: include addrs in json dump
Sage Weil [Tue, 4 Oct 2011 20:20:55 +0000 (13:20 -0700)]
osdmap: include addrs in json dump

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: show weight for out osds
Sage Weil [Tue, 4 Oct 2011 20:19:50 +0000 (13:19 -0700)]
osdmap: show weight for out osds

This info is reduncant (weight is 0 for out osds), but makes the output
cleaner.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: show old addrs for down osds
Sage Weil [Tue, 4 Oct 2011 20:18:39 +0000 (13:18 -0700)]
osdmap: show old addrs for down osds

This is useful for admins to find which ip/node to connect to.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: limit maps send on onetime osdmap subscribe
Sage Weil [Tue, 4 Oct 2011 20:43:29 +0000 (13:43 -0700)]
mon: limit maps send on onetime osdmap subscribe

This throttles the load put on the monitor by making the client request
osdmaps in discrete chunks.  Use a feature bit to control this, since the
old kernel clients will only send a single onetime request if they think
they are behind.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: include oldest, newest known epoch in message
Sage Weil [Tue, 4 Oct 2011 20:43:25 +0000 (13:43 -0700)]
osdmap: include oldest, newest known epoch in message

If non-zero, these are filled in with the oldest and newest map epochs
available.  This helps the client decide whether to ask for newer or older
maps.

Some minor refactoring in the monitor.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: use pointers for handle_advance_map
Sage Weil [Tue, 4 Oct 2011 19:42:32 +0000 (12:42 -0700)]
osd: use pointers for handle_advance_map

So that lastmap can be optional.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoobjecter: fix locking on is_latest_map checks
Sage Weil [Mon, 3 Oct 2011 22:37:23 +0000 (15:37 -0700)]
objecter: fix locking on is_latest_map checks

We need to take the lock protecting these structures in the completion
context.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomonclient: use an async finisher
Sage Weil [Mon, 3 Oct 2011 22:36:56 +0000 (15:36 -0700)]
monclient: use an async finisher

Otherwise we can deadlock if any completions call back into MonClient.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomonclient: clean up old version_requests on session reset
Sage Weil [Mon, 3 Oct 2011 22:29:16 +0000 (15:29 -0700)]
monclient: clean up old version_requests on session reset

This throws out the old contexts.  We assume that the caller will not wait
for them.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomonclient: implement get_version() to get newest _and_ oldest map versions
Sage Weil [Mon, 3 Oct 2011 22:26:39 +0000 (15:26 -0700)]
monclient: implement get_version() to get newest _and_ oldest map versions

Reimplement is_latest_map() in terms of more general helper.  Add field
to reply message.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: is_active() instead of !is_booting() for map sharing checks
Sage Weil [Mon, 3 Oct 2011 20:34:34 +0000 (13:34 -0700)]
osd: is_active() instead of !is_booting() for map sharing checks

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: do not request osdmap when loner if not booted
Sage Weil [Tue, 4 Oct 2011 20:36:05 +0000 (13:36 -0700)]
osd: do not request osdmap when loner if not booted

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: trim old osdmaps
Sage Weil [Tue, 4 Oct 2011 20:34:59 +0000 (13:34 -0700)]
mon: trim old osdmaps

Trakc the oldest clean pg, and trim osdmaps that are older than that.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: add last_epoch_clean to pg_stat_t
Sage Weil [Mon, 26 Sep 2011 22:19:18 +0000 (15:19 -0700)]
osd: add last_epoch_clean to pg_stat_t

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: implicitly mark lost_at when a fresh osd rejoins the cluster
Sage Weil [Mon, 26 Sep 2011 22:00:22 +0000 (15:00 -0700)]
mon: implicitly mark lost_at when a fresh osd rejoins the cluster

If an osd is wiped an rejoins the cluster, record that by implicitly
setting lost_at.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoradosgw: run as 'user' field in ceph.conf
Sage Weil [Mon, 3 Oct 2011 22:13:31 +0000 (15:13 -0700)]
radosgw: run as 'user' field in ceph.conf

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoradosgw-admin: make 'log list' behave when .log pool dne
Sage Weil [Mon, 3 Oct 2011 23:26:43 +0000 (16:26 -0700)]
radosgw-admin: make 'log list' behave when .log pool dne

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agodebian: don't recommend gceph
Sage Weil [Tue, 4 Oct 2011 03:03:25 +0000 (20:03 -0700)]
debian: don't recommend gceph

Not until it's worth installing.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge branch 'stable'
Sage Weil [Mon, 3 Oct 2011 22:23:28 +0000 (15:23 -0700)]
Merge branch 'stable'

13 years agoradosgw: make stop succeed when not running
Sage Weil [Mon, 3 Oct 2011 22:23:15 +0000 (15:23 -0700)]
radosgw: make stop succeed when not running

This fixes apt-get errors like

No /usr/bin/radosgw found running; none killed.
invoke-rc.d: initscript radosgw, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoradosgw: fix init-radosgw provides
Sage Weil [Mon, 3 Oct 2011 22:02:24 +0000 (15:02 -0700)]
radosgw: fix init-radosgw provides

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: set xmlns on ListBucketResult element
Henry C Chang [Mon, 3 Oct 2011 20:23:31 +0000 (13:23 -0700)]
rgw: set xmlns on ListBucketResult element

Certain S3 clients (e.g., s3fs) require the xmlns to parse the
results correctly.

Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
13 years agodebian: add non-stripped exception for libcls_rgw rados class
Sage Weil [Mon, 3 Oct 2011 20:18:42 +0000 (13:18 -0700)]
debian: add non-stripped exception for libcls_rgw rados class

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMakefile: more radosgw_admin -> radosgw-admin
Sage Weil [Mon, 3 Oct 2011 18:49:43 +0000 (11:49 -0700)]
Makefile: more radosgw_admin -> radosgw-admin

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomds: fix possible deadlock in multi-mds setup
Brandon Seibel [Mon, 3 Oct 2011 18:45:17 +0000 (11:45 -0700)]
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>
13 years agoworkunit: clean up temporary files
Josh Durgin [Mon, 3 Oct 2011 19:14:59 +0000 (12:14 -0700)]
workunit: clean up temporary files

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoReplicatedPG: reset return code after find_object_context
Josh Durgin [Mon, 3 Oct 2011 17:27:19 +0000 (10:27 -0700)]
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>
13 years agomore radosgw_admin -> radosgw-admin
Sage Weil [Mon, 3 Oct 2011 18:25:44 +0000 (11:25 -0700)]
more radosgw_admin -> radosgw-admin

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: trim ondisk log using Log::Entry::offset
Sage Weil [Mon, 3 Oct 2011 18:19:09 +0000 (11:19 -0700)]
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>
13 years agoosd: combine log_op into append_log
Sage Weil [Mon, 3 Oct 2011 17:59:15 +0000 (10:59 -0700)]
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>
13 years agomds: make jouranl writeable in MDLog::append()
Sage Weil [Fri, 30 Sep 2011 22:44:06 +0000 (15:44 -0700)]
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>
13 years agomdcache: tolerate no subtrees in create_subtree_map()
Sage Weil [Fri, 30 Sep 2011 22:41:50 +0000 (15:41 -0700)]
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>
13 years agoMerge remote branch 'gh/stable'
Sage Weil [Mon, 3 Oct 2011 16:45:14 +0000 (09:45 -0700)]
Merge remote branch 'gh/stable'

13 years agoceph.spec.in still packages libceph.so in 0.36
Alexandre Oliva [Sat, 1 Oct 2011 21:14:04 +0000 (18:14 -0300)]
ceph.spec.in still packages libceph.so in 0.36

Package libcephfs.so instead of libceph.so.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13 years agov0.36 v0.36
Sage Weil [Fri, 30 Sep 2011 16:29:47 +0000 (09:29 -0700)]
v0.36

13 years agoMerge branch 'wip-pool-sharing'
Sage Weil [Fri, 30 Sep 2011 21:42:27 +0000 (14:42 -0700)]
Merge branch 'wip-pool-sharing'

13 years agodoc: add documentation for librbd python bindings
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>
13 years agorbd.py: add class and method documentation
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>
13 years agorbd.py: use a dict to translate error codes
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>
13 years agorbd.py: allow setting an image to no snapshot
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>
13 years agorbd.py: turn EROFS into an exception
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>
13 years agorgw: don't remove on-disk bucket object in rgw_user::rgw_remove_bucket
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>
13 years agorgw: revert part of commit:30b814e2677659ddda4109a1421f33a47d83a05b
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>
13 years agorgw: don't remove bucket object twice
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>
13 years agorgw: fix bucket-id assignment
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>
13 years agorgw: separate bucket vs object owner tracking
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>
13 years agoradosgw-admin: fix acl vs content-length check
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>
13 years agoradosgw-admin: rename clitest dir
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>
13 years agoMerge branch 'wip-pool-sharing' of github.com:NewDreamNetwork/ceph into wip-pool...
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

13 years agoradosgw-admin: fix help clitest
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>
13 years agorgw: set log entry owner to user if s->acl is not set
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>
13 years agorgw: simplify bucket info storage
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>
13 years agoradosgw-admin: pull 'log show' owner+bucket from first entry
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>
13 years agorgw: fix RGWBucketInfo encoding of owner
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>
13 years agoradosgw: fix log retry after bucket creation
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>
13 years agorgw: store bucket information in the .rgw pool instead of .buckets
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>
13 years agoradosgw_admin: we do want to set markers on these buckets
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>
13 years agoCond.h: adjust nlock during waits
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>
13 years agoReplicatedPG: dump_watchers in do_osd_op_effects
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>
13 years agolibrados: Make notify a linger op
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>
13 years agotest_async_snap: loop a finite number of times.
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>
13 years agoqa: btrfs: test_async_snap
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>
13 years agoradosgw-admin: 'log list' and 'log rm'
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>
13 years agoradosgw-admin: dump ints, not strings
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>
13 years agoradosgw-admin: fix bucket stats
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>
13 years agorgw: protect the id-based accesses from namespace collisions
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>
13 years agorgw: remove get_bucket_info and convert users.
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>
13 years agoradosgw-admin: fix 'bucket stats --uid='
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>
13 years agoradosgw-admin: include 'suspended' in user info output
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>
13 years agoradosgw-admin: clean up some cout usage
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>
13 years agoradosgw-admin: use formatter for 'bucket list'
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>
13 years agoradosgw-admin: 'bucket stats --uid'
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>
13 years agoradosgw-admin: clean up 'bucket list' output
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>
13 years agorgw_admin: rip out format.empty() special cases
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

13 years agorgw_admin: fix --pretty-format and --purge-data flag parsing
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

13 years agorgw_admin: default to json output
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>
13 years agoradosgw-admin: use formatter for 'bucket list'
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>
13 years agordosgw_admin -> radosgw-admin
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>
13 years agorgw: remove now-unused struct RGWPoolInfo
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>
13 years agoceph: make -o - the default
Sage Weil [Wed, 28 Sep 2011 20:57:44 +0000 (13:57 -0700)]
ceph: make -o - the default

Finally.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph: make --concise hide 'N byte written' message
Sage Weil [Wed, 28 Sep 2011 20:54:37 +0000 (13:54 -0700)]
ceph: make --concise hide 'N byte written' message

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorgw: remove rgw_[retrieve|store]_pool_info and ".pool" pool
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>
13 years agoosd: fix leak of src_obc references
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>
13 years agolibrbd: fix end_block calculation for read_iterate
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>
13 years agolibrbd: don't zero negative lengths
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>
13 years agorgw: remove references to pool_id and replace with new bucket_id.
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>
13 years agoUse LIBEDIT_LIBS in Makefile.am
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>
13 years agoMerge branch 'wip-dotnames'
Sage Weil [Wed, 28 Sep 2011 04:47:03 +0000 (21:47 -0700)]
Merge branch 'wip-dotnames'