]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoOSDMap,CrushWrapper: const cleanup on OSDMap
Samuel Just [Tue, 8 Nov 2011 17:45:44 +0000 (09:45 -0800)]
OSDMap,CrushWrapper: const cleanup on OSDMap

The osd's cached maps are not actually modified once cached.  Marking
these methods const (which they should be) allows us to make OSDMapRef
shared_ptr<const OSDMap>.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoosd/: change type of osd::osdmap to a shared_ptr
Samuel Just [Tue, 8 Nov 2011 01:51:21 +0000 (17:51 -0800)]
osd/: change type of osd::osdmap to a shared_ptr

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: always add backlog entry
Samuel Just [Wed, 2 Nov 2011 21:32:17 +0000 (14:32 -0700)]
PG: always add backlog entry

Previously, we did not add a backlog entry if the object already had an
entry in the log along with an entry for that entry's prior_version.
However, when scanning the log, an OSD will incorrectly conclude that it
has the prior_version's prior_version if the object is not already in
the missing set.  If there happens to be a clone entry with that version
as it's prior_version, the osd will attempt to recover the clone via a
clone operation on the non-existent object.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agorbd: Fix the showmapped cmd usage
Stratos Psomadakis [Wed, 9 Nov 2011 22:05:35 +0000 (00:05 +0200)]
rbd: Fix the showmapped cmd usage

If the rbd showmapped cmd is given any extra arguments, rbd will fail
with "assert(0)". Fix it by exiting with "usage_exit()", if any
arguments are present, instead of failing.

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
14 years agohadoop: return all replica hostnames
Noah Watkins [Wed, 9 Nov 2011 02:39:20 +0000 (18:39 -0800)]
hadoop: return all replica hostnames

Updates CephFileSystem to return all replica locations,
and in addition attempts to use reverse DNS to convert
the OSD IPs into hostnames. Hadoop does not do well at
comparing the IP with hostnames, and locality is lost.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
14 years agohadoop: make listStatus quiet
Noah Watkins [Wed, 9 Nov 2011 02:39:21 +0000 (18:39 -0800)]
hadoop: make listStatus quiet

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
14 years agohadoop: handle new ceph_get_file_stripe_address
Noah Watkins [Wed, 9 Nov 2011 02:39:19 +0000 (18:39 -0800)]
hadoop: handle new ceph_get_file_stripe_address

Updates the Hadoop JNI/CephFileSystem to handle
the new version of ceph_get_file_stripe_address
which returns the locations of replicas in addition
to the primary.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
14 years agoclient: return stripe address replicas
Noah Watkins [Wed, 9 Nov 2011 02:39:18 +0000 (18:39 -0800)]
client: return stripe address replicas

Changes ceph_get_file_stripe_address to return a
vector of entity_addr_t's for the primary and the
replicas. libcephfs is updated to return the
associated sockaddr_storage for each address.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
14 years agoclient: fix bad perfcounter fset callers
Sage Weil [Wed, 9 Nov 2011 21:15:55 +0000 (13:15 -0800)]
client: fix bad perfcounter fset callers

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoImprove use of syncfs.
Alexandre Oliva [Wed, 9 Nov 2011 17:51:26 +0000 (15:51 -0200)]
Improve use of syncfs.

Test syncfs return value and fallback to btrfs sync and then sync.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
14 years agoosd: fix perfcounter typo
Sage Weil [Wed, 9 Nov 2011 18:46:18 +0000 (10:46 -0800)]
osd: fix perfcounter typo

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoos: rename and make use of the split_threshold parameter.
Greg Farnum [Wed, 9 Nov 2011 19:43:21 +0000 (11:43 -0800)]
os: rename and make use of the split_threshold parameter.

