Raju Kurunkad [Tue, 5 May 2015 14:10:38 +0000 (19:40 +0530)]
Update XIO client connection IP and nonce
Obtain the local IP of the client and save the nonce provided when the messenger was created. This is required for RBD lock/unlock
Fix script error in RBD concurrent test
Reset did_bind during messenger shutdown
Jon Bernard [Fri, 8 May 2015 15:54:06 +0000 (11:54 -0400)]
common/admin_socket: close socket descriptor in destructor
Long-running processes that do not reuse a single client connection will
see accumulating file descriptors as a result of not closing the
listening socket. In this case, eventually the system will reach
file-max and subsequent connections will fail.
Fixes: #11535 Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Loic Dachary [Wed, 6 May 2015 18:14:37 +0000 (20:14 +0200)]
tests: ceph-helpers kill_daemons fails when kill fails
Instead of silently leaving the daemons running, it returns failure so
the caller can decide what to do with this situation. The timeout is
also extended to minutes instead of seconds to gracefully handle the
rare situations when a machine is extra slow for some reason.
Loic Dachary [Fri, 8 May 2015 07:19:44 +0000 (09:19 +0200)]
install-deps.sh: exit on error if dependencies cannot be installed
Now that pre-installing pip dependencies is done at the end of the
script, the last command to run is no longer the installation
command. Therefore the status of the script is no longer the status of
the install command and no longer reflect success or failure to install
the dependencies. Add explicit || exit 1 to commands that are to be
treated as fatal errors.
Also set -e so that another error has a better chance to be caught.
Loic Dachary [Fri, 8 May 2015 06:57:24 +0000 (08:57 +0200)]
tests: pip must not log in $HOME/.pip
Because it may not have permission to when running in a container and
scripts run from source are not expected to modify anything outside of
the source tree anyway.
Jason Dillaman [Thu, 30 Apr 2015 19:32:38 +0000 (15:32 -0400)]
librbd: ObjectMap::aio_update can acquire snap_lock out-of-order
Detected during an fsx run where a refresh and CoR were occurring
concurrently. The refresh held the snap_lock and was waiting on
the object_map_lock, while the CoR held object_map_lock and was
waiting for snap_lock.
Fixes: #11577 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Loic Dachary [Thu, 7 May 2015 21:12:33 +0000 (23:12 +0200)]
tests: fail make check if nproc is too low
When running tests in parallel with make -jX, the ulimit -u (number of
processor / thread per user) needs to be at least X * 1024. If not it
will fail in mysterious ways. Since there is no convenient way to figure
out the value of X ( see
http://blog.jgc.org/2015/03/gnu-make-insanity-finding-value-of-j.html
for a non trivial an entertaining solution) add a very conservative
check that assumes the user will run make -jX where X is nproc / 2.
It will be annoying for users who want to run make check, not use -j,
and have a low ulimit -u. But the error suggest a way to override this
with
make CHECK_ULIMIT=false check
This is a minor irritation compared to the puzzling behavior of make
check when ulimit is exceeded.
John Spray [Thu, 7 May 2015 17:42:01 +0000 (18:42 +0100)]
client: fix error handling in check_pool_perm
Previously, on an error such as a pool not existing,
the caller doing the check would error out, but
anyone waiting on waiting_for_pool_perm would
block indefinitely (symptom was that reads on a
file with a bogus layout would block forever).
Fix by triggering the wait list on errors and
clear the CHECKING state so that the other callers
also perform the check and find the error.
Additionally, don't return the RADOS error code
up to filesystem users, because it can be
misleading. For example, nonexistent pool is
ENOENT, but we shouldn't give ENOENT on IO
to a file which does exist, we should give EIO.
Loic Dachary [Thu, 7 May 2015 08:30:23 +0000 (10:30 +0200)]
doc: clarify the release cycle and LTS meaning
* Explain the development cycle and stable release cycle
* Replace the 18 month duration with the LTS+2 overlap logic
* Explain that the estimated retirement is an educated guess
that depends on the stable release frequency
* Replace Support with Stable in LTS to avoid confusion with
professional services
* Do not promise bugs will be handled, only that they will be triaged
Jason Dillaman [Tue, 21 Apr 2015 14:15:58 +0000 (10:15 -0400)]
librbd: allow updates to snapshot object maps
The modified copyup behavior will need to update snapshot object
maps when performing a copyup since the object will now exist within
all snapshots of the image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 20 Apr 2015 16:12:05 +0000 (12:12 -0400)]
librados_test_stub: support AIO snapshot context
AIO operations can be executed with a different snapshot
context from the IoCtx. librbd takes advantage of this
capability to perform a deep object copyup.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 16 Apr 2015 20:27:56 +0000 (16:27 -0400)]
librbd: copyup should use empty snapshot context
This allows child object to exist through all existing
snapshots as well as HEAD. If the operation was a CoW,
issue the write ops as a separate RADOS op with the
correct snapshot context.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 16 Apr 2015 18:15:10 +0000 (14:15 -0400)]
librbd: move copyup class method call to CopyupRequest
Move AbstractWrite's invocation of copyup to the CopyupRequest
class. The AioRequest write path will now always create a
CopyupRequest, which will now append the actual write ops to the
copyup.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Wed, 15 Apr 2015 18:25:08 +0000 (14:25 -0400)]
librbd: add new deep-flatten RBD feature
Copy-on-read/write will now use an empty snapshot context to
deep-copy the object through all existing snapshots. With the
deep-flatten feature enabled, the flatten operation will now
disconnect a child image from its parent even if it has existing
snapshots.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 7 May 2015 01:28:25 +0000 (21:28 -0400)]
librbd: fast diff should treat all _EXISTS objects as dirty
With the fast-diff feature enabled, if the object map marks the
object as _EXISTS, it can only occur due to a write -- otherwise
it would be _EXISTS_CLEAN. Therefore, ensure it is properly
flagged as an updated object for diff_iterate.
Fixes: #11553 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Sage Weil [Wed, 6 May 2015 21:01:34 +0000 (14:01 -0700)]
librbd: fix warning
librbd/librbd.cc: In member function 'int librbd::Image::metadata_get(const string&, std::string*)':
librbd/librbd.cc:845:76: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
Jason Dillaman [Wed, 6 May 2015 18:48:50 +0000 (14:48 -0400)]
librbd: ignore lack of support for metadata on older OSDs
If an Infernalis librbd attempts to open an image stored on a
pre-Infernalis OSD, the new config metadata operations won't
be supported. This error can be safely ignored.
Fixes: #11549 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Tim Serong [Fri, 1 May 2015 15:59:53 +0000 (01:59 +1000)]
json_spirit: use utf8 intenally when parsing \uHHHH
When the python CLI is given non-ASCII characters, it converts them to
\uHHHH escapes in JSON. json_spirit parses these internally into 16 bit
characters, which could only work if json_spirit were built to use
std::wstring, which it isn't; it's using std::string, so the high byte
ends up being zero'd, leaving the low byte which is effectively garbage.
This hack^H^H^H^H change makes json_spirit convert to utf8 internally
instead, which can be stored just fine inside a std::string.
Note that this implementation still assumes \uHHHH escapes are four hex
digits, so it'll only cope with characters in the Basic Multilingual
Plane. Still, that's rather a lot more characters than it could cope
with before ;)
(For characters outside the BMP, Python seems to generate escapes in the
form \uHHHHHHHH, i.e. 8 hex digits, which the current implementation
doesn't expect to see)
Fixes: #7387 Signed-off-by: Tim Serong <tserong@suse.com>
Zhiqiang Wang [Wed, 6 May 2015 08:14:29 +0000 (16:14 +0800)]
librbd: fix the image format detection
If the detection of the old format fails with reasons other than
-ENOENT, we should return with this error. Otherwise, if we continue the
new format detection and fail with -ENOENT, the caller will get the
missleading failure information.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>