Commit Graph

37911 Commits

Author SHA1 Message Date
Haomai Wang
b5381c22a7 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.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2014-12-15 23:05:25 +08:00
Ken Dreyer
31adfeb046 doc: fix spelling in corpus page
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2014-12-15 07:57:14 -07:00
John Spray
12808b9e2a osdc/Objecter: respect honor_osdmap_full setting
With this, it no longer needs to special case the MDS,
as the MDS can just call unset_honor_osdmap_full.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-15 12:15:33 +00:00
John Spray
7e8403411e os: free space tracking for MemStore
Allow users to set an artificial upper bound
on size of the memstore OSD, and report actual
usage information in fsstat.

This is a useful tool for simulating nearly-full
systems.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-15 12:15:33 +00:00
Loic Dachary
e8d33998e9 tests: convert osd-scrub-repair to ceph_objectstore_tool
http://tracker.ceph.com/issues/10201 Fixes: #10201

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-15 11:22:23 +01:00
Loic Dachary
aa54640841 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.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-15 11:22:23 +01:00
Loic Dachary
a58385a848 Merge pull request #3075 from theanalyst/doc/v0.89/mailmap
mailmap updates

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-15 10:16:54 +01:00
Abhishek Lekshmanan
f0961ae9e7 mailmap: Blaine Gardner affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:22:46 +05:30
Abhishek Lekshmanan
b0e88a0252 mailmap: Lei Dong affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:22:46 +05:30
Abhishek Lekshmanan
6d683d10e7 mailmap: Sandon Van Ness name normalization
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:22:46 +05:30
shishir gowda
973e9f755a jemalloc-support: Added --with-jemalloc configure option
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

Signed-off-by: shishir gowda <shishir.gowda@sandisk.com>
2014-12-15 11:22:29 +05:30
Abhishek Lekshmanan
ad20551157 mailmap: Chendi Xue name normalization
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>

Conflicts:
	.mailmap
2014-12-15 11:22:27 +05:30
Abhishek Lekshmanan
04ab4099fc mailmap: Ding Dinghua affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
d048ec9024 mailmap: Dongmao Zhang affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
a3dd8b0bc3 mailmap: Kefu Chai affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
c40176ee76 mailmap: Michal Jarzabek affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
5d973846ba mailmap: Xinze Chi affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
1fd074d231 mailmap: Karl Eichwalder affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
e90818fd93 mailmap: Dan Mick name normalization
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
cc0551814d mailmap: Adam Spiers affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Abhishek Lekshmanan
41707ee08e mailmap: Nilamdyuti Goswami affiliation
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
2014-12-15 11:20:31 +05:30
Sage Weil
38867340ca ceph_test_rados_api_io: fix new test
From 0c802e11d9.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-14 11:36:12 -08:00
Sage Weil
ee10896880 Merge pull request #3175 from ceph/wip-test-huge-tickets
qa: add script to test how libceph handles huge auth tickets

Reviewed-by: Sage Weil <sage@redhat.com>
2014-12-14 09:44:21 -08:00
Sage Weil
af76f7810a Merge pull request #3174 from dachary/wip-warning
tests: fix signedness compilation warnings
2014-12-13 22:09:14 -08:00
Sage Weil
e3ba3d22b7 ceph_test_rados_api_watch_notify: use 5 min timeout for notifies
This should make them tolerate thrashing.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-13 21:51:41 -08:00
Sage Weil
a2572c38f1 ceph_test_stress_watch: do not unwatch if watch failed
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-13 21:40:21 -08:00
Loic Dachary
4b9b0417e4 Merge pull request #2986 from ceph/wip-9998
crush: fix weight underfloat issue

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-14 00:52:08 +01:00
Ilya Dryomov
35f084d078 qa: add script to test how libceph handles huge auth tickets
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
2014-12-13 20:49:04 +03:00
Loic Dachary
b9ddb83321 Merge pull request #3112 from xiaoxichen/cleanup_getheader
Cleanup:Use get_type()instead of get_header().type

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 18:22:12 +01:00
Loic Dachary
e7d434b583 tests: fix signedness compilation warnings
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 17:55:21 +01:00
Loic Dachary
710680188d Merge pull request #3172 from dachary/wip-10146-retrigger-udev
ceph-disk: test re-using an existing journal partition

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 17:42:29 +01:00
Sage Weil
847e5e1025 osd: check that source OSD is valid for MOSDRepScrub
Make sure the message we got from the peer OSD is valid.  Specifically,
this avoids a race like this:

