Commit Graph

39497 Commits

Author SHA1 Message Date
Sage Weil
8ee43796c5 Merge pull request #3689 from athanatos/wip-10771
ReplicatedPG::eval_repop: check waiting_for_* even if !m

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-10 17:33:18 -08:00
Sage Weil
a6035aee32 Merge branch 'wip-7701' of git://github.com/xinxinsh/ceph into hammer
Conflicts:
	src/osd/osd_types.h
2015-02-10 17:19:44 -08:00
Josh Durgin
e01c93df9e objecter: clarify a few lock assertions
These are always called with the rwlock locked for write.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-02-10 16:36:39 -08:00
Ken Dreyer
7df0556210 Merge branch 'dachary-wip-10728-fedora-junit'
ceph.spec.in: junit always except for EPEL 6

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-02-10 16:47:51 -07:00
Josh Durgin
a60d5fab0b objecter: remove dead race handling code
The only caller of _get_osd_session() holds rwlock for write, so
_get_session() cannot race. The only caller of _get_session() which
may possibly race is _op_submit(), which handles the race more simply
inline.

Call _get_session() inline in place of _get_osd_session(), and remove
the unused functions _get_osd_session() and
_promote_lock_check_race().

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-02-10 15:42:26 -08:00
Josh Durgin
1b2da9b949 objecter: remove dead _get_op_target_session() method
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-02-10 15:28:15 -08:00
Loic Dachary
4f36eaee9e ceph.spec.in: junit always except for EPEL 6
The package was renamed a long time ago (around the Fedora 15
timeframe). The "junit4" name is only relevant for EPEL 6. For EPEL 7
and Fedora 20, the "junit" package has "Provides: junit4". And most
recently, in the junit package that ships in Fedora 21 and 22, the
package maintainer dropped the old Provides: line.

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

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-11 00:02:28 +01:00
Greg Farnum
9656018592 MDSMonitor: do not allow MDS to transition from STATE_STOPPING
They can only go into STATE_STOPPED. I was a little concerned
that some of the rejoin code might inadvertently allow a stopping
MDS to end up active, but after a little auditing it looks like
that all behaves properly and this is an invariant we maintain.

Fixes: #10791

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-02-10 14:18:52 -08:00
Dmytro Iurchenko
6898f0b27f rgw: Swift API. The second way of specifying desirable response format.
OpenStack Object Storage API v1 defines two ways for the client to tell which response format it understands.
Until now RGW looked at query variable 'format' only. This commit implements the second way of setting the format by
providing 'Accept' HTTP-header with the desirable response mime-type.

Backport: hammer
Fixes: #10746

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
2015-02-10 14:07:40 -08:00
Josh Durgin
8cd480d0d2 Merge pull request #3682 from ceph/wip-10719
Wip 10719

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-10 13:36:23 -08:00
Sage Weil
46fcef5dcb Merge pull request #3680 from ceph/wip-10827
osdc/Objecter: linger_register now acquires rwlock

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-10 13:00:26 -08:00
Yehuda Sadeh
e504003aad rgw: remove multipart entries for bucket index when aborting
Fixes #10719

