Commit Graph

37952 Commits

Author SHA1 Message Date
Sage Weil
97c8156916 Merge pull request #3235 from dachary/wip-10410-port-7110
tests: use port 7111 for osd-copy-from.sh

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-22 06:39:20 -08:00
Sage Weil
864509ff5f Merge pull request #3234 from majianpeng/bug-fix
objectstore: add fadvise_flags operations in ObjectStore::Transaction::append func.

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-22 06:38:30 -08:00
Loic Dachary
4bb6e29054 tests: use port 7111 for osd-copy-from.sh
Because port 7110 is already used by mkfs.sh

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-22 14:20:58 +01:00
Jianpeng Ma
f4da356e68 objectstore: add fadvise_flags operations in
ObjectStore::Transaction::append func.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-12-22 20:50:50 +08:00
Sage Weil
3e6195bf0a Merge pull request #3228 from dachary/wip-10401-docker-install-deps
tests: oneliner to run make check in a container

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-21 15:51:34 -08:00
Loic Dachary
abd3523032 Merge pull request #3231 from ceph/wip-mon-health
mon: make 'ceph -s' show pg state counts in reverse descending order

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-22 00:35:44 +01:00
Loic Dachary
6ce1469cce tests: reduce centos docker intermediate steps
Collapse multiple RUN statements related to systemd into a single line
to reduce the number of steps that are preserved by docker.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 18:12:01 +01:00
Loic Dachary
b15bd60c4e tests: add docker-test.sh --ref giant|firefly etc.
Add the --ref option to chose the git ref to which the working tree must
be reset instead of HEAD.

   test/docker-test.sh --ref giant make

is equivalent to

   test/docker-test.sh bash -c 'git reset --hard giant ; make'

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:53:00 +01:00
Loic Dachary
f0805957a2 tests: avoid bash == --shell confusion in docker-test-helper.sh
Do not force interactive mode when the bash script is specified by the
user because it should be usable to run a small script instead of
starting an interactive shell session.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:53:00 +01:00
Loic Dachary
4a1c3b261a tests: add xmlstarlet in containers
It can be removed once https://github.com/ceph/ceph/pull/3228 is merged
and xmlstarlet is found in ceph.spec.in and debian/control.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:53:00 +01:00
Loic Dachary
2d0d388162 tests: helpers to run make check in containers
Add scripts that run make check in a container for a given operating
system version. They are a little more than oneliners and serve two
purposes:

  * help new developers who do not have to figure out which options
    should be used

  * run make check in containers in parallel with make -j2

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:53:00 +01:00
Loic Dachary
46c83d9528 tests: run-make-check.sh arguments are passed to configure
All run-make-check.sh arguments are transparently given to the configure
command. For instance:

    run-make-check.sh --enable-root-make-check

implies

    ./configure --enable-root-make-check

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:53:00 +01:00
Loic Dachary
94abadbd80 tests: replace --enable-docker with --enable-root-make-check
The --enable-docker logic was that each test that needs privileges to
run uses a container to do so. The problem with this approach and
make -j8 check is that such tests compete for a single container.

The --enable-root-make-check activates tests that require privileges and
assume it is ok to use sudo to acquire privileges. The decision to run
in a container is then taken by the caller who will run something like:

   docker-tests.sh ./configure --enable-root-make-check
   docker-tests.sh make -j8 check

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:53:00 +01:00
Loic Dachary
7b68f70a2e tests: docker-test.sh commands are relative to git root
Instead of being in the src directory. Forcing the working directory to
src is convenient to run unittests individually without the need to
change directory, but it is confusing to the user.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Loic Dachary
812570e841 tests: deprecate docker-test.sh --compile option
It is redundant with the run-make-check.sh script and imposes additional
limitations.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Loic Dachary
621813866a tests: enable password-less sudo in containers
If compilation is run with ./configuire --enable-root-make-check, sudo
is expected to work without human interaction.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Loic Dachary
19b6de3eee tests: ceph.spec.in or debian/control rebuild docker images
If any of the files in test/$os_type is newer than the creation date of
a docker image, the image is removed and rebuilt from scratch. For
instance, when a package is added to debian/control, the debian based
images are rebuilt.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Loic Dachary
d8f84d15db tests: docker images must use install-deps.sh
The dockerfiles must run install-deps.sh instead of duplicating the
package list that is found in ceph.spec.in and debian/control.

A directory is created for each os_type and provided as a context for
docker build to use. The former $os_type.dockerfile is moved into
$os_type/Dockerfile.in (the .in as a reminder that it will be variable
substituted).

