Commit Graph

20894 Commits

Author SHA1 Message Date
Sage Weil
614417ef26 mon: make 'clocks too skewed' message for accurate
It could be that the mons are laggy, not skewed.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-15 11:14:11 -07:00
Sage Weil
36d6c4f4c8 Merge branch 'next' 2012-08-14 16:54:17 -07:00
Sage Weil
119880ca14 Merge branch 'testing' into next 2012-08-14 16:53:48 -07:00
Sage Weil
24a26c6274 mkcephfs: fix mon_data check
* check the right path <facepalm>
* behave if the directory doesn't exist at all yet

Fixes: #2922
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 16:53:34 -07:00
Sage Weil
bcd00c6560 Merge branch 'wip-2918'
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2012-08-14 16:17:48 -07:00
Sage Weil
3d3d91df47 osdmap: apply mon_max_osd when generating osdmap from conf
This prevents users from having an [osd.1234567] section and blowing up
their memory usage.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 16:06:55 -07:00
Sage Weil
1a5e12ec5f osdmap: fix pg_num calculation when generating osdmap from conf
Base num_pg calculation on the number of osds, not the max osd id.

Fixes: #2918
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 16:06:54 -07:00
Sage Weil
cca85af5b0 global: only print banner if type is daemon
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:59:36 -07:00
Sage Weil
615f85d088 mon: throttle daemon messages independently from client messages
This lets us set a higher limit on messages from daemons (osd, mds) than
from clients, and throttle them independently.

Fixes: #2942
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 15:07:06 -07:00
Sage Weil
9fc7958472 filejournal: instrument journal write counts, sizes
This rounds out the low-hanging fruit that are coming to mind.  Moving on.

Fixes: #2619
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:45:27 -07:00
Sage Weil
2f3e03f605 perfcounters: add u64 average type
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:45:27 -07:00
Sage Weil
1eea43db19 global: fix version banner in log on startup
Log banner from global_init().  This puts it at the very top of the log,
right when the daemon starts.

Fixes: #2940
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:06:47 -07:00
Sage Weil
efe913b886 Merge branch 'wip-crush-tunables'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-14 13:13:03 -07:00
Sage Weil
326712764b doc: document use of CRUSH tunables
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 13:11:15 -07:00
Sage Weil
b254ba7813 mon: require CRUSH_TUNABLES when latest osdmap has tunables set
This is an imperfect check in that tunables may be set in past osdmaps,
and the OSDs may need that in order to peer correctly.  However, in the
general case, this will catch most users.  In particular, it will catch

 - set tunables
 - nothing works (osds or clients lack feature)
 - reset/clear tunables
 - things recover

But not

 - set tunables
 - osds have feature, behave
 - new osds with old code added, lack feature
 - remove tunables
 - new osds may fail to peer properly because they lack the feature

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:42:37 -07:00
Sage Weil
3dd5ebdc26 osd: require CRUSH_TUNABLES feature of peers, clients when used
If the current crush map has non-default tunables, set our messengers to
require the tunables feature bit.  If it does not, clear the bit.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:42:37 -07:00
Sage Weil
43f7d3744f osd: put throttler on default policy
Before we were associating the throttler with a CLIENT specific policy
that didn't cover MDS.  That's silly.  Instead, associate the throttler
with the default policy (which is now possible).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:42:37 -07:00
Sage Weil
da35b4c207 msgr: make set_policy_throttler safe, act on default
Add locking in set_policy_throttler.

Also, make it act on the default policy when the specified type does not
have a sepcific policy set for it.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:42:37 -07:00
Sage Weil
73218a7a65 msgr: make set_policy() and set_default_policy() safe to re-use
Introduce a policy_lock in SimpleMessenger to make this safe even after
the messenger has been started up.  The user needs to be aware that
policy changes will not affect connections that are already established.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:42:37 -07:00
Sage Weil
5ab4939c36 doc: v0.48.1argonaut release notes, changelog
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:06:16 -07:00
Sage Weil
4e7d49e0c6 Merge branch 'wip-msgr' 2012-08-13 13:34:29 -07:00
Sage Weil
75172c70ab msg/Accepter: fix nonce initialization
This needs to be provided to the Accepter at bind time, not by start().
Otherwise the nonce is effectively always 0, which is useless and breaks
all sorts of things.  Broken by 8453a8198c.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 13:28:42 -07:00
Dan Mick
294c25bb37 ceph-osd: log journal-creation failure with derr
Fixes: #2938
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-13 11:46:48 -07:00
Sage Weil
8af2cf3ca0 msgr: expose get_policy() through generic Messenger API
Return a copy instead of a const reference, too...

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 11:03:50 -07:00
Sage Weil
1740bd0c8a crush: add helper has_nondefault_tunables()
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 11:03:50 -07:00
Sage Weil
95ecab27cb Merge branch 'wip-msgr' 2012-08-13 09:58:49 -07:00
Sage Weil
c8af0faf15 cephtool: make command wait for osdmap explicit
If we are waiting for an osdmap for a command, track that explicitly so
that we know when to retry send_command().

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 09:58:22 -07:00
Sage Weil
a4428bd0e1 v0.50 2012-08-13 09:49:24 -07:00
Sage Weil
c75c0d8127 v0.50
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQKTBXAAoJEH6/3V0X7TFtVMkP/iFUDiUyJrsr6nxukR9saroe
 i2j2RHzjClY1M1DRYuk4YZ2BljQEVb5rkjGVxXT+LuXK9OOAEbdpSy5EtP3ArHzZ
 VWIdcyac+gMlTxgP5LN2dgPDWBtaEq3PMJex43UViLDz7l5uRHrAnhSMBNw1o+9H
 BwEOF16ZgZl+qQBj1aPakYFl0WqGAzzLtjzvA2Is5kJhffA5JmLDfm7eOrTY2h3n
 +0rGjpam77BJNOze0VGUbQe9PLRg+G4eHYfVJ+KvDS1hBUIH3izOuPWO5u9ThgKM
 OM7clwwKXu3xGxzS4g36bqA+3xCnw+e7Yw+71ne87Ai7hlVAJ0y+q4RdaOBqAeWB
 3OMuz73Dq0c4CsZw5Ot3sGJUoyqqw/fBtfzbMdaBv70Ax28ZGZnHxij0F5uDz4kk
 +X7sxouAsk7GkEtxTZQoGBkRhJoZBwxQBIW698u1wGSJQYHr+8aa+o1eHukloTrc
 L7K1C+YuWQWechK5nRNFEU5hPjcv+beL2ndUZeSJj8ri62qhHPAEi66rh1YJOOq9
 cZRQr99hdfM4tNYLUh3eO3LM6TbBNFmlPwDCse35I70mqTh9ccT9WH0Wj95PIFBD
 rmuXXXwNFTuV/mhUpSUpCaDsEIi4ywfdRYn4jX7iY3z9y2zuhWZSatW4fdvXC0G+
 J91BjPKWdjl9nvBtPJUP
 =dUVd
 -----END PGP SIGNATURE-----

