Commit Graph

33165 Commits

Author SHA1 Message Date
Jianpeng Ma
d51806f5b3 osd: Fix ec pg repair endless when met unrecover object.
In repair_object, if bad_peer is replica, it don't add soid in
MissingLoc for ec pool. If there are more bad replica for ec pool
which cause object can't recover, the later recoverying will endless.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-04-22 09:47:50 +08:00
Sage Weil
67990c57a6 Merge pull request #4399 from trociny/fix-osd_df_avgutil
mon: osd df: fix average_util calculation

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-21 14:27:48 -07:00
Gregory Farnum
1c8913cf2c Merge pull request #4386 from ceph/wip-10657
mds: warn when clients are not advancing their oldest_client_tid

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-04-21 14:19:21 -07:00
Gregory Farnum
881cb27426 Merge pull request #4331 from ceph/wip-mds-misc
Wip mds misc

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-04-21 14:13:09 -07:00
Josh Durgin
cbc941cb9b Merge pull request #4409 from ceph/wip-11437
rgw: don't use end_marker for namespaced object listing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-21 10:34:15 -07:00
Josh Durgin
d87fb08220 Merge pull request #4408 from ceph/wip-11436
rgw: adjust return code if can't find upload

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-21 10:31:22 -07:00
Josh Durgin
36ff465020 Merge pull request #4407 from ceph/wip-11435
rgw: fail if parts not specified on complete-multipart-upload

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-21 10:29:08 -07:00
Josh Durgin
0c278d7a3c Merge pull request #4423 from ceph/wip-11370
librbd: better handling for duplicate flatten requests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-21 10:23:44 -07:00
Jason Dillaman
ef7e210c3f librbd: better handling for duplicate flatten requests
A proxied flatten request could be replayed, resulting in a
-EINVAL error code being generated on the second attempt. Filter
out that error if it is known the parent did exist before the
op started.

Fixes: #11370
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-21 13:02:29 -04:00
Sage Weil
86ea4cfbd4 Merge pull request #4372 from xiaoxichen/fix_kv_compact_on_mount
Fix kv compact on mount

Reviewed-by: Sage Weil <sage@redhat.com>
2015-04-21 09:31:15 -07:00
Yehuda Sadeh
bfb112406b Merge pull request #4418 from oritwas/wip-11438
rgw: force content-type header for swift account responses without body

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-21 08:44:52 -07:00
Yan, Zheng
12f1b30947 client: add failure injection for not advancing oldest_tid
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 23:14:22 +08:00
Yan, Zheng
901fd1a5c6 mds: include size of completed_requests in session dump
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 23:14:21 +08:00
Yan, Zheng
dcd9302227 mds: warn when clients are not advancing their oldest_client_tid
Fixes: #10657
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 23:14:15 +08:00
Orit Wasserman
009664e560 rgw: force content-type header for swift account responses without body
This regression was introduced in commit 4cfeca03ad

Fixes: #11438

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
2015-04-21 16:31:57 +02:00
Loic Dachary
008b151958 Merge pull request #4370 from guangyy/wip-ec-test-fix
qa : misc fixes to stabilize test-erasure-code suite

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-21 13:50:51 +02:00
huangjun
d85e0f8c50 tools: ceph-monstore-tool must do out_store.close()
this change fixes the "store-copy" command.
Like the bug reported in http://tracker.ceph.com/issues/10093.

Signed-off-by: huangjun <hjwsm1989@gmail.com>
2015-04-21 17:50:03 +08:00
Yan, Zheng
a5c067427d client: inlcude inline data in FLUSHSNAP cap message
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:17 +08:00
Yan, Zheng
2fad86e2f1 client: flush dirty snap data before allowing new writes
this guarantees that new writes do not overwrite existing dirty
snap data.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:17 +08:00
Yan, Zheng
d08d834d53 mds: properly update capability's client_follow
If snap inode exists, capability's client_follow has already been
updated by MDCache::cow_inode(). So we only update client_follow
when the inode was not COWed.

Besides, we need to check return of SnapRealm::get_snap_following().
It can return CEPH_NOSNAP, which is clearly invalid for client_follows.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:17 +08:00
Yan, Zheng
c9fe13fddc mds: fix Locker::_do_null_snapflush
the snapid check in Locker::_do_null_snapflush() prevents us from
flushing old snap inodes. The check does not make sense.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:17 +08:00
Yan, Zheng
fa34e04587 mds: do null snap flush when processing embeded cap releases
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:16 +08:00
Yan, Zheng
ab44e5971f mds: make sure snap inode's last match existing snapshots
MDCache::pick_inode_snap() and snap caps flushing code require
this.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:16 +08:00
Yan, Zheng
fc758ce7f1 mds: remove stray dentry from delayed list when it's queued for purging
this avoids assert(!dn->state_test(CDentry::STATE_PURGING)) in
eval_stray() being triggered when processing the delayed list.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:16 +08:00
Yan, Zheng
5c09be262c mds: move snap inode to new dirfrag's dirty_rstat_inodes
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:56:16 +08:00
Yan, Zheng
d900252729 mds: keep auth pin on CDir when marking it dirty
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 13:55:43 +08:00
Yehuda Sadeh
d9bf04fdb6 Merge pull request #4257 from rzarzynski/wip-10683
rgw: rectify support for GET on Swift's account with "limit" parameter == 0

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-20 17:24:11 -07:00
Yehuda Sadeh
d2a67282e0 rgw: don't use end_marker for namespaced object listing
Fixes: #11437

