close() was never called for the passed in IoCtx which
could probably result in an IoCtx leak if the original
IoCtx was a valid pool context allocated earlier.
Its kind of better to do it here rather than to leave
the destruction on the caller for better (or cleaner)
common case handling.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
A new CDentry will not have a parent until its projected parent is
flushed to journal. During path construction a given dentry may have no
parent yet which will cause fallbacks to be used (the inode number).
This can cause access checks to fail:
2016-11-17 19:50:43.830207 7eff9977a700 20 Session check_access path #10000000002/3
compare to an earlier check:
2016-11-17 19:50:43.824223 7eff9977a700 20 Session check_access path /test/1/2
This commit refactors path construction to optionally use projected
parents for the entire chain of directories. Existing use of real stable
parents is unchanged. For example, this line is the same before and
after the patch:
2016-11-18 23:17:15.611680 7f153f97a700 12 mds.0.cache.dir(10000000002) add_null_dentry [dentry #10000000002/3 [2,head] auth NULL (dversion lock) pv=0 v=1 inode=0 0x55e0f771f5f0]
Here inode "#10000000002" has no stable parent yet. So the path is
constructed as "#10000000002/3".
One notable change in this commit is the removal of
make_path_string_projected which was only used in debugging code. Here's
an example difference:
2016-11-17 19:50:43.827915 7eff9977a700 10 mds.0.server traverse_to_auth_dir [dir 10000000003 {#10000000003 #10000000002/3}/ [2,head] auth v=1 cv=0/0 state=1073741826|complete f() n() hs=0+0,ss=0+0 0x55f5d35e2ee0]
to:
2016-11-18 23:17:15.617757 7f153f97a700 10 mds.0.server traverse_to_auth_dir [dir 10000000003 /test/1/2/3/ [2,head] auth v=1 cv=0/0 state=1073741826|complete f() n() hs=0+0,ss=0+0 0x55e0f7706ee0]
Fixes: http://tracker.ceph.com/issues/17858
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
We're changing the default value because the previous one was
a makeshift solution to not fail Ceph compilation due to
the Beast's dependency on Boost >= 1.54 that wasn't available
on CentoOS 7. As we got the in-tree Boost we can compile
the ASIO front-end by default.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
For vstart.sh powered tests, save 9 characters in the path name
by replacing testdir/test- with td/t-
60 characters imposed by jenkins
9 characters for src/test
5 characters for td/t-
33 left (instead of 24) for the test to create asok such as out/client.admin.25327.asok
Moving these files outside of the build directory is a bad idea because
tests should only create/use files within the builddir and not write
outside of this directory. Doing so would make things more complicated
for cleanup in case the test fail and create other problems as a
consequence (filling out disk space, conflicting directories between
runs etc.).
For ceph-helpers.sh tests replace testdir with td, saving 5 characters.
This is not strictly necessary but keeps the directory names consistent:
if the developer wants to get rid of all the test leftovers, it is
enough to remove the a single directory: td.
Fixes: http://tracker.ceph.com/issues/16014
Signed-off-by: Loic Dachary <loic@dachary.org>
- change order of testing
- But report the same error types.
- Changed to report for the last error since the value is there but
not allowed characters follow.
Error found by: run-cli-tests, because the wrong string was returned.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
While it is being worked on, because it frequently fails.
Refs: http://tracker.ceph.com/issues/17830
Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
If we fail to get an existing session and have to take the exclusive lock,
we may race with an OSDMap update and end up with a stale target. Check
for an epoch change and, if it happens, recalculate the mapping.
Fixes: http://tracker.ceph.com/issues/17942
Reported-by: wangdongxu <wangdongxu@cmss.chinamobile.com>
Reported-by: menglingkun <menglingkun@cmss.chinamobile.com>
Signed-off-by: Sage Weil <sage@redhat.com>
As described in http://tracker.ceph.com/issues/17937, a client with
restricted pool access can still delete files unless a corresponding
MDS path restriction is also in place.
Signed-off-by: David Disseldorp <ddiss@suse.de>
The recent change to do this logic with file copy (and in src/rgw)
resolved the build problem, but now updates to the civetweb
submodule were not reflected in the build.
Move the copy into a custom target which will always source the
current submodule version at build time.
Avoid using the BYPRODUCTS option, as it is not supported in many
older cmake versions (e.g., Centos 7).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Log entries don't get added to the log for ECBackend until reads are
done, yet we still want any other requests with the same id to wait.
ReplicatedPG::update_range should consider the projected log as well.
Signed-off-by: Samuel Just <sjust@redhat.com>