Commit Graph

17085 Commits

Author SHA1 Message Date
Sage Weil
20cf1e96fb 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>
2011-11-08 21:13:07 -08:00
Yehuda Sadeh
76090324d3 rgw: don't return partial content response with bad header 2011-11-08 14:17:31 -08:00
Yehuda Sadeh
7a32cc605e rgw: swift bucket report returns both bytes size and actual size 2011-11-08 14:17:31 -08:00
Yehuda Sadeh
a04afd0957 rgw: abort early on incorrect method 2011-11-08 14:17:30 -08:00
Greg Farnum
64350c0b4d 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>
2011-11-08 11:50:42 -08:00
Greg Farnum
42f5f02462 rgw: initialize all the perfcounters, in order
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-08 11:28:02 -08:00
Greg Farnum
e952e10fa2 ReplicatedPG: use finc, not fset, on average counters
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-08 10:42:30 -08:00
Greg Farnum
f0b9a331bc rgw: use l_rgw_qactive perfcounter
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-08 10:04:59 -08:00
Greg Farnum
cf5665501b rgw: implement perfcounters
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-08 09:50:29 -08:00
Greg Farnum
57b60b8ac8 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>
2011-11-08 09:50:29 -08:00
Greg Farnum
d0b226e703 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>
2011-11-08 09:50:29 -08:00
Sage Weil
0fe0f9db17 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>
2011-11-08 09:50:29 -08:00
Sage Weil
40843eb36c rgw: fix warning
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-07 20:40:18 -08:00
Yehuda Sadeh
2836104a24 rgw: fix accept-range for suffix format, other related issues 2011-11-07 17:08:22 -08:00
Samuel Just
2f881e12c4 Timer.cc: remove global thread variable
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-11-07 15:04:45 -08:00
Samuel Just
d4ef9215fd common: return null if mc.init() unsuccessful
Prevents ceph.cc from segfaulting on missing keyring.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-11-07 15:04:05 -08:00
Josh Durgin
480b8260cc rbd: add showmapped to clitests and rst man page
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-11-07 09:27:55 -08:00
Stratos Psomadakis
4e518ed3de 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>
2011-11-07 09:27:15 -08:00
Josh Durgin
34d80397f7 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>
2011-11-07 09:10:08 -08:00
Samuel Just
ae41f3232a 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>
2011-11-04 18:38:21 -07:00
Christoph Hellwig
fb70f5cc5f 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>
2011-11-04 17:30:09 -07:00
Sage Weil
585a46c585 monclient: simplify auth_supported set
Use AuthSupported class instead of repopulating it ourselves.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-04 17:29:48 -07:00
Greg Farnum
1014167367 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>
2011-11-04 17:21:25 -07:00
Samuel Just
5b4e9d31e9 RadosModel: add DeleteOp to test object deletions
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-11-04 14:57:58 -07:00
Yehuda Sadeh
280a4d1ded rgw: fix tmp objects leakage 2011-11-04 13:40:07 -07:00
Yehuda Sadeh
fc6522a836 rgw: don't purge pools in any case 2011-11-04 13:13:41 -07:00
Yehuda Sadeh
8d914f0e00 rgw: list system buckets through rados api 2011-11-04 13:13:41 -07:00
Josh Durgin
256ac72abc rbd: document --order and list required args where they're necessary
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-11-03 15:46:13 -07:00
Yehuda Sadeh
0f98006ca7 rgw: fix PUT without content length (non chunked) 2011-11-03 16:01:28 -07:00
Greg Farnum
0df3f0365a Merge remote branch 'nwatkins/for-master' 2011-11-03 14:43:50 -07:00
Greg Farnum
9024906983 Merge branch 'wip-getdir' 2011-11-03 14:11:21 -07:00
Greg Farnum
b8733476d2 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>
2011-11-03 13:59:25 -07:00
Greg Farnum
d4faf5889d qa: workunit to run test_libcephfs_readder
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-11-03 13:55:53 -07:00
Greg Farnum
120c3fbdf0 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>
2011-11-03 13:49:56 -07:00
Yehuda Sadeh
58eb8c5e46 rgw: fix null deref, cleanups 2011-11-03 11:45:44 -07:00
Yehuda Sadeh
7726e78d44 rgw: add support for chunked upload 2011-11-03 11:29:32 -07:00
Yehuda Sadeh
0d4987d990 rgw: fix crash when accessing swift auth without user 2011-11-03 11:29:32 -07:00
Noah Watkins
376dad92de 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>
2011-11-02 19:52:04 -07:00
Noah Watkins
3191e0db25 hadoop: FileSystem.rename should not return FileNotFound
This fixes several unit test failure cases.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2011-11-02 19:51:59 -07:00
Noah Watkins
60e1e148bf hadoop: ENOTDIR should be negative
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2011-11-02 19:51:54 -07:00
Noah Watkins
6deea1c29b 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>
2011-11-02 19:51:50 -07:00
Noah Watkins
ccb08e21d7 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>
2011-11-02 19:51:44 -07:00
Noah Watkins
1c24fc7a93 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>
2011-11-02 19:51:40 -07:00
Noah Watkins
a407da0ecf hadoop: remove statistics initialization
This is already handled by super.initialize()

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2011-11-02 19:51:36 -07:00
Noah Watkins
dcf2d62956 hadoop: remove unused variable
Remove CephFileSystem.debug as log4j is now
used for debug level control.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2011-11-02 19:51:24 -07:00
Noah Watkins
9e8fa0295c 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>
2011-11-02 19:51:19 -07:00
Noah Watkins
3006c6e5cf 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>
2011-11-02 19:51:08 -07:00
Noah Watkins
a79b7e17eb 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>
2011-11-02 19:50:56 -07:00
Noah Watkins
e9adf7358d 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>
2011-11-02 19:49:47 -07:00
Samuel Just
c861ee1054 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>
2011-11-02 11:51:14 -07:00