Don't deal with end_marker if there's a namespace set for the object
listing. The cur_end_marker.empty() check is incorrect if no end_marker
is provided, but a namespace is set. Just avoid this issue entirely, as
it's not needed.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-20 16:03:44 -07:00
Yehuda Sadeh
58a144de56 rgw: adjust return code if can't find upload
Fixes: #11436

Return NoSuchUpload (instead of NoSuchKey).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-20 15:01:34 -07:00
Yehuda Sadeh
6ee4f64973 rgw: fail if parts not specified on complete-multipart-upload
Fixes: #11435

A complete multipart upload should not succeed if parts were not
specified. Also, adjust return codes.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-20 14:47:16 -07:00
Josh Durgin
66edf625b4 librbd: always initialize perf counters
If ImageCtx::init() fails, perf counters are still used when closing
the image. To prevent uninitialized use, it's easiest to always
initialize them before anything that can fail in ImageCtx::init().

This was moved in 6055df3985, but it's
not necessary to delay perf counter initialization for any extra
configuration.

Fixes: #11433
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-04-20 11:34:31 -07:00
Gregory Farnum
c1de23ff45 Merge pull request #4302 from ceph/wip-11339
client: drop inode when rmdir request finishes

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-04-20 11:12:38 -07:00
Gregory Farnum
392e824736 Merge pull request #4282 from ceph/wip-3645
mds: rename snapshot support

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com
2015-04-20 11:10:21 -07:00
Josh Durgin
1e912b79f5 Merge pull request #4405 from ceph/wip-11380
cls_rbd: get_features needs to support legacy negative tests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-20 10:23:54 -07:00
Josh Durgin
7147708483 Merge pull request #4402 from ceph/wip-rbd-unmap-by-spec
rbd unmap <image-name>

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-04-20 10:19:27 -07:00
Jason Dillaman
66493b7e83 cls_rbd: get_features needs to support legacy negative tests
During Ceph upgrade testing, older Ceph test suites assume that
get_features will return -ENOENT if provided a missing snapshot.
Support these negative tests until the older releases are no
longer supported.

Fixes: #11380
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-20 12:40:33 -04:00
Yehuda Sadeh
7efea25c6c Merge pull request #3991 from rzarzynski/wip-11087
rgw: multiple fixes for copying Swift objects

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-20 09:38:20 -07:00
Yehuda Sadeh
eb787a403b Merge pull request #3863 from rzarzynski/wip-10971
rgw: multiple fixes for Content-Length header generation in Swift API

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-20 09:21:24 -07:00
Radoslaw Zarzynski
7dd54fa362 rgw: make rgw_read_user_buckets() backward compatible.
Fixes: #10683
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-20 15:04:57 +02:00
Radoslaw Zarzynski
f7b92f9988 rgw: rectify support for GET on Swift's account with limit == 0.
Fixes: #10683
Backport: hammer
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
2015-04-20 15:04:53 +02:00
Kefu Chai
9403df27f6 Merge pull request #3847 from trociny/wip-test_with_crushtool.master
mon: ceph osd setcrushmap: test_with_crushtool improvements

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-04-20 16:04:25 +08:00
Gregory Farnum
a84ae7b14e Merge pull request #4343 from ceph/wip-11356
client: fix uninline data funtion

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-04-19 17:53:52 -07:00
Gregory Farnum
0f2de92db3 Merge pull request #4223 from ceph/wip-11254
mds: make sure lock state not stay in XLOCK/XLOCKDONE indefinitely

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-04-19 17:53:00 -07:00
Gregory Farnum
0b94bf547d Merge pull request #4218 from ceph/wip-11048
mds: persist completed_requests reliably

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-04-19 17:52:09 -07:00
Gregory Farnum
b25e9e130b Merge pull request #4204 from ceph/wip-10368-mk3
mds: separate MDLog::safe_pos from journaler

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-04-19 17:51:12 -07:00
Mykola Golub
cc5f144a51 mon: osd df: fix average_util calculation
average_util should be calculated from the same set of nodes that
dump_item considers when calculating the stddev.

While here, remove unnecessary check for kb > 0:
get_bucket_utilization returns false if kb <= 0.

Also, update get_bucket_utilization accordingly to the preferred
convention to use pointers and not references for output arguments.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-04-19 20:18:24 +03:00
Ilya Dryomov
e4ebe10894 test/cli-integration/rbd: add unmap test
Add a test to exercise rbd unmap.  This was inspired by and is mostly
for rbd unmap <image-name> (aka spec), but rbd unmap <device> is tested
as well.  Any significant change to krbd.cc or corresponding rbd cli
should be tested in the following three configurations at least:

- kernel < 3.14
- kernel >= 3.14, rbd.single_major=N
- kernel >= 3.14, rbd.single_major=Y

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-04-19 14:45:37 +03:00
Ilya Dryomov
b1d3f918fb rbd: allow unmapping by spec
Make use of krbd_unmap_by_spec() and allow unmapping by <image-name>
(i.e. pool/image@snap spec) with a bunch of careful adjustments to the
fragile command args/options parsing process to make --pool, --image
and --snap options work as expected for rbd unmap <image-name> case.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-04-19 14:45:37 +03:00
Ilya Dryomov
087ed06340 krbd: add krbd_unmap_by_spec()
Make unmapping by (pool, image, snap) spec possible.  For specs mapped
multiple times unmap one device per krbd_unmap_by_spec() call.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-04-19 14:41:53 +03:00
Ilya Dryomov
a1363c41f2 krbd: rename should_match_minor() to have_minor_attr()
Rename and clarify why simply checking kernel version doesn't work.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-04-19 14:41:53 +03:00