Commit Graph

23581 Commits

Author SHA1 Message Date
Danny Al-Gaaf
340b1cfe9b ceph-filestore-dump.cc: don't use po::value<string>()->required()
Don't use po::value<string>()->required() since this breaks build on
RHEL/CentOs6. Check if the options are set as in the code of other
ceph parts.

Move some checks up in the code to validate options as soon
as possible. Remove printing 'help' twice, and check it first.

Fix type description.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-01-31 16:52:40 -08:00
Danny Al-Gaaf
9235271a05 ceph.spec.in: fix file section for ceph-resource-agents
Create needed dirs (/usr/lib/ocf/resource.d/ceph) for the ceph-resource-agents
subpackage.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-01-31 14:16:03 -08:00
Danny Al-Gaaf
6e09cb9ba5 ceph.spec.in: extend fix for libedit-devel on special SUSE versions
Extend fix for libedit-devel on special SUSE versions, use ncurses
also on src/ocf/Makefile and src/java/Makefile

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-01-31 14:16:03 -08:00
Danny Al-Gaaf
4c1d8d088a ceph.spec.in: don't move libcephfs_jni files around
Don't move libcephfs_jni files around from %{_libdir} to /usr/lib/jni/
in the buildroot. They should be placed in %{_libdir} as all libs.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-01-31 14:16:03 -08:00
Danny Al-Gaaf
9b16036e3b ceph.spec.in: move libcephfs_jni.so to ceph-devel
Move libcephfs_jni.so to the ceph-devel package since so-files they
shouldn't be part of the library package.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-01-31 14:16:02 -08:00
Alex Elder
97c6619d3f qa: update the rbd/concurrent.sh workunit
A few changes, now that a few rbd problems have been fixed.
First, the more substantive changes:
    - Generate a source file, and compare what's read back from rbd
      devices with the content of that file.
    - Write to the rbd device such that the written data spans
      an (assumed 4 MB) rbd object boundary, as well as starting
      and ending on non-page-aligned offsets.
    - Perform multiple reads on rbd devices: entirely within a range
      before any written data; beginning before but ending within
      written data; the exact written data (and validating what's
      read); beginning within written data but ending after it;
      reading after written data but within a written rbd object;
      and reading from an unwritten rbd object.
    - Have the sleep between iterations provide a non-integer value
      to avoid zero (or quantized) delays.

Also, some a little less substantive (but possibly informative):
    - Don't run with "set -x".  It produces a ton of noise that is
      not useful for this test.  This is an exerciser, looking
      really for system crashes during concurrent activity, and
      knowing which commands were (concurrently) active isn't going
      to help much in diagnosis.
    - Create two more directories, used to track the degree of
      concurrency (more or less) and the highest rbd id consumed.
      Files whose names are numbers are touched in each, and the
      highest at the end is the highest during the run.  This gets
      around issues passing environment info from sub-shells to the
      top-level shell.  As a bonus, it offers a better chance of
      avoiding problems due to concurrent update.
    - NAMESDIR is renamed NAMES_DIR, and it (and the others) is
      set up in the setup() function.
    - Increase the concurrency and iteration counts.
    - Move the default definitions before the ceph secrets stuff

Signed-off-by: Alex Elder <elder@inktank.com>
2013-01-31 11:55:59 -06:00
David Zafman
0758fabaed Add ceph-filestore-dump to the packaging
Feature: #3890

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-01-30 22:50:41 -08:00
Sage Weil
ab778cb1cf doc: v0.56.2 release notes
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-30 15:41:55 -08:00
David Zafman
3c8d7d7847 osd: create tool to extract pg info and pg log from filestore
New application ceph-filestore-dump created that mounts filstore
and can dump info or log in JSON when an OSD is not running.

Feature: #3890

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-01-30 14:21:47 -08:00
David Zafman
4a950aa94f Move read_log() function to prep for next commit
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-01-30 14:21:47 -08:00
Danny Al-Gaaf
b571f8ee2d PGMap: fix -Wsign-compare warning
Fix -Wsign-compare compiler warning:

