Ken Dreyer [Wed, 17 Dec 2014 20:05:21 +0000 (13:05 -0700)]
ceph.spec.in: quote %files macro in comment
Prior to this commit, RPM would expand the %files macro that was present
in the comment.
Use a double percent sign to quote the macro so that RPM will not expand
it.
This fixes an rpmlint warning, "W: macro-in-comment %files"
More information from rpmlint's "-I" (help) command:
$ rpmlint -I macro-in-comment
macro-in-comment:
There is a unescaped macro after a shell style comment in the
specfile. Macros are expanded everywhere, so check if it can cause a
problem in this case and escape the macro with another leading % if
appropriate.
Loic Dachary [Tue, 16 Dec 2014 12:31:30 +0000 (13:31 +0100)]
erasure-code: relax cauchy w restrictions
A restriction that the w parameter of the cauchy technique is limited to
8, 16 or 32 was added incorrectly while refactoring parameter parsing in
the jerasure plugin and must be relaxed.
In the source code of cephfs there is no reference to it anymore,
but it's still in the man page. Leave it there for now, but make
it more clear that it is deprecated and unsupported.
Jason Dillaman [Mon, 15 Dec 2014 15:53:53 +0000 (10:53 -0500)]
librbd: complete all pending aio ops prior to closing image
It was possible for an image to be closed while aio operations
were still outstanding. Now all aio operations are tracked and
completed before the image is closed.
Fixes: #10299
Backport: giant, firefly, dumpling Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 15 Dec 2014 17:37:05 +0000 (12:37 -0500)]
librbd: fixed garbage output from test LibRBD.TestIOPP
buffer::list::c_str does not actually provide a C-style, NULL
terminated string. As a result, its use for console output
resulted in stray garbage characters being printed.
Fixes: #9405 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
mon: Paxos: reset accept timeout before submiting work to the store
Otherwise we may trigger the timeout while waiting for the work to be
committed to the store -- and it would only take the write to take a bit
longer than 10 seconds (default accept timeout).
We do wait for the work to be properly committed to the store before
extending the lease though.
Fixes: #10220 Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
Haomai Wang [Tue, 22 Jul 2014 03:27:02 +0000 (11:27 +0800)]
ReplicatedPG: Make pull and push op use sparse read
If user enable fiemap feature in osd side, there exists three ways to make
read/write sprase:
1. normal sparse read/write op
2. clone op
3. recover op
If any op doesn't support sparse way, it will destroy the advantage of this
way and write zero hole to sparse file. Now clone op can support sparse write,
this commit implement sparse read/write for recover op.
Loic Dachary [Fri, 28 Nov 2014 15:22:22 +0000 (16:22 +0100)]
tests: shell functions toolbox dedicated to testing
The osd/osd-test-helpers.sh mon/mon-test-helpers.sh are useful to create
shell based functional tests. Since they were introduced they did not
grow significantly. As more tests are added, it becomes necessary to
have more sophisticated helpers. The ceph-helpers.sh toolbox is a merge
of the existing helpers intended to be easy to maintain and expand.
* Each function is documented
* Each function is tested
When adding to a function or looking for a new function, it is unlikely
the developer will find time to explore the entire file and understand
its structure. The documentation, body and test for each function are
grouped together to limit the scope of exploration required from the
casual developer.
The test are designed to not use internal helpers so that they can be
understood in full just by reading the test function. It means a given
test takes longer than it should (i.e. each getters tests run one mon).
In the context of testing this toolbox, simplicity is preferred over
efficiency.
If --with-jemalloc option is not specified, then it defaults to tcmalloc.
If --with-jemalloc is specified, then --without-tcmalloc is required.
Also if a rocksdb static linking is desired --with-librocksdb-static,
do not use --with-jemalloc, as rocksdb uses tcmalloc for builds.
Support for jemalloc in package build and perf stats/heap profiler is
underway
Dan van der Ster [Fri, 12 Dec 2014 11:40:19 +0000 (12:40 +0100)]
ceph-disk: test re-using an existing journal partition
Add a ceph-disk test to first setup an OSD with a separate journal
block device, then tear down the OSD (simulating a failure) and create
a new OSD which re-uses the same journal device.
Add create_dev / destroy_dev helpers that encapsulate the operations
that ensure the partition table is up to date in the kernel and the
symlinks are created as expected. In particular it makes sure the kernel
is aware that the partition table of a newly created device is
empty. If the device previously existed and the kernel was not informed
of the latest partition table updates via partprobe / partx, it may
have cached an old partition table which can create all sorts of
unexpected behaviors such as a failure to create the by-partuuid
symbolic links as described in http://tracker.ceph.com/issues/10146
Refs: #10146
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch> Signed-off-by: Loic Dachary <ldachary@redhat.com>
Dan van der Ster [Tue, 18 Nov 2014 14:51:46 +0000 (15:51 +0100)]
ceph-disk: don't change the journal partition uuid
We observe that the new /dev/disk/by-partuuid/<journal_uuid>
symlink is not always created by udev when reusing a journal
partition. Fix by not changing the uuid of a journal partition
in this case -- instead we can reuse the existing uuid (and
journal_symlink) instead. We also now assert that the symlink
exists before further preparing the OSD.
Fixes: #10146 Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch> Tested-by: Dan van der Ster <daniel.vanderster@cern.ch>
Loic Dachary [Sat, 6 Dec 2014 22:59:54 +0000 (23:59 +0100)]
documentation: simplify running make check
Encapsulate the compilation steps (install dependencies, autogen.sh,
configure, make check) in the run-make-check.sh script. Update the
developer documentation to point to this script instead of multiple
steps.
It is intended as a tool to help new developer make sure their patch is
sane, it focuses on efficiency (runs make check in parallel if possible)
and coverage (enables docker based tests if possible).
It resolves the problem of fetching a commit that is not attached to any
ref, which is apparently not implemented in the git protocol (discussed
on irc.freenode.net#git).
Sage Weil [Thu, 4 Dec 2014 23:53:26 +0000 (15:53 -0800)]
mon/OSDMonitor: do not reencode OSDMap on 'osd getmap'
Return the bits unmolested.
This is a slight change in that we do not reencode based on the client's
features. However, this is an admin command and the client is generally
the CLI or REST API. It makes more sense to provide the unmolested
bits than to reencode them based on features present in a tool that
never inspects the map.