include/ceph_features: add CEPH_FEATURES_OSD_ERASURE_CODES

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: osd_types: add ERASURE CODES flag to pg_pool_t

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 codes on pools when getting features

If we have a pool with Erasure Coding set, 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

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
messages: MOSDBoot: add 'features' field

Have the OSD share its features when sending an MOSDBoot message.

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

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>
osd: OSDMonitor: add 'pool set FOO erasure-codes true|false' command

And make sure we don't allow setting EC on a pool if all up OSDs do
not support it.

Fixes: 6028

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa: workunits: cephtool: add tests for 'osd pool set foo erasure-codes'

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
test: pybind: test_ceph_argparse: add 'erasure-codes' to 'osd pool set' test

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>