Commit Graph

28035 Commits

Author SHA1 Message Date
Dan Mick
2c87d9fc2c mon: PGMap dump shouldn't use strings containing '+' as tags
XML has a problem with tags containing +, like the PG state names.
Use an enclosing array, and name the state and count items explicitly.

Fixes: #5721
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-23 14:04:15 -07:00
Dan Mick
96551f97d8 mon: "status" is missing a close_section for the overall output
Fixes: #5720
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-23 14:04:11 -07:00
Dan Mick
3dcfe386bf mon: "osd stat" needs a flush now that osdmap.print_summary() doesn't
Fixes: #5719
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-23 14:04:05 -07:00
Dan Mick
e4d0eeefa2 mon: "mds stat" must open/close section around dump_info
dump_info() got a new field outside the mdsmap section; it's ok for
the overall "report", but not for "mds stat".  Add an enclosing section
in "mds stat".  Fix test to expect new level.

Fixes: #5718
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-23 14:03:52 -07:00
Danny Al-Gaaf
3a69fd0456 ceph.spec.in: obsolete ceph-libs only on the affected distro
The ceph-libs package existed only on Redhat based distro,
there was e.g. never such a package on SUSE. Therefore: make
sure the 'Obsoletes' is only set on these affected distros.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-23 14:03:52 -07:00
Gary Lowell
82c5e9e057 Merge pull request #461 from dalgaaf/wip-da-fix-spec-obsoletes
ceph.spec.in: obsolete ceph-libs only on the affected distro

Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-07-23 14:00:59 -07:00
Sage Weil
e807770784 mon/OSDMonitor: fix base case for 7fb3804fb workaround
After cluster creation, we have no full map stored and first_committed ==
1.  In that case, there is no need for a full map, since we can get there
from OSDMap() and the incrementals.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao@inktank.com>
2013-07-23 13:32:12 -07:00
Danny Al-Gaaf
e536d66e07 ceph.spec.in: obsolete ceph-libs only on the affected distro
The ceph-libs package existed only on Redhat based distro,
there was e.g. never such a package on SUSE. Therefore: make
sure the 'Obsoletes' is only set on these affected distros.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-23 22:06:47 +02:00
Sage Weil
e0709ef5ed Merge remote-tracking branch 'gh/next' into next 2013-07-23 11:23:24 -07:00
Joao Eduardo Luis
97462a3213 mon: OSDMonitor: work around a full version bug introduced in 7fb3804fb
In 7fb3804fb8 we moved the full version
stashing logic to the encode_trim_extra() function.  However, we forgot
to update the osdmap's 'latest_full' key that should always point to
the latest osdmap full version.  This eventually degenerated in a missing
full version after a trim.  This patch works around this bug by looking
for the latest available full osdmap version in the store and updating
'latest_full' to its proper value.

Related-to: #5704
Backport: cuttlefish

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-23 09:48:51 -07:00
Joao Eduardo Luis
bc8d62fe31 mon: OSDMonitor: get rid of encode_full() as we don't use it.
We have delegated this to encode_trim_extra() since
7fb3804fb8 -- no need to keep this code
around.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-23 09:22:32 -07:00
Joao Eduardo Luis
a815547ed3 mon: OSDMonitor: update the osdmap's latest_full with the new full version
We used to do this on encode_full(), but since [1] we no longer rely on
PaxosService to manage the full maps for us.  And we forgot to write down
the latest_full version to the store, leaving it in a truly outdated state.

[1] - 7fb3804fb8

Fixes: #5704
Backport: cuttlefish
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-23 09:21:48 -07:00
Sage Weil
7b3b989311 qa/workunits/suites/fsync-tester.sh: lsof at end
Trying to track down occasional EBUSY on umount at end of test.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-23 08:43:01 -07:00
Gary Lowell
98816e696b Merge branch 'next' of github.com:ceph/ceph into next 2013-07-22 23:21:33 -07:00
Sage Weil
3f31540448 qa/workunits/rest/test: cluster_down/up are now idempotent
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-22 21:04:01 -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
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
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
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