]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agopaxos: fix race between active and commit
Sage Weil [Tue, 8 Nov 2011 21:09:13 +0000 (13:09 -0800)]
paxos: fix race between active and commit

If paxos reproposes an old learned value, we have a C_Active waiter, and
also a commit in progress.

When we reach quorum, paxos goes active, and _active() creates a new
pending.  A bit later, the _commit callback goes, and we already have that
pending value ready.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: add 'quorum_status' command
Sage Weil [Tue, 8 Nov 2011 20:56:20 +0000 (12:56 -0800)]
mon: add 'quorum_status' command

Show status of the current quorum.  Block until there is one.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: do not participate in the election unless we are in electing state
Sage Weil [Tue, 8 Nov 2011 20:52:51 +0000 (12:52 -0800)]
mon: do not participate in the election unless we are in electing state

If we participate, we may be included in the quorum, even tho we are
probing, slurping, whatever.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: 'mon_status' command to dump individual mon state
Sage Weil [Tue, 8 Nov 2011 18:42:20 +0000 (10:42 -0800)]
mon: 'mon_status' command to dump individual mon state

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: add probe+slurp timeouts
Sage Weil [Tue, 8 Nov 2011 17:58:12 +0000 (09:58 -0800)]
mon: add probe+slurp timeouts

A short timeout on probe, so we can form new quorums quickly.

A longer timeout on slurp, so we will tolerate a slow response sucking
data off a loaded monitor.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: slurp latest state from active monitors before joining quorum
Sage Weil [Tue, 8 Nov 2011 06:46:09 +0000 (22:46 -0800)]
mon: slurp latest state from active monitors before joining quorum

If a monitor has been down and is behind, and joins the quorum, the
other nodes will try to send it all of the needed state, which can
bring the cluster to a halt.

Instead, implement a new bootstrap() procedure:

 - probe the cluster nodes
 - if there is an existing quorum,
   - and it is not too far ahead of me, join it (call an election)
   - otherwise, slurp down all the newer state and then restart (bootstrap)
 - if we see enough online nodes that are not part of the quorum, call
   an election.

We still need to add some timeouts.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: fix osdmap trim
Sage Weil [Tue, 8 Nov 2011 06:40:39 +0000 (22:40 -0800)]
mon: fix osdmap trim

We can raise the floor even when min_last_epoch_clean if very close to
the current version, as long as it is still above the oldest.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agopaxos: last_consumed == latest_stashed; behave accordingly
Sage Weil [Tue, 8 Nov 2011 06:09:56 +0000 (22:09 -0800)]
paxos: last_consumed == latest_stashed; behave accordingly

Initialize on startup.
Don't re-read off of disk on every trim_to() call.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomonmap: simplify constructor
Sage Weil [Tue, 8 Nov 2011 04:52:50 +0000 (20:52 -0800)]
monmap: simplify constructor

Explicitly set created, last_changed where appropriate.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomon: revamp monitor states
Sage Weil [Wed, 2 Nov 2011 16:07:10 +0000 (09:07 -0700)]
mon: revamp monitor states

starting -> probing, electing
some cleanup

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: rename election_starting -> restart
Sage Weil [Wed, 2 Nov 2011 02:45:17 +0000 (19:45 -0700)]
mon: rename election_starting -> restart

These callbacks reset monitor/paxos/paxosesrvice state, which used to
happen when an election started, but will now not necessarily be
immediately followed by an election.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: don't call out to mon->call_election for internal election restarts
Sage Weil [Wed, 2 Nov 2011 02:32:41 +0000 (19:32 -0700)]
mon: don't call out to mon->call_election for internal election restarts

This lets us drop the is_new kludge.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: fix warning
Sage Weil [Tue, 8 Nov 2011 04:40:18 +0000 (20:40 -0800)]
rgw: fix warning

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorgw: fix accept-range for suffix format, other related issues
Yehuda Sadeh [Tue, 8 Nov 2011 01:07:40 +0000 (17:07 -0800)]
rgw: fix accept-range for suffix format, other related issues