mon/PGMap.cc: In member function 'void PGMap::apply_incremental
 (CephContext*, const PGMap::Incremental&)':
mon/PGMap.cc:247:30: warning: comparison between signed and
 unsigned integer expressions [-Wsign-compare]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-01-30 11:50:29 -08:00
Sage Weil
b0d4dd21c7 test_libcephfs: fix xattr test
Ignore the ceph.*.layout xattrs.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-30 11:32:23 -08:00
Sage Weil
c782d2ac53 qa: add test for rbd map and snapshots
This tests for the behavior reported in #3964.  It passes on the current
code, but fails on 3.2 in squeeze (and 32-bit?).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-30 01:06:03 -08:00
Sage Weil
6b4935023d Merge remote-tracking branch 'gh/next' 2013-01-30 01:05:07 -08:00
Dan Mick
e253830aba cls_rbd, cls_rgw: use PRI*64 when printing/logging 64-bit values
caused segfaults in 32-bit build

Fixes: #3961
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-29 23:32:14 -08:00
Sage Weil
77f57411f5 mds: move lexical_cast and assert re-#include to the top
We should keep the re-#includes immediately following the offender, and
documented.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 19:48:25 -08:00
Dan Mick
35e5d74e5c Don't install rbd-fuse binary
fixes packaging warnings

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-29 19:00:47 -08:00
Dan Mick
23923ee955 mds/Server.cc: fix warring assert.h's
New include boost/lexical_cast.hpp apparently drags in the system
assert.h on quantal and squeeze at least, breaking our careful
assert.h; re-include our file to fix it back

Fixes: #3957
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-29 18:43:30 -08:00
Sage Weil
25e9a0be63 mon: require name for 'auth add ...' command
Otherwise we interpret the empty string as 'unknown.'.

Fixes: #3956

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 18:42:00 -08:00
Greg Farnum
a731da9954 Merge remote-tracking branch 'origin/wip-fuse-create-fix'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-01-29 17:07:49 -08:00
Dan Mick
84a024b647 init-ceph: make ulimit -n be part of daemon command
ulimit -n from 'max open files' was being set only on the machine
running /etc/init.d/ceph.  It needs to be added to the commands to
start the daemons, and run both locally and remotely.

Verified by examining /proc/<pid>/limits on local and remote hosts

Fixes: #3900
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Loïc Dachary <loic@dachary.org>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-01-29 16:48:17 -08:00
Sage Weil
c2e50e580d Merge remote-tracking branch 'gh/wip-recovery-stats-b'
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-01-29 16:34:21 -08:00
Sage Weil
1564c3a0a3 Merge branch 'wip-vxattr'
Reviewed-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-01-29 16:26:57 -08:00
Sage Weil
61fbe27a52 qa: add layout_vxattrs.sh test script
Test virtual xattrs for file and directory layouts.

TODO: create a data pool, add it to the fs, and make sure we can use it.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:25:05 -08:00
Sage Weil
db31a1f9f2 mds: allow dir layout/policy to be removed via removexattr on ceph.dir.layout
This lets a user remove a policy that was previously set on a dir.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:25:05 -08:00
Sage Weil
ebebf72f09 mds: handle ceph.*.layout.* setxattr
Allow individual fields of file or dir layouts to be set via setxattr.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:25:05 -08:00
Sage Weil
09f28541e3 mds: fix client view of dir layout when layout is removed
We weren't handling the case where the projected node has NULL for the
layout properly.  Fixes the client's view when we remove the dir layout.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:25:05 -08:00
Sage Weil
84751489ca client: note presence of dir layout in inode operator<<
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:25:05 -08:00
Sage Weil
ba32ea9454 client: list only aggregate xattr, but allow setting subfield xattrs
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:25:05 -08:00
Sage Weil
3f82912a89 client: implement ceph.file.* and ceph.dir.* vxattrs
Display ceph.file.* vxattrs on any regular file, and ceph.dir.* vxattrs
on any directory that has a policy set.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:24:45 -08:00
Sage Weil
febb965095 client: move xattr namespace enforcement into internal method
This captures libcephfs users now too.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:24:45 -08:00
Sage Weil
ad7ebad70b client: allow ceph.* xattrs
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:24:45 -08:00
Sage Weil
e51299fbce mds: open mydir after replay
In certain cases, we may replay the journal and not end up with the
dirfrag for mydir open.  This is fine--we just need to open it up and
fetch it below.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-29 16:24:45 -08:00
Josh Durgin
3bc2114355 ObjectCacher: fix flush_set when no flushing is needed
C_GatherBuilder takes ownership of the Context we pass it. Deleting it
in flush_set after constructing the C_GatherBuilder results in a
double delete.

