crush: revise JSON format for 'item' type

Commit a7e9a7b648 changed the JSON format of CRUSH rules
such that the 'item' attribute on a step was sometimes
an integer and sometimes a string.

This commit separates the integer and string representations
so that tools which rely on a 'item' consistently being an
integer ID will work.

Signed-off-by: John Spray <john.spray@inktank.com>
Merge pull request #1373 from ceph/wip-crush-json

crush: revise JSON format for 'item' type

Reviewed-by: Sage Weil <sage@inktank.com>
mon/PGMap: return empty stats if pool is not in sum

Greg was right!

When a pool is created, the PGs are not added to the PGMap until the *next*
proposal.  Weaken the assert here and return empty stats for non-existent
(new) pools so that a pool create + tier add sequence does not crash.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1375 from ceph/wip-pgmap-stat

mon/PGMap: return empty stats if pool is not in sum

Reviewed-by: Greg Farnum <greg@inktank.com>
test: Fix tiering test cases to use ---force-nonempty

Fixes: #7608

Signed-off-by: David Zafman <david.zafman@inktank.com>
Merge pull request #1376 from ceph/wip-7608

test: Fix tiering test cases to use ---force-nonempty

Reviewed-by: Sage Weil <sage@inktank.com>
FileStore::_collection_move_rename: propogate EEXIST

Previously, an EEXIST would get masked by the subsequent clone
operation.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGBackend::rollback_stash: remove the correct shard

Fixes: #7616
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge remote-tracking branch 'upstream/wip-7607' into wip-sam-testing
Merge remote-tracking branch 'upstream/wip-7616' into wip-sam-testing