13 years agoTimer.cc: remove global thread variable
Samuel Just [Mon, 7 Nov 2011 23:04:45 +0000 (15:04 -0800)]
Timer.cc: remove global thread variable

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agocommon: return null if mc.init() unsuccessful
Samuel Just [Mon, 7 Nov 2011 23:04:02 +0000 (15:04 -0800)]
common: return null if mc.init() unsuccessful

Prevents ceph.cc from segfaulting on missing keyring.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agorbd: add showmapped to clitests and rst man page
Josh Durgin [Mon, 7 Nov 2011 17:27:55 +0000 (09:27 -0800)]
rbd: add showmapped to clitests and rst man page

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agorbd: Document the rbd showmapped cmd
Stratos Psomadakis [Mon, 7 Nov 2011 09:24:35 +0000 (11:24 +0200)]
rbd: Document the rbd showmapped cmd

Document the rbd showmapped cmd in rbd.usage(), and rbd's man page,
and add it to the bash completion script.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
13 years agorbd.py: fix list when there are no images
Josh Durgin [Mon, 7 Nov 2011 17:08:00 +0000 (09:08 -0800)]
rbd.py: fix list when there are no images

It should return [], not [''].

Reported-by: Eric Chen <Eric_YH_Chen@wistron.com>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoOSD: write_info/log before dropping lock in generate_backlog
Samuel Just [Sat, 5 Nov 2011 00:36:21 +0000 (17:36 -0700)]
OSD: write_info/log before dropping lock in generate_backlog

Bug #1530

This should fix the following race:
1) osd->generate_backlog does pg->assemble_backlog
2) osd->generate_backlog drops the pg lock to grab the osd_map read lock
3) ...which is held by osd->handle_osd_map
4) at the end of osd->handle_osd_map, we call write_info on the pg since
it has progressed to a new peering interval
5) osd->generate_backlog gets the read_lock and the pg lock and promptly
bails since the backlog generation has been cancelled
6) osd dies, but not before the write_info transaction is durable

The result of this is that the in-memory backlog generated in
assemble_backlog doesn't make it to disk, but the updated info does
resulting in an ondisklog inconsistent with the pg info on osd
restart.

This should prevent the info from being written without the log.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoFileJournal: stop using sync_file_range
Christoph Hellwig [Thu, 3 Nov 2011 21:45:08 +0000 (17:45 -0400)]
FileJournal: stop using sync_file_range

Using sync_file_range means that neither any required metadata gets commited,
nor the disk cache gets flushed.  Stop using it for the journal, and add
a comment on why a fsync_range system call would be helpful here.

Btw, why does the code use O_SYNC (and not even O_DSYNC!) if using direct
I/O, but fdatasync/fsync for buffered I/O?  Avoiding cache flushes and
metadata updates for every writes is just as important for direct I/O
as it is for buffered I/O.

Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agomonclient: simplify auth_supported set
Sage Weil [Wed, 2 Nov 2011 18:06:59 +0000 (11:06 -0700)]
monclient: simplify auth_supported set

Use AuthSupported class instead of repopulating it ourselves.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMakefile: use static add for test_libcephfs_readdir.
Greg Farnum [Sat, 5 Nov 2011 00:19:34 +0000 (17:19 -0700)]
Makefile: use static add for test_libcephfs_readdir.

Otherwise it doesn't seem to play nicely with teuthology/sepia
due to requiring the host to have gtest installed.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoRadosModel: add DeleteOp to test object deletions
Samuel Just [Fri, 4 Nov 2011 21:55:36 +0000 (14:55 -0700)]
RadosModel: add DeleteOp to test object deletions

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agorgw: fix tmp objects leakage
Yehuda Sadeh [Fri, 4 Nov 2011 20:40:07 +0000 (13:40 -0700)]
rgw: fix tmp objects leakage

13 years agorgw: don't purge pools in any case
Yehuda Sadeh [Fri, 4 Nov 2011 20:11:19 +0000 (13:11 -0700)]
rgw: don't purge pools in any case

