Commit Graph

27949 Commits

Author SHA1 Message Date
Sage Weil
84b41987ad Merge pull request #459 from ceph/unused-spinlock
log: remove unused lock

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 21:01:39 -07:00
Noah Watkins
88f4a962e1 log: remove unused lock
m_lock is initialized and destroyed, but never used.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-07-22 19:54:37 -07:00
Sage Weil
2c5b68c383 Merge remote-tracking branch 'gh/next'
Conflicts:
	PendingReleaseNotes
2013-07-22 18:46:23 -07:00
Sage Weil
9626f77f09 Merge pull request #457 from ceph/wip-paxos
paxos fixes

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-22 18:28:54 -07:00
Sage Weil
093182b796 osd/ReplicatedPG: drop repop refs in ~SnapTrimmer
This fixes a leak on shutdown.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-22 17:19:31 -07:00
Samuel Just
6582b31abc FileStore: disable fd cacher and wbthrottle during replay
The fd cache only works correctly when there is at most 1
inode per hobject_t.  This condition is frequently violated
during replay.

Fixes: #5699
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 15:10:46 -07:00
Samuel Just
2fd4421707 PGLog::merge_log, unidex() only works from tail, we index() below anyway
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 15:06:10 -07:00
Samuel Just
6957dbc75c PGLog::rewind_divergent_log: unindex only works from tail, index() instead
Fixes: #5714
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 15:06:02 -07:00
Samuel Just
046d5cb6db src/test/osd/TestPGLog.cc: check that the object remains in log.objects
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 15:05:52 -07:00
Yehuda Sadeh
1ecdb14937 rgw: swift, in create bucket set location_constraints
For swift we're setting the location constraint to be the
current region we're in when creating a bucket.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-07-22 14:25:04 -07:00
Yehuda Sadeh
8a2eb18494 rgw: translate swift request to s3 when forwarding
When forwarding a swift request to a different region, we
need to use the effective uri, and not just send the one
we got since we use S3 authentication for the forwarded
requests. This is achieved through a new using 'effective_uri'
param on the request info (which in swift ponts to the
plain bucket/object uri without the swift/v1 prefix(.
Also, rename the old req_state::effective_uri to relative_uri
in order to prevent confusion.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-07-22 14:24:53 -07:00
Sage Weil
3f95f9a45e Merge remote-tracking branch 'gh/wip-5624-b' into next
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-07-22 14:47:18 -07:00
Gregory Farnum
c7edf03691 Merge pull request #458 from ceph/wip-5693
Wip 5693
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-07-22 14:37:29 -07:00
Yehuda Sadeh
165b0d0a9c PendingReleaseNotes: update about new rgw copy obj response
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-22 14:44:39 -07:00
Yehuda Sadeh
9f05db6b55 rgw: add some comments
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-22 14:44:39 -07:00
Yehuda Sadeh
c5025d4ad4 rgw: dump progress through swift object copy
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-22 14:44:39 -07:00
Yehuda Sadeh
6094685e4f rgw: send data back when copying object
Currently doing it only when copying between regions. This is
needed so that the operation doesn't time out (as it can take
a long time and the web server may just hang on us since we're
not sending any data).
This is configurable and can be disabled. Currently only implemented
for S3.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-22 14:44:33 -07:00
Sage Weil
cfe1395f47 mon/Paxos: add failure injection points
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 14:13:25 -07:00
Sage Weil
20baf66211 mon/Paxos: fix pn for uncommitted value during collect/last phase
During the collect/last exchange, peers share any uncommitted values
with the leader.  They are supposed to also share the pn under which
that value was accepted, but were instead using the just-accepted pn
value.  This effectively meant that we *always* took the uncommitted
value; if there were multiples, which one we accepted depended on what
order the LAST messages arrived, not which pn the values were generated
under.

The specific failure sequence I observed:

 - collect
  - learned uncommitted value for 262 from myself
  - send collect with pn 901
 - got last with pn 901 (incorrect) for 200 (old) from peer
  - discard our own value, remember the other
 - finish collect phase
  - ignore old uncommitted value

Fix this by storing a pending_v and pending_pn value whenever we accept
a value.  Use this to send an appropriate pn value in the LAST reply
so that the leader can make it's decision about which uncommitted value
to accept based on accurate information.  Also use it when we learn
the uncommitted value from ourselves.

We could probably be more clever about storing less information here,
for example by omitting pending_v and clearing pending_pn at the
appropriate point, but that would be more fragile.  Similarly, we could
store a pn for *every* commit if we wanted to lay some groundwork for
having multiple uncommitted proposals in flight, but I don't want to
speculate about what is necessary or sufficient for a correct solution
there.

Fixes: #5698
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 14:13:25 -07:00
Sage Weil
19b2978896 mon/Paxos: debug ignored uncommitted values
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 14:13:24 -07:00
Sage Weil
b3253a453c mon/Paxos: only learn uncommitted value if it is in the future
If an older peer sends an uncommitted value, make sure we only take it
if it is in the future, and at least as new as any current uncommitted
value.

(Prior to the previous patch, peers could send values from long-past
rounds.  The pn values are also bogus.)

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 14:13:24 -07:00
Sage Weil
b26b7f6e5e mon/Paxos: only share uncommitted value if it is next
We may have an uncommitted value from our perspective (it is our lc + 1)
when the collector has a much larger lc (because we have been out for
the last few rounds).  Only share an uncommitted value if it is in fact
the next value.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 14:13:23 -07:00
Sage Weil
99e605455f mon/Paxos: accepted_pn_from has no semantic meaning
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 14:12:51 -07:00
Sage Weil
a61635e852 ceph-monstore-tool: dump paxos transactions
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 14:12:51 -07:00
Dan Mick
e60d14d97d ceph.in: reject --admin-daemon so it can't do harm
Fixes: #3944
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-22 13:12:33 -07:00
Gary Lowell
835dd97301 v0.67-rc1 2013-07-22 11:57:27 -07:00
Noah Watkins
58c78dbaf3 FileJournal: fix posix_fallocate error handling
From the man page for posix_fallocate:

    posix_fallocate() returns zero on success, or an error
    number on failure.  Note that errno is not set.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 11:43:01 -07:00
Samuel Just
0897d3a820 OSD::_make_pg: use createmap, not osdmap
The osd lock is not held at this point, we must use
the createmap passed in.

Fixes: #5656
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 11:11:08 -07:00
Samuel Just
2dbb273d13 src/*: make Context::finish private and switch all users to use complete
Signed-off-by: Samuel Just <sam.just@inktank.com>
Fixes: Sage Weil <sage@inktank.com>
2013-07-22 10:33:40 -07:00
Samuel Just
e71808f696 Merge remote-tracking branch 'upstream/next' 2013-07-22 10:32:47 -07:00
Samuel Just
d28c18da9d OSD::RemoveWQ: do not apply_transaction while blocking _try_resurrect_pg
Some callbacks take the osd lock, so we need to avoid blocking an
osd lock holding thread while waiting on a filestore callback.
Instead, just queue the transaction, and allow _try_resurrect_pg
to cancel us while we are waiting for the transaction to go through
(CLEARING_WAITING).

Fixes: #5672
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 10:31:31 -07:00
Samuel Just
6c4cd22e60 FileStore: use complete() instead of finish() and delete
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 10:31:19 -07:00
Samuel Just
9f591a630d Finisher: use complete() not finish() and delete
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 10:31:12 -07:00
Samuel Just
8536ff9a43 common/Cond.h: add a simpler C_SaferCond Context
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 10:31:02 -07:00
Yehuda Sadeh
20bc09c668 rgw: read attributes when reading bucket entry point
Fixes: #5691

We need to also read the attributes, as bucket might be a legacy
bucket and might have all bucket instance info in that object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Tested-by: Faidon Liambotis <faidon@wikimedia.org>
2013-07-22 10:11:13 -07:00
Gary Lowell
eabf2f6ae1 ceph.spec.in: Obsolete ceph-libs
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 09:52:19 -07:00
Sage Weil
e58b0e9320 Merge remote-tracking branch 'gh/wip-mon-caps' into next
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-22 09:27:35 -07:00
Danny Al-Gaaf
db2850c532 test_cls_statelog.cc: fix resource leak, delete 'rop' at end of function
CID 1049213 (#3 of 3): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 17:19:29 +02:00
Danny Al-Gaaf
5f4f87b00e test_cls_statelog.cc: fix resource leak, delete op at end of function
CID 1049214 (#13 of 13): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "op" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 14:35:03 +02:00
Danny Al-Gaaf
fc1c1c6fdc test_cls_statelog.cc: fix resource leak, delete rop at end of function
CID 1049215 (#12 of 12): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 12:58:28 +02:00
Danny Al-Gaaf
8e8596d201 test_cls_version.cc: fix resource leak, delete before new()
Fix some more cases where resource wasn't deleted/freed before
call new().

CID 1049216 (#1-9 of 9): Resource leak (RESOURCE_LEAK)
  overwrite_var: Overwriting "op" in "op = new_op()" leaks
  the storage that "op" points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 12:58:28 +02:00
Danny Al-Gaaf
3e94393000 test_cls_version.cc: fix resource leak, delete before new()
CID 1049217 (#1 of 1): Resource leak (RESOURCE_LEAK)
  overwrite_var: Overwriting "op" in "op = new_op()" leaks
  the storage that "op" points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 12:58:28 +02:00
Danny Al-Gaaf
d3782d80d5 test_cls_version.cc: fix another ressource leak
CID 1049219 (#17 of 17): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "op" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 12:58:28 +02:00
Danny Al-Gaaf
c35eeae3c2 test_cls_version.cc: fix ressource leak
CID 1049220 (#18 of 18): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks
  the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 12:58:28 +02:00
Danny Al-Gaaf
637e106e70 cls/rgw/cls_rgw.cc: init start_key_added with false
Fix for coverity issue:

CID 1049231 (#1 of 1): Uninitialized scalar variable (UNINIT)
  uninit_use: Using uninitialized value "start_key_added".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-22 12:58:28 +02:00
Sage Weil
da2cb0901d Merge pull request #453 from dalgaaf/wip-da-SCA-cppcheck-7
Fix SCA and CID issues

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-21 21:42:07 -07:00
Sage Weil
c456390158 Merge pull request #451 from dalgaaf/wip-da-SCA-cppcheck-6-v2
Fix some issues from SCA - v2 - against ceph:next

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-21 21:40:22 -07:00
Noah Watkins
3846bf2f1a fuse: fix fuse_getgroups detection
The ac_check_func fails because -lfuse is not in LIBS. This also enables
code that wasn't being compiled, and fixes compiler errors that
resulted.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-21 20:00:28 -07:00
John Wilkins
6402e4618d doc: Fixed formatting errors.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-07-20 13:10:54 -07:00
John Wilkins
eb03e9da33 doc: Updated RPM documentation with additional details.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-07-20 12:26:14 -07:00