Since we now let the gc clean the aborter multipart uploads, we need to
clear the multipart entries from the bucket index when cleaning up the
meta object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-02-10 12:41:20 -08:00
Yehuda Sadeh
3e54acbc20 rgw: encode rgw_obj::orig_obj
We weren't encoding orig_obj, however, it's now needed so that we can
call get_index_key() on decoded objects. Only encode/decode it if ns or
instance are not empty.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-02-10 12:41:19 -08:00
Sage Weil
a0deb5561b Merge pull request #3672 from ceph/wip-old-gcc
fix build and warnings on older gcc

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2015-02-10 12:38:45 -08:00
Yehuda Sadeh
744f48e1cf Merge branch 'wip-diurchenko-master' into hammer
Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-02-10 09:44:08 -08:00
Dmytro Iurchenko
f67bfa24fd rgw: Swift API. Support for X-Remove-Container-Meta-{key} header.
Fixes: #10475
Backport: hammer, firefly
Reported-by: Josh Durgin <jdurgin@redhat.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
2015-02-10 09:18:01 -08:00
Dmytro Iurchenko
cdfc23f0e2 rgw: fix doc, A typo in command line argument name
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
2015-02-10 09:18:01 -08:00
Dmytro Iurchenko
2f8d31e9b1 rgw: Swift API. Dump container's custom metadata.
Fixes: #10665
Backport: hammer, firefly
Reported-by: Ahmad Faheem <ahmad.faheem@ril.com>
Signed-off-by: Dmytro Iurchenko <diurchenko@mirantis.com>
2015-02-10 09:18:01 -08:00
Loic Dachary
6d91ae1553 Merge pull request #3525 from qiushanggao/master
Fix bug: When run Test_filejournal  testcase with gtest argument, all of testcases is failed.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-02-10 13:43:31 +01:00
Jianpeng Ma
90d0f0d24f rados: add 'watch/notify' in rados --help command.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-02-10 20:36:10 +08:00
Jianpeng Ma
b623c4296a rados: Using readable format to print object mtime when call 'stat obj'.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2015-02-10 20:34:22 +08:00
Loic Dachary
c8963adead Merge pull request #3677 from tchaikov/fix-sign-unsigned-comparison-warnings
erasure-code: fix compilation warnings

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-02-10 11:59:52 +01:00
qiushanggao
d3fc5bd803 Fix bug: When run Test_filejournal testcase with gtest argument, all of testcases is failed.
when run testcase with gtest argument, for example, with argument --gtest_output=xml:/root/reports/ceph_test_cls_version.xml,
then the test result is failed, because of the test program use the first argument as the journal file name.
Signed-off-by: shanggao qiu <qiushanggao@qq.com>
2015-02-10 18:36:15 +08:00
Kefu Chai
93f32f0647 erasure-code: fix compilation warnings
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-02-10 18:27:22 +08:00
Kefu Chai
01e154d592 osd: fix PG leak in SnapTrimWQ._clear()
Fixes: #10421
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-02-10 16:31:20 +08:00
Loic Dachary
d1c7bed983 Merge pull request #3673 from tchaikov/cosmetic-init-with-false-no-0
osd/PG.c: use boolean to init `bool` variables

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-02-10 09:21:41 +01:00
Greg Farnum
a850514838 fsync-tester: print info about PATH and locations of lsof lookup
We're seeing the lsof invocation fail (as not found) in testing and nobody can
identify why. Since attempting to reproduce the issue has not worked, this
patch will gather data from a genuinely in-vitro location.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-02-09 22:30:24 -08:00
Greg Farnum
b14ca1fe86 test_libcephfs: test we can't set layouts on existing files
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-02-09 22:18:31 -08:00
Josh Durgin
36d37aadbb rados.py: keep reference to python callbacks
If we don't keep a reference to these, the librados aio calls will
segfault since the python-level callbacks will have been garbage
collected. Passing them to aio_create_completion() does not take a
reference to them. Keep a reference in the python Completion object
associated with the request, since they need the same lifetime.

This fixes a regression from 60b019f69a.

Fixes: #10775
Backport: dumpling, firefly, giant
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-02-09 20:53:42 -08:00
Samuel Just
7002f934e6 ShardedThreadPool: make wait timeout on empty queue configurable
Fixes: 10818
Backport: giant
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-02-09 18:55:01 -08:00
Kefu Chai
32d761751d osd/PG.c: use boolean to init bool variables
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-02-10 10:47:24 +08:00
Samuel Just
5aa6f91084 WorkQueue: make wait timeout on empty queue configurable
Fixes: 10817
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-02-09 18:30:35 -08:00
xinxin shu
a3b158311a add tests for ceph pg ls-by-pool
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-02-10 08:11:25 +08:00
xinxin shu
25d983739e add CLI ceph pg ls-by-pool
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-02-10 08:11:25 +08:00
xinxin shu
6ccced2415 add tests for ceph pg ls-by-osd
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-02-10 08:11:25 +08:00
xinxin shu
39e264013e add CLI ceph pg ls-by-osd
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-02-10 08:11:25 +08:00
xinxin shu
742c5e8b2d add tests for ceph pg ls-by-primary
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-02-10 08:11:25 +08:00
xinxin shu
f8142628c1 fix error : ceph pg ls 0
no valid command found; 10 closest matches:
pg ls-by-primary <osdname (id|osd.id)> {<int>} {active|clean|down|replay|splitting|scrubbing|scrubq|degraded|inconsistent|peering|repair|recovery|backfill_wait|incomplete|stale|remapped|deep_scrub|backfill|backfill_toofull|recovery_wait|undersized [active|clean|down|replay|splitting|scrubbing|scrubq|degraded|inconsistent|peering|repair|recovery|backfill_wait|incomplete|stale|remapped|deep_scrub|backfill|backfill_toofull|recovery_wait|undersized...]}
Error EINVAL: invalid command