13 years agorgw: list system buckets through rados api
Yehuda Sadeh [Fri, 4 Nov 2011 18:41:43 +0000 (11:41 -0700)]
rgw: list system buckets through rados api

13 years agorbd: document --order and list required args where they're necessary
Josh Durgin [Thu, 3 Nov 2011 22:45:43 +0000 (15:45 -0700)]
rbd: document --order and list required args where they're necessary

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agorgw: fix PUT without content length (non chunked)
Yehuda Sadeh [Thu, 3 Nov 2011 23:00:37 +0000 (16:00 -0700)]
rgw: fix PUT without content length (non chunked)

13 years agoMerge remote branch 'nwatkins/for-master'
Greg Farnum [Thu, 3 Nov 2011 21:43:50 +0000 (14:43 -0700)]
Merge remote branch 'nwatkins/for-master'

13 years agoMerge branch 'wip-getdir'
Greg Farnum [Thu, 3 Nov 2011 21:11:21 +0000 (14:11 -0700)]
Merge branch 'wip-getdir'

13 years agogitignore: just ignore all test_ files
Greg Farnum [Thu, 3 Nov 2011 20:59:25 +0000 (13:59 -0700)]
gitignore: just ignore all test_ files

We don't want to add a new ignore for each test!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoqa: workunit to run test_libcephfs_readder
Greg Farnum [Thu, 3 Nov 2011 20:55:53 +0000 (13:55 -0700)]
qa: workunit to run test_libcephfs_readder

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agotest: write a test to try and check on Client::readdir_r_cb.
Greg Farnum [Thu, 3 Nov 2011 20:49:56 +0000 (13:49 -0700)]
test: write a test to try and check on Client::readdir_r_cb.

It's made difficult by having to go through libcephfs, but it's better
than nothing and should catch most of the errors which were detected
while using it in Hadoop.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agorgw: fix null deref, cleanups
Yehuda Sadeh [Thu, 3 Nov 2011 18:45:44 +0000 (11:45 -0700)]
rgw: fix null deref, cleanups

13 years agorgw: add support for chunked upload
Yehuda Sadeh [Thu, 3 Nov 2011 18:24:57 +0000 (11:24 -0700)]
rgw: add support for chunked upload

13 years agorgw: fix crash when accessing swift auth without user
Yehuda Sadeh [Wed, 2 Nov 2011 19:40:51 +0000 (12:40 -0700)]
rgw: fix crash when accessing swift auth without user

13 years agohadoop: remove unused fs_default_name
Noah Watkins [Wed, 2 Nov 2011 22:49:09 +0000 (15:49 -0700)]
hadoop: remove unused fs_default_name

The variable fs_default_name is effectively unused
and the same affect is achieved by treating paths
in a standard way (they contain the scheme:/).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: FileSystem.rename should not return FileNotFound
Noah Watkins [Wed, 2 Nov 2011 22:25:31 +0000 (15:25 -0700)]
hadoop: FileSystem.rename should not return FileNotFound

This fixes several unit test failure cases.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: ENOTDIR should be negative
Noah Watkins [Wed, 2 Nov 2011 22:24:54 +0000 (15:24 -0700)]
hadoop: ENOTDIR should be negative

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: fix unit test: testWorkingDirectory
Noah Watkins [Wed, 2 Nov 2011 20:43:37 +0000 (13:43 -0700)]
hadoop: fix unit test: testWorkingDirectory