This was accidentally left out of the must_split calculation. Put it
in, and rename it to split_multiplier (as that is a much better name
for how it's used).

In the default case this won't actually change behavior, but it
makes the behavior configurable as it's supposed to be.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoperfcounters: fix users of fset on averages
Greg Farnum [Wed, 9 Nov 2011 19:03:48 +0000 (11:03 -0800)]
perfcounters: fix users of fset on averages

I forgot to audit these before merging the assert and they popped up
in teuthology and stuff. :(

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoMerge branch 'wip-mon'
Sage Weil [Wed, 9 Nov 2011 06:11:04 +0000 (22:11 -0800)]
Merge branch 'wip-mon'

14 years agoosd: don't open deleted map from generate_past_intervals
Sage Weil [Wed, 9 Nov 2011 05:58:11 +0000 (21:58 -0800)]
osd: don't open deleted map from generate_past_intervals

The first get_map() call needs to be avoided when stop < last_epoch.  This
fixes a crash like

2011-11-08 21:51:09.046739 7fcf6e035700 osd.0 5 pg[1.1p0( empty n=0 ec=1 les/c 3/3 2/2/2) [0,1] r=0 mlcod 0'0 !hml peering] enter Started/Primary/Peering/GetInfo
2011-11-08 21:51:09.046767 7fcf6e035700 osd.0 5 pg[1.1p0( empty n=0 ec=1 les/c 3/3 2/2/2) [0,1] r=0 mlcod 0'0 !hml peering] generate_past_intervals over epochs 4-1
2011-11-08 21:51:09.046796 7fcf6e035700 osd.0 5 get_map 1 - loading and decoding 0x183b000
*** Caught signal (Aborted) **
 in thread 7fcf6e035700
 ceph version 0.37-327-g1bc1a24 (commit:1bc1a244dbf7342662322d002d0c9d41ad5fee6f)

...

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoautomake: enable 'make V=0'
Sage Weil [Wed, 9 Nov 2011 05:13:07 +0000 (21:13 -0800)]
automake: enable 'make V=0'

Enables silent mode for automake generated Makefiles,
and silent mode is _off_ by default. Using V=0 the output
is much easier to read when trying to find warnings:

nwatkins@piha:~/Projects/ceph/ceph$ make -j8 V=0
make[3]: Entering directory `/users/nwatkins/Projects/ceph/ceph/src'
  CC     locks.o
  CXX    journal.o
  CXX    Server.o
  CXX    Mutation.o
  CXX    MDCache.o
  CXX    Locker.o
  CXX    Migrator.o
  CXX    MDBalancer.o
  CXX    CDentry.o
  CXX    CDir.o
  CXX    CInode.o
  CXX    LogEvent.o
  CXX    MDSTable.o

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
14 years agomon: handle active -> electing transition properly
Sage Weil [Wed, 9 Nov 2011 00:24:01 +0000 (16:24 -0800)]
mon: handle active -> electing transition properly

If we are already active, make sure we reset things properly before going
into an election.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: don't return partial content response with bad header
Yehuda Sadeh [Tue, 8 Nov 2011 22:02:47 +0000 (14:02 -0800)]
rgw: don't return partial content response with bad header

14 years agorgw: swift bucket report returns both bytes size and actual size
Yehuda Sadeh [Tue, 8 Nov 2011 21:42:55 +0000 (13:42 -0800)]
rgw: swift bucket report returns both bytes size and actual size

14 years agorgw: abort early on incorrect method
Yehuda Sadeh [Tue, 8 Nov 2011 21:42:32 +0000 (13:42 -0800)]
rgw: abort early on incorrect method

14 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>
14 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>
14 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>
14 years agorgw: guard perfcounter accesses in rgw_cache.
Greg Farnum [Tue, 8 Nov 2011 19:50:42 +0000 (11:50 -0800)]
rgw: guard perfcounter accesses in rgw_cache.

This gets called by radosgw-admin, so it needs to handle
perfcounter being a null pointer.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agorgw: initialize all the perfcounters, in order
Greg Farnum [Tue, 8 Nov 2011 19:28:02 +0000 (11:28 -0800)]
rgw: initialize all the perfcounters, in order

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoReplicatedPG: use finc, not fset, on average counters
Greg Farnum [Tue, 8 Nov 2011 18:42:30 +0000 (10:42 -0800)]
ReplicatedPG: use finc, not fset, on average counters

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 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>
14 years agorgw: use l_rgw_qactive perfcounter
Greg Farnum [Tue, 8 Nov 2011 18:04:59 +0000 (10:04 -0800)]
rgw: use l_rgw_qactive perfcounter

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 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>
14 years agorgw: implement perfcounters
Greg Farnum [Tue, 8 Nov 2011 17:49:22 +0000 (09:49 -0800)]
rgw: implement perfcounters

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoperfcounter: add some minimal documentation.
Greg Farnum [Wed, 26 Oct 2011 23:05:45 +0000 (16:05 -0700)]
perfcounter: add some minimal documentation.

The data model is a bit obtuse if you're just looking at the code.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoperfcounter: assert when you try and set an average.
Greg Farnum [Wed, 26 Oct 2011 23:04:45 +0000 (16:04 -0700)]
perfcounter: assert when you try and set an average.

If you're trying to set an average, you're probably doing it wrong.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agorgw: create and tear down a radosgw perfcounter
Sage Weil [Tue, 11 Oct 2011 21:00:42 +0000 (14:00 -0700)]
rgw: create and tear down a radosgw perfcounter

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 years agorgw: fix tmp objects leakage
Yehuda Sadeh [Fri, 4 Nov 2011 20:40:07 +0000 (13:40 -0700)]
rgw: fix tmp objects leakage

14 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

14 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

14 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>
14 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)

14 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'

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

14 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>
14 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>
14 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>
14 years agorgw: fix null deref, cleanups
Yehuda Sadeh [Thu, 3 Nov 2011 18:45:44 +0000 (11:45 -0700)]
rgw: fix null deref, cleanups

14 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

14 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

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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

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

14 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>
14 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

14 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'

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>