include/ceph_features: add CEPH_FEATURES_OSD_ERASURE_CODES

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSD: add binary compat feature for Erasure Codes

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSDMap: check for erasure pools when getting features

If we have a pool with type Erasure, then we consider we require
CEPH_FEATURE_OSD_ERASURE_CODES.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSDMap: add 'features' bit mask field to osd_xinfo_t

And make sure we dump it on osd_xinfo_t::dump().

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: OSDMonitor: handle osd features on boot

Add the osd's features to the osd's extra info field in the OSDMap
so we can track which OSDs are able to deal with Erasure Codes.

This will allow us to decide whether or not we are ready to set EC
whenever the user asks us to set EC on a pool -- which shall be
handled by a subsequent commit.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSD: reflect OSDMap EC flag being set by setting on-disk feature

If OSDMap has the EC feature set, then update our superblock to
reflect as such, making our on-disk format incompatible with previous
OSDs without EC support.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
ceph_osd: share supported features on messenger

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: OSDMap: add 'get_up_osds()' function

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: OSDMonitor: add optional 'pool type' arg to 'osd pool create'

Allow specifying 'rep', 'raid4' and 'erasure'.
Only allow setting type 'erasure' if all up osds support erasure codes.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
pybind: test_ceph_argparse: test 'ceph osd pool create' with pool type

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunit: cephtool: test osd pool create with erasure type

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>