The working directory should be set in initialize() and
is expected by the unit tests to be fully qualified (i.e.
with ceph://...).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: remove deprecation warning
Noah Watkins [Wed, 2 Nov 2011 19:28:03 +0000 (12:28 -0700)]
hadoop: remove deprecation warning

The routine cannot be fully removed yet because it
still exists as an abstract function in FileSystem class.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: remove deprecated isDirectory()
Noah Watkins [Wed, 2 Nov 2011 19:25:15 +0000 (12:25 -0700)]
hadoop: remove deprecated isDirectory()

Uses the suggested getFileStatus() method for
replacing the deprecated isDirectory(). This is
only marginally slower as get_replication is called
to fill in the FileStatus. If performance ever became
an issue for the paths that use isDirectory() then
getFileStatus can be made faster by pushing more down
into JNI.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: remove statistics initialization
Noah Watkins [Wed, 2 Nov 2011 19:04:52 +0000 (12:04 -0700)]
hadoop: remove statistics initialization

This is already handled by super.initialize()

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: remove unused variable
Noah Watkins [Wed, 2 Nov 2011 19:01:15 +0000 (12:01 -0700)]
hadoop: remove unused variable

Remove CephFileSystem.debug as log4j is now
used for debug level control.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: remove initialization check
Noah Watkins [Wed, 2 Nov 2011 18:58:43 +0000 (11:58 -0700)]
hadoop: remove initialization check

The initialization check is removed because
it is part of Hadoop's treatment of file systems
that initialize() is called prior to any other
file system routines. This makes the code cleaner
but in the future verison of libcephfs-java, internal
initialization checks should still be made.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: simplify workingDir handling; add home directory
Noah Watkins [Wed, 2 Nov 2011 04:52:48 +0000 (21:52 -0700)]
hadoop: simplify workingDir handling; add home directory

1. Simplifies the handling of paths by allowing them to be passed
around and manipulated in their fully qualified form. Before
paths are passed into native Ceph calls the path-only portion
is extracted.

2. Sets the initial working directory to be the default home
directory for a user (e.g. /user/<username>/).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: emulate Ceph file owner as current user
Noah Watkins [Wed, 2 Nov 2011 00:25:49 +0000 (17:25 -0700)]
hadoop: emulate Ceph file owner as current user

Make CephFileSystem tell Hadoop that the owner
of all files is the current user. This provides
zero security or isolation, but allows Hadoop
to be used with its default security settings.

A future solution will need to be developed that
provides some isolation, and gives a better user
experience.

This fixes tracker issue #1663

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agohadoop: use standard log4j logging facility
Noah Watkins [Tue, 1 Nov 2011 23:35:12 +0000 (16:35 -0700)]
hadoop: use standard log4j logging facility

Replace ceph.debug(msg, level) with LOG.level(msg)
provided by the log4j facility used by Hadoop. The
level can now be provided on a class-by-class basis
by modifying conf/log4j.properties.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
13 years agoPG: mark scrubmap entry as not absent when we see an update
Samuel Just [Wed, 2 Nov 2011 18:50:29 +0000 (11:50 -0700)]
PG: mark scrubmap entry as not absent when we see an update

Previously, there would be an assert failure in _scan_list if we see an
object deleted and then recreated.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoMerge branch 'wip-freebsd'
Sage Weil [Wed, 2 Nov 2011 15:45:36 +0000 (08:45 -0700)]
Merge branch 'wip-freebsd'

Conflicts:
src/osd/OSD.cc

13 years agodebian: empty dependency_libs in *.la files
Laszlo Boszormenyi [Tue, 1 Nov 2011 19:57:11 +0000 (12:57 -0700)]
debian: empty dependency_libs in *.la files

Per policy and multiarch support.

Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
13 years agoadd missingok to logrotate
Laszlo Boszormenyi [Tue, 1 Nov 2011 19:56:34 +0000 (12:56 -0700)]
add missingok to logrotate

When ceph is not running, it has no logs. Thus logrotate has nothing to
rotate. The missingok directive handles this situation.

Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
13 years agodebian: update VCS sources
Laszlo Boszormenyi [Tue, 1 Nov 2011 19:55:47 +0000 (12:55 -0700)]
debian: update VCS sources

Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
13 years agodebian: fix libceph1 -> libcephfs1 rename
Laszlo Boszormenyi [Tue, 1 Nov 2011 19:55:17 +0000 (12:55 -0700)]
debian: fix libceph1 -> libcephfs1 rename

Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
13 years agodebian: add watch
Laszlo Boszormenyi [Tue, 1 Nov 2011 19:54:27 +0000 (12:54 -0700)]
debian: add watch

Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
13 years agoosdmaptool: test --create-with-conf with racks
Sage Weil [Wed, 2 Nov 2011 04:20:56 +0000 (21:20 -0700)]
osdmaptool: test --create-with-conf with racks

Make sure we generate a map that will map (and not assert about bad
max_osd/max_device mismatch).

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: assert that osdmap max_osds >= crushmap max_devices
Sage Weil [Wed, 2 Nov 2011 04:14:19 +0000 (21:14 -0700)]
osdmap: assert that osdmap max_osds >= crushmap max_devices

This will catch potential array overruns before they happen.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosdmap: fix off-by-one in build_simple_from_conf
Sage Weil [Wed, 2 Nov 2011 04:11:11 +0000 (21:11 -0700)]
osdmap: fix off-by-one in build_simple_from_conf

maxosd is the highest osd id.  set_max_osd(that + 1), since that is
setting the array size.  This fixes references off the end of that
array.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: fix assert include
Sage Weil [Wed, 2 Nov 2011 03:04:25 +0000 (20:04 -0700)]
osd: fix assert include

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: swift prefix and path params fixes
Yehuda Sadeh [Tue, 1 Nov 2011 23:01:25 +0000 (16:01 -0700)]
rgw: swift prefix and path params fixes

13 years ago.gitignore: test_str_list
Sage Weil [Tue, 1 Nov 2011 20:12:21 +0000 (13:12 -0700)]
.gitignore: test_str_list

13 years agoMakefile: include/compat.h in tarball
Sage Weil [Tue, 1 Nov 2011 20:10:15 +0000 (13:10 -0700)]
Makefile: include/compat.h in tarball

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'master' into wip-freebsd
Sage Weil [Tue, 1 Nov 2011 19:35:47 +0000 (12:35 -0700)]
Merge branch 'master' into wip-freebsd

13 years agoMerge remote-tracking branch 'gh/wip-auth'
Sage Weil [Tue, 1 Nov 2011 18:49:36 +0000 (11:49 -0700)]
Merge remote-tracking branch 'gh/wip-auth'

13 years agocommon: get_str_list unit tests
Sage Weil [Tue, 1 Nov 2011 18:42:45 +0000 (11:42 -0700)]
common: get_str_list unit tests

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocommon: make get_str_list work with other delimiters, and skip the
Sage Weil [Tue, 1 Nov 2011 18:42:25 +0000 (11:42 -0700)]
common: make get_str_list work with other delimiters, and skip the

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomonclient: fix else formatting
Josh Durgin [Tue, 1 Nov 2011 17:43:50 +0000 (10:43 -0700)]
monclient: fix else formatting

If one branch has braces, the other should too.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agomonclient: fail fast when our auth protocols aren't supported
Josh Durgin [Tue, 1 Nov 2011 17:40:41 +0000 (10:40 -0700)]
monclient: fail fast when our auth protocols aren't supported

This handles the case where the server does not support any of the
authentication protocols that the client does. Previously this error
would never be propagated, and you'd only know something went wrong
when the optional timeout expired. Now, monclient->authenticate()
fails as soon as it gets the first response from the monitor.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoPG: set_last_peering_reset in Reset constructor
Samuel Just [Tue, 1 Nov 2011 18:16:53 +0000 (11:16 -0700)]
PG: set_last_peering_reset in Reset constructor

If an osd in the prior set comes up, we can restart peering without a
new peering interval starting.  However, we still want to ignore
anything we previously requested from replicas.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agomonclient: fix else formatting
Josh Durgin [Tue, 1 Nov 2011 17:43:50 +0000 (10:43 -0700)]
monclient: fix else formatting

If one branch has braces, the other should too.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agomonclient: fail fast when our auth protocols aren't supported
Josh Durgin [Tue, 1 Nov 2011 17:40:41 +0000 (10:40 -0700)]
monclient: fail fast when our auth protocols aren't supported

This handles the case where the server does not support any of the
authentication protocols that the client does. Previously this error
would never be propagated, and you'd only know something went wrong
when the optional timeout expired. Now, monclient->authenticate()
fails as soon as it gets the first response from the monitor.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoosd: kill unused on_osd_failure() hook
Sage Weil [Mon, 31 Oct 2011 22:03:29 +0000 (15:03 -0700)]
osd: kill unused on_osd_failure() hook

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoRadosModel.h: use default conf location
Samuel Just [Mon, 31 Oct 2011 22:00:43 +0000 (15:00 -0700)]
RadosModel.h: use default conf location

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoRevert "PG: call set_last_peering_reset in Started contructor"
Samuel Just [Mon, 31 Oct 2011 20:56:32 +0000 (13:56 -0700)]
Revert "PG: call set_last_peering_reset in Started contructor"

Unfortunately, the Started constructor doesn't occur until map
activation.  We need to reset last_peering_reset exactly when the acting
set changes.

This reverts commit 6d123067ce1ba99522281d5c72623bd5ba3e0fc8.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agohadoop: Return NULL when the path does not exist.
Noah Watkins [Mon, 31 Oct 2011 18:15:26 +0000 (11:15 -0700)]
hadoop: Return NULL when the path does not exist.

Although unspecified in the declaration header, other file
systems return a single result when the path is a file.

This fixes tracker issue #1661

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosdmap: fix g_ceph_context reference
Sage Weil [Sun, 30 Oct 2011 00:42:17 +0000 (17:42 -0700)]
osdmap: fix g_ceph_context reference

Use cct.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoReplicatedPG: check for peering restart before share_pg_info
Samuel Just [Fri, 28 Oct 2011 22:34:27 +0000 (15:34 -0700)]
ReplicatedPG: check for peering restart before share_pg_info

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agomkcephfs: build initial osdmap from information in ceph.conf
Sage Weil [Fri, 28 Oct 2011 21:33:38 +0000 (14:33 -0700)]
mkcephfs: build initial osdmap from information in ceph.conf

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosdmaptool: build initial map from ceph.conf
Sage Weil [Fri, 28 Oct 2011 21:32:30 +0000 (14:32 -0700)]
osdmaptool: build initial map from ceph.conf

This builds the intial osd and crush maps from what is in the ceph.conf,
taking advantage of host or rack tags that are present there.

If there are >1 hosts, separate replica across hosts.  If there are >2
racks, separate across racks.  Semi arbitrary, but should capture most
use cases.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocrush: make insert_item take float for weight
Sage Weil [Fri, 28 Oct 2011 20:59:25 +0000 (13:59 -0700)]
crush: make insert_item take float for weight

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoReplicatedPG: Clean up old snap links when recovering a clone
Samuel Just [Fri, 28 Oct 2011 21:18:57 +0000 (14:18 -0700)]
ReplicatedPG: Clean up old snap links when recovering a clone

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoPG: Create new snap directories independently on replica
Samuel Just [Fri, 28 Oct 2011 21:18:12 +0000 (14:18 -0700)]
PG: Create new snap directories independently on replica

Previously, we shipped over the collection creation as part
of the transaction.  However, the snap directory on the
replica might or might not exist already due to recovery
progress.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
13 years agorgw: canonical resource should use unencoded url
Yehuda Sadeh [Fri, 28 Oct 2011 21:03:38 +0000 (14:03 -0700)]
rgw: canonical resource should use unencoded url

13 years agoMerge pull request #4 from vzctl/master
Sage Weil [Fri, 28 Oct 2011 20:00:42 +0000 (13:00 -0700)]
Merge pull request #4 from vzctl/master

fix error: 'snprintf' was not declared in this scope

13 years agorgw: cleanup, remove unused user_id
Yehuda Sadeh [Fri, 28 Oct 2011 18:48:38 +0000 (11:48 -0700)]
rgw: cleanup, remove unused user_id

Some access methods required user_id param, but that was never really used. At
this point we should just remove them.

13 years agomkcephfs: skip non-btrfs osds even with --mkbtrfs
Sage Weil [Fri, 28 Oct 2011 18:42:04 +0000 (11:42 -0700)]
mkcephfs: skip non-btrfs osds even with --mkbtrfs

This lets you do a mixed btrfs and non-btrfs file systems.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'stable'
Sage Weil [Fri, 28 Oct 2011 17:39:15 +0000 (10:39 -0700)]
Merge branch 'stable'

13 years agodebian: break redundant dependencies
Sage Weil [Fri, 28 Oct 2011 17:38:51 +0000 (10:38 -0700)]
debian: break redundant dependencies

They confuse APT it seems.

 ceph-common -> librbd1 -> librados2
 radosgw -> ceph-common -> librados2

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMOSDMap: do not leave {oldest,newest}_map uninitialized when decoding old messages
Sage Weil [Fri, 28 Oct 2011 17:05:20 +0000 (10:05 -0700)]
MOSDMap: do not leave {oldest,newest}_map uninitialized when decoding old messages

This leads to badness like

  osd_map(295..296 src has 74308224..0) v1

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoinclude stdio in order to fix snprintf compilation error 3/head 4/head
Alexey Lapitsky [Fri, 28 Oct 2011 13:37:09 +0000 (15:37 +0200)]
include stdio in order to fix snprintf compilation error

Signed-off-by: Alexey Lapitsky <lex@realisticgroup.com>
13 years agoclient: fix return value for _readdir_cache_cb
Sage Weil [Fri, 28 Oct 2011 04:04:17 +0000 (21:04 -0700)]
client: fix return value for _readdir_cache_cb

Return 0 for end of directory here, too.

Clarify some comments.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph: fix snprintf warning
Sage Weil [Fri, 28 Oct 2011 03:28:57 +0000 (20:28 -0700)]
ceph: fix snprintf warning

warning: tools/ceph.cc:146: format not a string literal and no format arguments

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoauth: return unknown if no supported auth is found
Josh Durgin [Fri, 28 Oct 2011 01:11:28 +0000 (18:11 -0700)]
auth: return unknown if no supported auth is found

If NONE is supported, it will already be in the list of supported
protocols, so there's no need to default to it here. This prevents
clients that request the NONE protocol from authenticating when the
server only accepts CEPHX. Instead, they get -ENOTSUP from the
AuthMonitor.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agouclient: fix _getdents and add some documentation.
Greg Farnum [Fri, 28 Oct 2011 00:24:49 +0000 (17:24 -0700)]
uclient: fix _getdents and add some documentation.

If readdir_r_cb returns 0, that means SUCCESS, regardless of how
many entries it actually wrote.
If it returns <0, then either:
a) our callback failed to fit some data (returning -1), which is fine
unless we took no entries (so return gr.pos or -ERANGE, depending), or
b) something else failed, so return that error code.
If it returns 0, we succeeded, so return the amount of used buffer.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agouclient: align readdirplus_r with readdir_r.
Greg Farnum [Thu, 27 Oct 2011 23:14:58 +0000 (16:14 -0700)]
uclient: align readdirplus_r with readdir_r.

