The ImageCtx::snaps collection is stored in newest->oldest order,
so the first snapshot id should be retrieved from the back of the
array.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If the diff_iterate call doesn't start with the first snapshot,
unmodified objects in future snapshots / HEAD are incorrectly
flagged as modified.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
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>
obj_bencher rados cli: rados bench producing wrong values when different blocksize used in writes and reads
Reviewed-by: Loic Dachary <ldachary@redhat.com>
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>
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>
* do not require sphinx-build if --without-man-pages
* dist rst files for man pages
* build and dist .8 files if sphinx-build is found
Signed-off-by: Kefu Chai <kchai@redhat.com>
The ceph-detect-init implements the same detection logic as ceph-deploy.
It is better than the current hardcoded values that assume Ubuntu is
upstart and all the rest is sysvinit.
Signed-off-by: Owen Synge <osynge@suse.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The test for error was reversed and ceph-disk.sh always returned on the
the first successfull test, with no error.
And add verbosity to help with debugging.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
* Add the files to the distribution tarbal via EXTRA_DIST
* Build the module via the all-local target
* Add run-tox.sh to the tests run via make check
* Add manual page
Signed-off-by: Loic Dachary <ldachary@redhat.com>
On Ubuntu 14.04
$ ceph-detect-init --default=sysvinit
upstart
The ceph-detect-init helper is a copy/paste of the ceph-deploy init
system detection found at:
4992ef0993/ceph_deploy/hosts/__init__.py (L15)
It is meant to be used by both ceph-disk and ceph-deploy to avoid
duplicating the logic. Some operating systems implement more than one
init system and ceph-detect-init will not return the default one, it
will return the init system suitable for ceph deployment.
ceph-detect-init is implemented as a standalone python module suitable
to be published at https://pypi.python.org/pypi/ceph-detect-init, with
unit tests and integration tests (based on docker) for the following
platforms:
centos-6
centos-7
debian-jessie
debian-sid
debian-squeeze
debian-wheezy
fedora-21
opensuse-13.1
opensuse-13.2
ubuntu-12.04
ubuntu-14.04
ubuntu-15.04
The tests can be run without network access with run-tox.sh, provided
pip wheel previously populated the wheelhouse directory.
Signed-off-by: Owen Synge <osynge@suse.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
When dumping statistics of OSDs such as running command "ceph osd df",
the sum of OSDs' size is 2^10 times less than their real size.
Signed-off-by: Zhe Zhang <zzxuanyuan@gmail.com>
Rename aio_bench argument 'op_size' to 'object_size' to reflect the reality of
how it is used.
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
Add handling of situation when '-b|--block-size' option is using with
'bench seq' or 'bench rand' which is erroneous according to the help message:
-b op_size
set the size of write ops for put or benchmarking
Fixes: #10163
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
'trans_size' description from header: "size of the write/read to perform"
But really 'object_size' is used in write/read operations. 'trans_size' is used
only in ObjBencher::status_printer for calc current and average bandwidth.
As result - bad statistics in case 'trans_size' and and 'object_size' are different.
Signed-off-by: Dmitry Yatsushkevich <dyatsushkevich@mirantis.com>
Developers should not add "Backport: " fields to Git commits, because
this data is immutable after the commits are merged. It makes more sense
to handle this information in Redmine instead.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Replace install-data-local: with install-data-local:: (two :) so that
other Makefile.am can have the same target and all get concatenated
instead of being overridden.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Building a package is disk intensive and running make -j8 on a machine
with a spinner can actually be slower than make. NPROC=1 make-deb.sh
overrides the default value of make -jX.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
For all tox.ini in the source tree which also have requirement.txt
files, create a wheelhouse with the dependencies. This allows tox to
setup test environment with no access to the network with something
like (in tox.ini):
deps =
--use-wheel
--find-links={toxinidir}/wheelhouse
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
Signed-off-by: Loic Dachary <ldachary@redhat.com>
If a write operation implicitly creates an object on an erasure coded
pool, there cannot be an offset > 0, even if it is properly aligned.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Even if the offset is properly aligned.
http://tracker.ceph.com/issues/11507Fixes: #11507
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Previously we used a atomic field to avoid deadlock, but it still let lockdep
detect failed. So we remove the atomic field and unlock connection firstly.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
When marking down connection, previously we will call stop which will dispatch event
regardless of the staus of the connection. If this connection is already down and
its events all has cleaned, we will hit NULL event.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>