Fixes: #3946
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
2013-01-29 14:35:28 -08:00
Alex Elder
59ac4d3534 qa: add rbd/concurrent workunit
This defines a new workunit shell script that performs a bunch of
rbd operations concurrently in order to exercise code paths and
catch reference count and bad pointer problems.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-01-29 16:42:44 -06:00
Sam Lang
907c709ccb mds: Send created ino in journaled_reply
The MDS avoids sending an early reply if a request
triggered inode allocation (no preallocated inodes yet).
For create, this prevented the created ino from being
sent back to the client, which is used to indicate
creation (as apposed to already existing) of the file.
This commit fixes the issue by adding the created ino
to the journaled (safe) reply.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-01-29 11:28:00 -06:00
Sam Lang
cf7c3f7d3f client: Don't use geteuid/gid for fuse ll_create
Fixes a bug in ll_create where files that already exist at the MDS
don't get the created flag set on reply.  This causes a permissions
check, which fails because geteuid/getegid are 0/0 for ll_create.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-01-29 10:18:29 -06:00
Gary Lowell
0b66994c18 ceph.spec.in: package rbd udev rule
Package udev/50-rbd.rules per bug 3930.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-01-28 22:49:45 -08:00
Sage Weil
a7d15afb52 mon: smooth pg stat rates over last N pgmaps
This smooths the recovery and throughput stats over the last N pgmaps,
defaulting to 2.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-28 19:46:33 -08:00
Sage Weil
0f7a9e56fd Merge remote-tracking branch 'yan/wip-mds'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-01-28 19:17:48 -08:00
Ross Turk
ecda12081a doc: fix overly-big fixed-width text in Firefox
Changed font size for <pre> elements to be 15pt instead of 1.5em - Firefox seems to render 1.1em a bit bigger than other browsers.

Signed-off-by: Ross Turk <ross@inktank.com>
2013-01-28 19:03:56 -08:00
Sage Weil
3f6837e022 mon/PGMap: report IO rates
This does not appear to be very accurate; probably the stat values we're
displaying are not being calculated correctly.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-28 18:50:03 -08:00
Sage Weil
208b02a748 mon/PGMap: report recovery rates
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-28 18:50:03 -08:00
Sage Weil
76e9fe5f06 mon/PGMap: include timestamp
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-28 18:50:03 -08:00
Sage Weil
a2495f658c osd: track recovery ops in stats
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-28 18:50:03 -08:00
Sage Weil
4aea19ee60 osd_types: add recovery counts to object_sum_stats_t
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-28 18:50:03 -08:00
Sage Weil
193dbedb91 rbd-fuse: fix warning
Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-28 18:49:20 -08:00
John Wilkins
1e24ce22a9 doc: Removed indep, and clarified explanation.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-01-28 18:44:07 -08:00
Yan, Zheng
829aeba63a mds: clear inode dirty when slave rename finishes.
The inode is linked to a non-auth directory, so remove it from LogSegment's
dirty inode list.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-01-29 10:17:37 +08:00
Yan, Zheng
5884177667 mds: mark export bounds for cross authority directory rename
this guarantees that the importing MDS gets directory fragment's
up-to-date fragstat/rstat.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-01-29 10:17:37 +08:00