Commit Graph

30738 Commits

Author SHA1 Message Date
Sage Weil
1308225cc4 buffer: do not append trailing newline when appending empty istream
If we call

 bl.append(some_istream);

do not include a \n if the istream is empty (which is apparently is not
the same thing as eof).  This was causing 'ceph pg getmap' to include a
trailing newline.

Probably we don't want this newline at all!  But all callers need to be
fixed for that change.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-13 15:52:13 -08:00
athanatos
196e3d6278 Merge pull request #931 from ceph/wip-5858-rebase
Wip 5858 rebase

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-01-13 14:25:51 -08:00
John Wilkins
90343708b3 doc: Added comment and example for SSL enablement in rgw.conf
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-01-13 12:57:02 -08:00
David Zafman
c0d92b6744 osd: Implement multiple backfill target handling
Fixes: #5858

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-13 11:39:05 -08:00
David Zafman
a657fad47a osd: Interim backfill changes
Make peer_backfill_info a map which holds a
BackfillInterval for all backfill targets.
Initially see if recover_backfill() can just backfill
the first one and mark them all finished.

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-13 11:39:05 -08:00
Sage Weil
09ae4bc2aa Merge pull request #1077 from ceph/wip-7141
DBObjectMap::clear_keys_header: use generate_new_header, not _generate_n...

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-13 11:22:49 -08:00
Samuel Just
4c92dc6f5c DBObjectMap::clear_keys_header: use generate_new_header, not _generate_new_header
We aren't holding the header_lock here, so we need the locked version.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-01-13 11:02:46 -08:00
Sage Weil
5f165ed391 Merge pull request #1075 from dachary/wip-crush
improve crushtool --build useability and documentation

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-13 08:46:04 -08:00
Loic Dachary
0082d88c7e doc: format man pages with s/2013/2014/
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 18:06:06 +01:00
Loic Dachary
b4054fcc8d doc: copyright s/2013/2014/
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 18:06:06 +01:00
Loic Dachary
efbdd16380 doc: update the crushtool manual page
* add information about CEPH_ARGS
* rework the --build documentation and example
* add an Author section
* replace vi with emacs for no good reason
* cleanup whitespace

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 18:06:06 +01:00
Loic Dachary
283793ac44 doc: crushtool man page nroff format
also includes a modification from a prior patch series that was not
formatted to nroff.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 18:06:06 +01:00
Loic Dachary
d3393e9d10 crush: tests for crushtool --build
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 18:06:06 +01:00
Loic Dachary
26f7fa96b0 crush: crushtool copyright notice update
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:33 +01:00
Loic Dachary
b705e52304 crush: crushtool emacs compile helper
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:33 +01:00
Loic Dachary
d3d75a2165 crush: crushtool --build informative messages
* dump the crush tree created by --build at debug level 1.

* display a warning at debug level 1 if there is more than one root. In
  most cases it is not what the user wants and it may be confusing
  because the ruleset will only apply to the first of root and have less
  devices under it as expected.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:33 +01:00
Loic Dachary
5b28405a85 crush: crushtool --build uses OSDMap helpers for rulesets
Instead of creating a ruleset from scratch, use the
OSDMap::build_simple_crush_rulesets helper. It is more likely to match
the user expecations.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:33 +01:00
Loic Dachary
1368229e04 crush: print --build debug information when verbose 2
instead of verbose 0

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:32 +01:00
Loic Dachary
5b95d183c8 crush: display args on crushtool failure
When the number of args provided to --build is not a multiple of 3,
display the arguments which do not comply.

For instance the --debug_crush 0 option is not consumed by global_init
in crushtool because, unlike most ceph tools, the arguments are not
passed to global_init. As a result --debug_crush 0 become part of the
arguments and triggers the failure.

   crushtool --debug_crush 0 --build --num_osds 320 node straw 4
   remaining args: [--debug_crush,0,node,straw,4]
   layers must be specified with 3-tuples of (name, buckettype, size)

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:32 +01:00
Loic Dachary
2765f81aff crush: parse CEPH_ARGS in crushtool
The arguments are not given to global_init because the -c option would
conflict. Reading arguments from CEPH_ARGS the way other ceph tools do
is the only way to control verbosity ( via --debug_crush 0 for instance ).

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:32 +01:00
Loic Dachary
cf9a764957 osd: factorize build_simple_crush_map* rulesets creation
Group the rulesets created by build_simple_crush_map* into a helper:
build_simple_crush_rulesets()

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:32 +01:00
Loic Dachary
76765503fa osd: ostream is enough for build_simple*
There is no need to specialize the argument into stringstream. It is
replaced by a ostream which is convenient to display errors directly to
cerr if appropriate.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-12 17:48:32 +01:00
Yan, Zheng
dae248f273 Merge pull request #998 from ceph/wip-omapdirfrag2
use OMAP to store dirfrags
2014-01-10 15:48:05 -08:00
Sage Weil
cec8d85853 mds: require CEPH_FEATURE_OSD_TMAP2OMAP
Require that all OSDs support TMAP2OMAP before starting the MDS.  This
avoids doing some work and then crashing with EOPNOTSUPP, and gives us
a more informative message in the logs.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-11 07:41:40 +08:00
Sage Weil
1d8429de57 osd/OSDMap: get_up_osd_features()
Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-11 07:40:37 +08:00
Yan, Zheng
b8dfcc1ed2 mds: use OMAP to store dirfrags
MDS can fetch dirfrags from both TMAP and OMAP. When committing a
dirfrags that is stored in TMAP, MDS first uses OSD_OP_TMAP2OMAP
to convert corresponding TMAP to OMAP, then updates the resulting
OMAP.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-01-11 07:40:37 +08:00
Yan, Zheng
0f0dd74cde osd: introduce TMAP->OMAP conversion operation
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-01-11 07:40:37 +08:00
athanatos
20f8bae920 Merge pull request #1074 from ceph/wip-7135
Fixes: #7135

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-10 14:28:01 -08:00
Samuel Just
90d6cec6d9 src/test/ObjectMap: test clear_keys_header() call
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-01-10 14:02:29 -08:00
Samuel Just
617a50c02a src/test/librados/misc.cc: verify that omap_clear doesn't blast xattr
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-01-10 14:02:29 -08:00
Samuel Just
0c81849c4f os/DBObjectMap, FileStore: omap_clear should not remove xattrs
Prevously, FileStore::_omap_clear() used ObjectMap::clear(), which
incorrectly also blasts any stored xattrs.  Instead, add
ObjectMap::clear_keys_header() to handle this case efficiently.