this is due to partial compare of prefix

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-02-10 08:11:04 +08:00
Josh Durgin
203c06da6d locally disable pragma warnings on gcc < 4.6
diagnostic push|pop are not present before 4.6, so each use gives a
warning. Temporarily ignore these by disabling/reenabling -Wpragmas.
Note that this means the other disabled warnings are not scoped on
old gcc. I don't think this is worth fixing, since newer gcc will
respect the scope and show us the warnings outside of it.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-02-09 15:48:15 -08:00
Josh Durgin
93629d3d4c Pipe: conditionally compile IPTOS setting
This doesn't exist on older platforms.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-02-09 14:55:15 -08:00
Jason Dillaman
b025fbfa22 librbd: consolidate all async operation flush logic
librbd has three different methods for flushing asynchronous
operations. These have all been consolidated down to a single,
shared method to fix an existing issue and simplify maintenance
going forward.

Fixes: #10783
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-09 14:40:25 -08:00
Jason Dillaman
0a00be286d xlist: added missing include
The xlist header references NULL without including
the header which defines it.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-09 14:40:14 -08:00
Samuel Just
78b1fb5e94 ReplicatedPG::eval_repop: check waiting_for_* even if !m
There can be client ops waiting on a promote now.

Fixes: 10771
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-02-09 09:17:44 -08:00
Loic Dachary
0f731ba790 Merge pull request #3602 from dachary/wip-10730-fedora-docker
tests: add Dockerfile for fedora

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-09 15:20:43 +01:00
Loic Dachary
0f0fd0c54c Merge pull request #3656 from dachary/wip-osd-scrub-repair
tests: run osd-scrub-repair.sh with make check

Reviewed-by: Sebastien Ponce <Sebastien.Ponce@cern.ch>
2015-02-09 15:18:57 +01:00
Sage Weil
d757f8e7eb Merge pull request #3631 from liewegas/wip-mon-dup-down
mon: fix unnecessary osd mark down

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
2015-02-08 22:35:39 -08:00
Sage Weil
f08e163776 Merge pull request #3605 from ceph/wip-da-SCA-20150129
Various SCA and smaller bugfixes

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-08 22:27:02 -08:00
Sage Weil
918b378493 mon: have two COMMAND two COMMAND_WITH_FLAG macros
This avoids 2 separate calls to define each item and keeps the blame
info intact.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-02-08 22:13:29 -08:00
Mykola Golub
7920db3da9 tests: make ceph_watch_wait output watchfile content on failure
It should help in troubleshooting remote test failures.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-02-08 22:12:55 -08:00
Mykola Golub
ac9d75c471 mon: noforward flag for commands that are not supposed to be forwarded
For not a monitor leader, if a received command is not supported
locally, but is supported by the leader, it is forwarded to the
leader.

For some commands that may have undesirable behaviour. E.g. for the
recently added "ceph tell mon.x version", if the mon.x is not a leader
and does not support "version" command yet, but the leader does, the
user will receive the version of the leader, and can't be actually
sure about a non leader version.

Fix this by adding noforward flag to commands that are not supposed to
be forwarded. Set the flag for "version" command. Although there are
other non-forwardable commands (like injectargs) it is not necessary
to add the flag to them, as the commands are too old to suffer from
the describe problem.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-02-08 22:12:55 -08:00