http://tracker.ceph.com/issues/10401 Fixes: #10401

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Loic Dachary
80f20f8ed3 tests: run-make-check.sh install jq
jq is useful to parse json from the command line. It is however not
packaged for all supported distributions (precise has it in the backport
repository which is usually not active) and cannot be conveniently added
to debian/control because it targets all distributions and has no
conditionals.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Loic Dachary
2de2c4b035 install-deps.sh: do not require sudo when root
If the user is root, do not use sudo. The sudo package is not installed
by default on centos by default and when building from script it may be
that root is running install-deps.sh on a freshly install distribution.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00
Sage Weil
ee006bb11d Merge pull request #3134 from ceph/wip-9059-checksums
osd: record and validate whole-object checksums during deep scrub

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-21 08:06:44 -08:00
Sage Weil
e99da68840 mon: make 'ceph -s' show pg state counts in reverse descending order
Because these are in an unordered_map we print this is random order.
Instead sort descending by count.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-21 07:43:57 -08:00
Sage Weil
218de829b1 osd: scrub: wait for digest updates to apply before next scrub chunk
Wait for any digest updates to apply before we scrub the next chunk.  This
bounds the number of repops we initiate by the size of the scrub chunk, and
it generally nicer to the cluster.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:06 -08:00
Sage Weil
1646d17026 osd: change omap data encoding in object_copy_data_t
Pass the omap data in the struct as an opaque (encoded) bufferlist.  This
avoids a decode into an STL map, simplifying the crc calculation.  The
win isn't huge (yet) because we still turn it into a map to pass it down
to the ObjectStore method, but that too will change in time.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:06 -08:00
Sage Weil
925f572793 test/osd/osd-copy-from: simple test of copy-from and error injection
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:05 -08:00
Sage Weil
6d80078a38 rados: use copy_from for rados cp (and cppool) command
A hammer CLI won't be able to run against a pre-firefly OSD, but I don't
think we care.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:05 -08:00
Sage Weil
5d2d839dd9 osd: add copyfrom error injection
Unfortunately it's nontrivial to inject this from the usual
ceph_test_rados_api_* tests which need to run despite thrashing.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:04 -08:00
Sage Weil
f8c1d40169 osd: pass and verify data+omap digest on copyfrom
Two things here:

 1- Pass the original digest from the source across the wire, if it is
    present.
 2- Calculate a new digest as we receive it, and record that.

If there is a mismatch, we currently crash; need to turn this into an
EIO, most likely.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:04 -08:00
Sage Weil
75b2bc2823 osd: EIO if a full-object read produces a bad digest
Add a tunable to control this.  Returning an EIO instead of garbled data
may not be the best approach in all environments.

Eventually we want to do something better here, like read from a replica
instead.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:04 -08:00
Sage Weil
55bf020b57 osd: scrub: set a min age before we update whole-object digest
If an object is being actively updated, the whole-object digest will
quickly be invalidated.  On deep scrub, only record that digest if the
object is a few hours old.  Otherwise, we are wasting an IO.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:03 -08:00
Sage Weil
28d4dd89c4 osd: scrub: record whole-object digest on scrub
If we do not have a whole-object digest, record one after a deep scrub.

Note that we make no particular attempt to avoid this on frequently
changing objects where the digest will quickly be invalidated.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:03 -08:00
Sage Weil
6feb4a1710 osd: scrub: complain about bad digest in final pass auth check
This will only trigger if we choose an auth that is known bad, but that
currently can happen, so compalin here too.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:02 -08:00
Sage Weil
85f677a4aa osd: scrub: be explicit about whether bad digest is known bad
The digest may just disagree with our best guess 'auth' shard, or it may
also disagree with the recorded oi digest.  Clarify which.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:02 -08:00
Sage Weil
14f3c26a1f osd: scrub: disqualify shards with digests that disagree with oi digest
The auth may or may not know that the digest is truly bad.  Note that we
can only relate scrub digests to those in oi if the scrub used a seed of
-1; older OSDs use 0.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:01 -08:00
Sage Weil
cf3b04764d osd: scrub: share auth oi with caller and be_compare_scrub_objects
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:01 -08:00
Sage Weil
74bd8708df osd: move scrub no good auth check out of helper
This helps call out that this is an exceptional case and simplifies the
helper a bit.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:00 -08:00
Sage Weil
9c3afccbf1 osd: remove more (most? all?) of classic scrub
Hopefully this is everything

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:30:00 -08:00
Sage Weil
7d73f41f0d osd: use -1 for deep scrub digest seed on new OSDs
0 is a weak initial value for a CRC since it doesn't change with a sequence
of 0 bytes (which are relatively common).  -1 is better.  Use -1 when
everyone in the acting set supports it.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:28:52 -08:00
Sage Weil
e68d77166c osd: drop vestigal invalid_snapcolls fields from scrub
This isn't used.  Snapcolls are ancient.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:17:39 -08:00
Sage Weil
591e7e1675 osd: clean up scrub method debug output
Use __func__ instead of (usually inaccurate) names.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:17:39 -08:00
Sage Weil
8a75800328 osd/ReplicatedPG: kill some dead scrub code
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:16:21 -08:00
Sage Weil
056de0924b osd/ReplicatedPG: set and invalidate data/omap digests on osd ops
When we create an empty object, we have a known digest of -1.  In a few
cases, we also know the digest from the op (e.g., writefull).  The rest
of the time we invalidate any existing digest.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:16:21 -08:00
Sage Weil
3f7b2cf52f osd/osd_types: add {data,omap}_digest to object_info_t
Also add flags to indicate whether the fields are valid.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 07:16:21 -08:00
Loic Dachary
154497c695 Merge pull request #3227 from nilamdyuti/wip-doc-ceph-deploy
Fixes a typo in ceph-deploy man page

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-20 09:40:08 +01:00
Nilamdyuti Goswami
9d5d491f31 doc: Adds updated ceph-deploy man page under man/
Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-20 13:50:06 +05:30
Nilamdyuti Goswami
8c38cc6bc5 doc: Fixes a typo in ceph-deploy man page.
Lack of a single space was restricting the proper rendering of an option in
html. Fixes the error.

Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-20 13:47:55 +05:30
Dan Mick
0e6ec8ba32 Merge pull request #3225 from dachary/wip-10400-quota-info-t
mds: add default ctor for quota_info_t
2014-12-19 16:36:54 -08:00
Loic Dachary
7f1e510165 mds: add default ctor for quota_info_t
http://tracker.ceph.com/issues/10400 Fixes: #10400

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-20 01:08:33 +01:00
Sage Weil
18d6b20039 doc/release-notes: v0.90
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-19 14:21:09 -08:00
Sage Weil
6067462102 Merge remote-tracking branch 'gh/next' 2014-12-19 11:55:58 -08:00