]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush, mon: bump up map version only if we truly created a weight-set 20178/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 30 Jan 2018 05:38:44 +0000 (13:38 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 31 Jan 2018 01:02:55 +0000 (09:02 +0800)
commit16f0015755c356baa5df8597a1194134cb6bda8b
treea3192ca92ab8a0a755f10635014a0f8b92ea45e7
parent0d4a71ed233741ad268c0953babaa85f40046ece
crush, mon: bump up map version only if we truly created a weight-set

In crush-compat mode mgr/balancer will do 'ceph osd crush weight-set create-compat'
on each call to 'ceph balancer optimize <plan>', which turns out to be
bumping up osdmap version without modifying anything (we haven't executed the
plan yet).

E.g.:
./bin/ceph balancer reset && ./bin/ceph balancer optimize crush test && ./bin/ceph balancer show crush
// starting osdmap epoch 993
// starting crush version 962
// mode crush-compat

./bin/ceph balancer reset && ./bin/ceph balancer optimize crush test && ./bin/ceph balancer show crush
// starting osdmap epoch 994
// starting crush version 963
// mode crush-compat

Fix the above problem by checking whether a new weight-set is truly created or not
on the OSDMonitor-side.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/crush/CrushWrapper.h
src/mon/OSDMonitor.cc