Merge tag 'v0.50'

v0.50
2012-08-13 09:48:49 -07:00
Sage Weil
ac02b34ed8 msg/Pipe: discard_queue() -> discard_out_queue()
We only discard outgoing messages; incoming messages are handled by the
IncomingQueue.. but this method doesn't touch that.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:15 -07:00
Sage Weil
d58df35f88 msg/Pipe: simplify Pipe::tcp_read() return value
0 for success; no reason to return length (always == len).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
76954c13c1 msg/Pipe: document tcp_*()
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
5d5045d31a msg/Accepter: use learned_addr() from Accepter::bind()
Normally we never go from need_addr == false to need_addr == true.
It always starts out as true, so this else is useless on the first
call to Accepter::bind().

The only exception is rebind().  Add an unlearn_addr() that will clear
need_addr.  This is almost unnecessary, but doing so fixes a small bug
where the local_connection->peer_addr doesn't get updated when we do a
rebind().

Drop now-unused set_need_addr().  We keep get_need_addr() only because
it is useful in the debug output and for the assert.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
1b8f2e0599 msg/SimpleMessenger: push need_addr check into learned_addr()
This puts all of the do/do not lock logic in one place, and documents
it.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
8453a8198c msg/Accepter: pass nonce on start
This lets us drop the otherwise awkward SimpleMessenger::get_nonce()
accessor.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
a0017fcc25 msgr: protect set_myaddr()
This is used by Messenger implementation (and their constituent
components).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
c84b7289c1 msg/Accepter: make members private
Nobody uses these.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
608c776bf9 msgr: remove useless SimpleMessenger::msgr
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
b97f6e3544 msgr: some SimpleMessenger docs
Document basic modules and the lock ordering.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
8c1632ba50 cephtool: send keepalive to tell target
If we 'ceph tell <foo> ...' to a non-monitor, we need to send keepalives to
ensure we detect a tcp drop.  (Not so for monitors; monclient already does
its own keepalive thing.)

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:46:14 -07:00
Sage Weil
90e0ef907f cephtool: retry 'ceph tell <who> ...' command if connection fails
It was easy to reproduce a hang with 'ceph osd tell osd.0 foo' and
messenger failure injection.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:45:48 -07:00
Sage Weil
ee206a52b6 cephtool: set messenger policy
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:45:48 -07:00
Sage Weil
b30ad9a1c9 cephtool: fix deadlock on fault when waiting for osdmap
send_command() was blocking for the osdmap, and also called from the
connect callback.  Instead, re-call it from the handle_osd_map() callback
so that it never blocks.

This was easy to trigger with 'ceph osd tell osd.0 foo' and ms failure
injection.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-13 08:45:48 -07:00
Josh Durgin
ce0bc11aae rbd: show snap protection status
If you do rbd info image@snap, include whether that snapshot is protected.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-12 16:42:42 -07:00
Josh Durgin
98286b499c MonMap: return error on failure in build_initial
If mon_host fails to parse, return an error instead of success.
This avoids failing later on an assert monmap.size() > 0 in the
monmap in MonClient.

Fixes: #2913
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-10 08:59:46 -07:00
Josh Durgin
5c116bf8df addr_parsing: report correct error message
getaddrinfo uses its return code to report failures.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-10 08:59:41 -07:00
Josh Durgin
1fd7acd8d0 rbd: fix test compilation on 32-bit
32-bit can't implicitly convert size_t or unsigned to uint64_t

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 16:41:30 -07:00
Josh Durgin
be6b5e1bc8 test_librbd_fsx: fix warning
fstat was included implicitly before.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 15:12:55 -07:00
Josh Durgin
4d71ca6384 rbd: fix cli tests
add flatten, snap protect, and snap unprotect

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-09 14:53:24 -07:00
Yehuda Sadeh
677934b1c8 rgw: modify some error messages
Make them more correct, clearer.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-09 13:54:15 -07:00