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: 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>
doc: erasure coded pool developer documentation

With a structure similar to doc/dev/cache-pool.rst

http://tracker.ceph.com/issues/7548 refs #7548

Signed-off-by: Loic Dachary <loic@dachary.org>
doc: update the operator create pool reference

Include erasure code information. A choice is made to display properties
that should be documented as part of the erasure code plugin
interface (erasure-code-k for instance). However, there only is one
plugin at the moment. Furthermore, erasure-code-k and erasure-code-m are
the two properties that the system administrator will want to tweak when
playing with erasure coded pools for the first time. It is probably
better to document them in a very visible place for this reason.

http://tracker.ceph.com/issues/7548 refs #7548

Signed-off-by: Loic Dachary <loic@dachary.org>
1. simplified the 'bytes' info to just be bytes
2. prefix all the members of the components_info with 'num_'

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
1. Removed name of the pool from pool_metadata
2. Included pool type in pool_metadata
3. Renamed rep_size attribute to size in pool_metadata

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Made crush_types to be a map of type to count, so we can tell how many racks/rows/hosts/etc are there

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Removed nw_info from sysinfo

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
osd: Add hit_set_flushing to track current flushes and prevent races

When flushing a HitSet track in hit_set_flushing map so that
agent_load_hit_sets() doesn't try to read it too soon.

Fixes: #7575

Signed-off-by: David Zafman <david.zafman@inktank.com>
mon: OSDMonitor: don't remove unamanaged snaps from not-unmanaged pools

Although we should allow creating unmanaged snaps on not-unamanaged pools,
as long as those pools don't have any managed snapshots in them, we cannot
allow removal -- because the pool will not have any unmanaged snapshots.

Fixes: 7210

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunits/mon/rbd_snaps_ops.sh: ENOTSUP on snap rm from copied pool

'rados cppool' copies the contents but that doesn't make the destination
pool an unmanaged snaps pool.  Therefore, we must get an ENOTSUP when
we try to remove an unmanaged snap from a not-unmanaged pool.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
tools/rados/rados.cc: use write_full for sync_write for ec pools

Fixes: #7650
Signed-off-by: Samuel Just <sam.just@inktank.com>
mon/OSDMonitor: prevent set primary-affinity unless all OSDs support it

Make sure all running OSDs support the feature before we start using it
(even if the config option is on!).

Fixes: #7642
Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: make osdmap feature checks non-racy

The check for OSD features may race with the boot of an OSD that does not
have the necessary features.  Check the pending info too, and if there is
a missing feature, return -EAGAIN.  In the callers, wait on -EAGAIN.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/PGMonitor: improve debugging on PGMap updates slightly

Chasing #7652
Signed-off-by: Sage Weil <sage@inktank.com>
mon/PGMap: send pg create messages to primary, not acting[0]

For erasure pools, these may not match.

In the case of #7652, this caused pg_create messages to be send
indefinitely.  register_pg() added it to the list for acting_primary, and
when we got the (non-creating) pg stat update we removed it from the list
for acting[0].

Fixes: #7652
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1404 from ceph/wip-7652

mon: fix infininte pg create msgs for erasure pools

Reviewed-by: Samuel Just <sam.just@inktank.com>
mon/OSDMonitor: feature feature check bit arithmetic

Make sure all features are present (instead of just any of them).

Signed-off-by: Sage Weil <sage@inktank.com>