doc: Added documenting Ceph to the toc tree.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added Documenting Ceph (draft) document.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: add-or-rm-mons.rst: better explanation on number of monitors

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
doc: Adding more information on style and usage for documenting Ceph.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Incorporated feedback.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
rgw: set bucket permissions, cors on swift creation

Fixes: #7271
Swift bucket creation was ignoring the x-container-read,
x-container-write and the various cors related headers. Now going
through the same logic that bucket modify goes.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
common: ping existing admin socket before unlink

When a daemon initializes it tries to create an admin socket and unlinks
any pre-existing file, regardless. If such a file is in use, it causes
the existing daemon to loose its admin socket.

The AdminSocketClient::ping is implemented to probe an existing socket,
using the "0" message. The AdminSocket::bind_and_listen function is
modified to call ping() on when it finds existing file. It unlinks the
file only if the ping fails.

http://tracker.ceph.com/issues/7188 fixes: #7188

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #1246 from dachary/wip-7188

common: ping existing admin socket before unlink
ceph_rest_api.py: don't fail if no up OSDs found on startup

allow find_up_osd() to return None, and have caller check for it

Fixes: #7463
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Merge pull request #1261 from ceph/wip-7463

ceph_rest_api.py: don't fail if no up OSDs found on startup

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
rgw: return error if accessing object in non-existent bucket

Fixes: #7064
Instead of trying to access the object, which is impossible as we don't
even have a proper bucket info. Up until now we ended up creating an
empty pool and eventually returning ENOENT, this fix catches the issue
earlier in the process.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: don't try to read bucket's policy if it doesn't exist

It's going to fail anyway, just build a default policy.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
MonClient: pass function parameter by reference

[src/mon/MonClient.h:412]: (performance) Function parameter 'mon_name'
  should be passed by reference.

Changed also parameter name in function implementation to match name
in declaration.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
BarrierContext: reduce scope of 'done' variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
BarrierContext: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Monitor: pass function parameter by reference

[src/mon/Monitor.h:619]: (performance) Function parameter 'param_str_map'
  should be passed by reference.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph_argparse.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Client.cc: use !empty() instead of size()

[src/client/Client.cc:2275]: (performance) Possible inefficient
  checking for 'cap_snaps' emptiness.
[src/client/Client.cc:2458]: (performance) Possible inefficient
  checking for 'cap_snaps' emptiness.
[src/client/Client.cc:2986]: (performance) Possible inefficient
  checking for 'caps' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
str_map.cc: prefer prefix ++operator for non-trivial iterator

[src/common/str_map.cc:55]: (performance) Prefer prefix ++/-- operators
  for non-primitive types.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
common/config.cc: prefer prefix ++operator for non-trivial iterator

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>