The only user of this code expects to get 1 on a successfully-filled
value, 0 on a successful non-fill, or -errno otherwise. But the
callback returns -1 to indicate it's already been filled in, which
will happen on every single call to a directory with multiple entries...

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agocfuse: remove unneeded loop.
Greg Farnum [Thu, 27 Oct 2011 23:05:00 +0000 (16:05 -0700)]
cfuse: remove unneeded loop.

The only time this was looping previously was completely unnecessary
anyway, as 1 meant the same thing as 0: there are no more dentries
remaining.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agouclient: readdir_r_cb documentation, and it only returns 0 or -errno.
Greg Farnum [Thu, 27 Oct 2011 23:00:42 +0000 (16:00 -0700)]
uclient: readdir_r_cb documentation, and it only returns 0 or -errno.

Returning 0 or 1 in different situations that were effectively the
same is useless and confusing.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agorgw: swift related adjustments
Yehuda Sadeh [Thu, 27 Oct 2011 21:31:16 +0000 (14:31 -0700)]
rgw: swift related adjustments

13 years agoMerge branch 'master' of github.com:NewDreamNetwork/ceph
Sage Weil [Thu, 27 Oct 2011 21:26:53 +0000 (14:26 -0700)]
Merge branch 'master' of github.com:NewDreamNetwork/ceph