Commit Graph

37941 Commits

Author SHA1 Message Date
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
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
John Spray
61126a2d71 Merge pull request #3199 from ceph/wip-qa-empty-xattr
qa: test zero size xattr

Reviewed-by: John Spray <john.spray@redhat.com>
2014-12-19 17:03:25 +00:00
Sage Weil
0a25bee539 Merge remote-tracking branch 'gh/wip-fs-quota'
Conflicts:
	src/client/Client.cc
2014-12-19 07:45:02 -08:00
Sage Weil
676ce2a58e Merge pull request #3218 from dachary/wip-10383-disable-unittest-msgr
tests: temporarily disable unittest_msgr
2014-12-19 07:42:48 -08:00
Loic Dachary
ecbdbb1629 tests: temporarily disable unittest_msgr
http://tracker.ceph.com/issues/10383 Refs: #10383

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 16:21:50 +01:00
Sage Weil
84ae9fd127 Merge pull request #2976 from ceph/wip-pgmeta
osd: move PG metadata to a per-PG object

Passed rados and upgrade tests.

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-19 07:19:05 -08:00
Sage Weil
531ed8a38c Merge pull request #3212 from ceph/wip-10255-wusui
Remove sepia dependency (use fqdn)

Backport: giant
Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-19 07:09:33 -08:00
Sage Weil
c2951131bd Merge pull request #3214 from xinxinsh/wip-cleanup
cleanup : remove sync_epoch

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-19 07:02:39 -08:00
Jenkins
08bd1e1eee 0.90 2014-12-19 06:56:22 -08:00
Wido den Hollander
49c2322160 doc: Instead of using admin socket, use 'ceph daemon' command. 2014-12-19 15:51:49 +01:00
Loic Dachary
11fa1dfbcb Merge pull request #3193 from nilamdyuti/wip-doc-ceph-disk
Changes format style in ceph-disk to improve readability as html

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 15:36:39 +01:00
Loic Dachary
71df64519d Merge pull request #3210 from ceph/wip-osdmap
osd: only verify OSDMap crc if it is known

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 15:07:56 +01:00