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>
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>
* 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>
* 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>
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>
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>
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>
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>
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>
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>
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: #7065Fixes: #7135
Signed-off-by: Samuel Just <sam.just@inktank.com>
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>
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>
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>
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>