| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The prevents:
- send COPY_FROM, blocks on recovering object
- send stat, procedes to return old object version
- COPY_FROM succeeds with new version
-> fail
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
This maps to the internal RWORDERED option, which indicates that a read
should be ordered the same way a write is.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
| |
If this flag is set, we need to order reads as writes. In particular, this
means that reads will wait for degraded object recovery even if there is a
local copy. And subsequently will be ordered after a preceding write that
is waiting for the same thing.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\
| |
| |
| |
| | |
osd: change warn_interval_multiplier to uint32_t
Reviewed-by: Sage Weil <sage@inktank.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
to prevent overflow in OpTracker::check_ops_in_flight when
multiplying warn_interval_multiplier *= 2
Backport: cuttlefish, dumpling
http://tracker.ceph.com/issues/6370 fixes #6370
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\
| |
| |
| |
| | |
ErasureCode: fix plugin loading threaded test
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The TEST_F(ErasureCodePluginRegistryTest, factory_mutex) was bugous and
only succeeded by chance. The sleep was on the factory constructor which
was never called. An erasure code plugin that hangs forever on load is
created instead.
The sleep_forever.detach is replaced by pthread_cancel to interrupt the
thread that hangs forever. If not, gtest will try to join the thread and
never exit.
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\ \
| |/
|/|
| |
| | |
rgw: fix rgw test to reflect usage change
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
|
|/
|
|
|
|
|
| |
otherwise src/test/cli/radosgw-admin/help.t fails when running make
check when run after a configure --with-radosgw
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\
| |
| | |
mon: unit tests to protect against some MonCommands.h typos
|
| |
| |
| |
| |
| |
| |
| |
| | |
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Contrary to all other classes, this series of command ( Monitor ) does
not have a common prefix.
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The general idea is to have a series of commands, in the same order as
they show in mon/MonCommands.h, as if they were input to the ceph
client. For each command a valid combination is verified. And at least
one validation error is checked to produce a validation error. For
instance:
['pg', 'stat']
is a valid command and the validate_command function is expected to
return a value that is not None or {}. The command
['pg', 'stat', 'toomany' ]
is also given to validate_command to check that an error occurs when
an extra argument is given.
The TestArparse class implements a few methods to reduce the verbosity
of the tests. It does not provide many methods : only those that
significantly reduce the verbosity have been implemented. The drawback
of writing too many convenience methods is that they are more difficult
to read and maintain.
The signature dictionary is made a global variable so that
it is only extracted once for all classes. It is immutable.
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the / is missing in an EntityAddress, an ArgumentValid exception must
be raised so that it can be caught in the same way other argument
validation exceptions are.
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All other epochs are validated in the same way
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Run parse_json_funcsigs against the builtin commands found
in mon/MonCommands.h. Although it does not provide for a full
validation, it will detect some degenerate cases.
It is expected to raise if a space is missing at the end of an option
specification ( see https://github.com/ceph/ceph/pull/585 ) and this
case is tested. New tests of the same kind can be added whenever an
undetected error is found. Ideally a validation function is implemented
and it would be updated ( with an associated test ) when a new
pathological case is found.
The json string given to parse_json_funcsigs is obtained from
the support program get_command_descriptions.
The python-nose dependencies are added to the build requirements in
debian/control and ceph.spec.in because make check should always be run
at built time.
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| | |
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The get_command_descriptions function is not designed to be tested in
C++ because all the validation happens in pybind/ceph_argparse.py. The
get_command_descriptions program is designed to be used by python unit
tests as a mean to get a JSON dump of the content of mon/MonCommands.h
get_command_descriptions --all
{"cmd000":{"sig":["pg","stat"],"help": ... "avail":"cli,rest"}}
It also provides a way to reproduce and keep track of past errors
( typos etc. ) to ensure the python validation keeps catching it.
get_command_descriptions --pull585
Add /get_command_descriptions to .gitignore so that
git ls-files --exclude-standard --others
does not see it which is required for
https://github.com/ceph/autobuild-ceph/blob/f018d220f2622a9fc8c86a31e1fa13263790c399/build-ceph.sh#L73
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The get_command_descriptions is added to Monitor.h and contains
the code previously inlined in Monitor::handle_command to implement
the get_command_descriptions command. It is intended for tests to
convert command descriptions into json, including error cases.
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| | |
to be used by unit test support programs that do not need to be installed
Signed-off-by: Loic Dachary <loic@dachary.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The check_SCRIPTS is added in Makefile-env.am to list the tests that do
not require compilation. The scripts listed in check-local and in the
TESTS variable use check_SCRIPTS instead.
The PYTHONPATH environment variable is added to Makefile-env.am and
includes the pybind directory so that python unit tests can load the
libraries from sources.
http://tracker.ceph.com/issues/6274 refs #6274
Reviewed-by: Roald J. van Loon <roaldvanloon@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\ \
| | |
| | |
| | |
| | | |
Fixes for purging stray
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
we save old data pools in both inode_backtrace_t::old_pools and
inode_t::old_pools. We have the inode in the cache when purging
stray, so no need to fetch backtrace to find old data pools.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
don't trim stray inode from the cache, purge it instead. This ensures
the stary directories at minimum size.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now we call MDCache::maybe_eval_stray() in MDSCacheObject::put().
So there is no need to call MDCache::maybe_eval_stray() after
releasing inode/dentry's refernece.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Current method to purge stray inode is call MDCache::maybe_eval_stray()
after releasing a reference to the stray inode/dentry. It's difficult
to make this method work correct, because there are so many places that
can release reference.
This patch solves the issue by calling MDCache::maybe_eval_stray()
in MDSCacheObject::put(). This avoids adding code that calls
MDCache::maybe_eval_stray() to each place that releases reference.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a new parameter 'delay' to MDCache::eval_stray(). If 'delay'
is true, MDCache::eval_stray() adds the stray dentry to a delayed
list. Delayed stray dentries are processed in MDCache::trim().
This change is required by later commit that evaluates stray when
reference to cache object is released.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Deleted directory inode's dirfrags may contain some null dentries.
When touch_dentry_bottom() is called, also move these null dentries
to the tail of LRU.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
no reason not to rename inode out of the stray directory if the
inode's link count > 1
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
we should add projected parent directory's context to the journal
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
|
|\ \ \
| | | |
| | | | |
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\ \ \ \ |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
mon: warn when pg_num is too low or appears out of whack wrt the cluster size
Reviewed-by: Greg Farnum <greg@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We need to tweak this since we create relatively few pgs per osd.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If there is a pool that has a high objects/pg relative to the rest of the
cluster, warn, as this suggests this particular pool may have too few
PGs.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Users need to adjust pg_num *and* pgp_num for split but may forget to do
both.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If there are not enough PGs relative to the number of in osds, warn.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We need to wrap the full decode section or we can abort the process
if there's an issue (which we may want to just skip by).
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|\ \ \ \ \
| |_|_|_|/
|/| | | |
| | | | |
| | | | | |
ErasureCode: optimize padding calculation
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Andreas-Joachim Peters pointed out that the ErasureCodeJerasure method
pad_in_length is very inefficient for no reason. It is replaced by the
alignment method and the calculation is inlined in the encode method.
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|/ / / /
| | | |
| | | |
| | | | |
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|\ \ \ \
| | | | |
| | | | | |
common/config: include --cluster in default usage message
|