- A marks down B
- B sends MOSDRepScrub
- A accepts connection from B as new
- A replies to scrub
- B crashes because msgr seq 1 < expected seq 1000+

See #8880 for the most recent fix for requests.

Fixes: #9555
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-13 08:06:31 -08:00
Sage Weil
707a111d53 osd: pass Message* to most require_* helpers
These do nothing but op->get_req(); pass the Message* explicitly so that
non-OpRequest callers can use them.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-13 08:03:00 -08:00
Sage Weil
09c1648b32 osd: drop redundant check in handle_replica_op
This is what require_self_aliveness checks.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-13 08:03:00 -08:00
Loic Dachary
b6401c10f2 ceph-disk: LOG.info instead of print
When a non fatal error happens with parted, use LOG.info to display it
instead of print.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 16:44:59 +01:00
Dan van der Ster
e0f052a10d 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>
2014-12-13 15:01:45 +01:00
Dan van der Ster
0e4cb57bcc ceph-disk: fix get_partition_uuid for loop/cciss
Loopback and cciss devices have an extra 'p' before the partition
number. Add exceptional handling of these devices.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2014-12-13 15:01:45 +01:00
Dan van der Ster
29eb1350b4 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>
2014-12-13 15:01:45 +01:00
Loic Dachary
b9ddf97a0c 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).

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 15:01:40 +01:00
Loic Dachary
35e4f425cf tests: install parted in centos container
Because ceph-disk depends on it.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 14:43:23 +01:00
Loic Dachary
85ab278abd tests: install hdparm in containers
The ceph-disk tests use hdparm, install it in containers that run
them.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 12:18:10 +01:00
Loic Dachary
60bca677be tests: update centos docker file to epel 7.5
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 12:18:08 +01:00
Loic Dachary
e038b1266b tests: docker tests only need a workdir, not a clone
Instead of cloning the repository, create a work directory that has
symbolic links to the original .git, using

https://github.com/git/git/blob/master/contrib/workdir/git-new-workdir

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).

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-13 12:17:34 +01:00
Yehuda Sadeh
f773c74979 rgw: cannot modify swift bucket policy
When trying to set a policy on the bucket, fail unless policy matches
current placement rule.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-12-12 17:00:52 -08:00
David Zafman
de29fada87 Merge pull request #3126 from ceph/wip-cleanup-removal
osd: Remove dead code related to old pg removal mechanism

Reviewed-by: Samuel Just <sjust@redhat.com>
2014-12-12 16:42:43 -08:00
Yehuda Sadeh
07dc42a68e rgw: dump X-Storage-Policy header on bucket HEAD
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-12-12 14:29:28 -08:00
Yehuda Sadeh
f16da1cb42 rgw: compare placement target on bucket recreation
and return -EEXIST (409) if requested a mismatching placement target.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-12-12 14:20:55 -08:00
Sage Weil
c55d7da4f4 librados: remove IoCtxImpl lock member
It is dead!

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-12 14:11:54 -08:00
Sage Weil
c598e63346 librados: stop using IoCtxImpl lock for watch/notify functions
This is a carry-over from olden times when Objecter didn't do its own
locking.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-12 14:11:18 -08:00
Sage Weil
90246c1753 osdc/Objecter: only ping after watch is registered
If we ping before the watch is registered we will get ETIMEDOUT (the ping
is are a read op that will fail to see the watch registration).

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-12 13:53:47 -08:00