Fixes: #7065
Fixes: #7135
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-01-10 14:02:25 -08:00
Sage Weil
ecd503471e Merge pull request #1073 from dachary/wip-mailmap
mailmap updates

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-10 13:58:33 -08:00
Sage Weil
1ddf5893b4 Merge remote-tracking branch 'gh/next' 2014-01-10 13:57:04 -08:00
Loic Dachary
6225f2cc18 mailmap: fix typo in Alexandre Maragone
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-10 20:50:47 +01:00
Loic Dachary
fa43d9cee1 organizationmap: joe.buck@inktank.com is Inktank
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-10 19:07:50 +01:00
Sage Weil
744895326c Merge pull request #1062 from ceph/wip-7110
rgw: convert bucket info if needed

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-01-10 09:51:20 -08:00
Loic Dachary
a0e3f05dcb Merge pull request #1070 from dachary/wip-organizationmap
organizationmap: match authors with organizations

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-10 09:45:23 -08:00
Loic Dachary
8604e762b5 organizationmap: match authors with organizations
Using the same format as .mailmap, match author names with the
organization sponsoring them, if any. It can be used from the command
line to display git log statistics with results aggregated by company
names.

The git-check-mailmap command that was introduced in git 1.8.4 can be
used to use .mailmap first and then .organizationmap using the
normalized author names. For instance:

    git log --pretty='%aN <%aE>' | \
    git -c mailmap.file=.organizationmap check-mailmap --stdin

This file is also meant to be a source of information for the maintainers of
http://metrics.ceph.com/

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-10 18:44:18 +01:00
Sage Weil
ce95cef349 mongoose: fix warning
Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-10 09:26:30 -08:00
Sage Weil
8f01eeb5d9 Merge pull request #1069 from dachary/wip-mailmap
mailmap updates

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Roald J. van Loon <roald@roaldvanloon.nl>
Reviewed-by: David Moreau Simard <dmsimard@iweb.com>
2014-01-10 08:53:55 -08:00
Loic Dachary
af0269de8d mailmap: make roald@roaldvanloon.nl primary
It seems more appropriate than @gmail.com

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-10 10:51:13 +01:00
Loic Dachary
f18b310c44 mailmap: remove company name from Pascal de Bruijn name
It is in the email address anyway.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-10 10:46:16 +01:00
Loic Dachary
39db90f766 mailmap: add Andrew Leung, Carlos Maltzahn and Esteban Molina-Estolano
Although the commit aliases are cryptic, the timeframe and account names
seem to match.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-10 10:43:44 +01:00
Loic Dachary
176cec8230 mailmap: add David Moreau Simard alias
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-10 10:09:32 +01:00
Loic Dachary
440fbed207 Merge pull request #1060 from dachary/wip-mailmap
mailmap updates for reviewed-by

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: João Eduardo Luís <joao.luis@inktank.com>
Reviewed-by: Noah Watkins <noah.watkins@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-01-10 01:05:05 -08:00
Greg Farnum
29da2ec403 FileStore: detect XFS properly
We were only setting m_fs_type = FS_TYPE_XFS if
m_filestore_replica_fadvise was also set -- presumably
the bug fix accidentally blocked off too much of the code type. This
resulted in our xattr counts always being set too low: the store
is mounted (and thus does _detectfs) twice; once in as part of the
not-as-conditional-as-it-looks convertfs in ceph_osd.cc, and once
as part of OSD::init().

Reported-by: Sushma Gurram <Sushma.Gurram@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-09 19:15:36 -08:00
Sage Weil
8c5c55c8b4 mon: set next commit in mon command replies
The mon command acks include a version that is used by the client to
determine which version of the map they need to get or wait for in order
to see the effects of their command.  Current we are returning
get_last_committed() everywhere, but we are about to commit something (and
waiting for it), which will increase that value by one.  As a result,
clients are always getting epoch/version-1 instead of epoch.

This manifested by a LibRadosTier.Promote test that failed becaues the
OSD had the OSDMap updates adding the tier and overlay but not the final
map change that set the cache-mode to writeback.  I suspect this is also
the cause of of spurious errors in the past where we've seen misdirected
request errors that made no sense.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao@inktank.com>
2014-01-09 14:44:49 -08:00
Sage Weil
5ce1e2e917 Merge pull request #1061 from kdreyer-inktank/rm-execute-bit-src
remove spurious executable permissions on source code files

Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-09 12:31:12 -08:00
John Wilkins
efb4cf6480 doc: Removed extraneous comment from snapshot text.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-01-09 10:26:28 -08:00
John Wilkins
70cf8d6c97 Merge branch 'master' of https://github.com/ceph/ceph 2014-01-09 10:15:41 -08:00