the use of `std::random_shuffle()` was introduced by
b946308 .
in this change, it is replaced using `std::shuffle()`.
Fixes: https://tracker.ceph.com/issues/43084
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
30dfef208d859a67c1f1b13c314735861c536e85)
Conflicts:
src/tools/osdmaptool.cc (randomizing pools here instead of rules)
cout << "No pools available" << std::endl;
goto skip_upmap;
}
- srand(time(0));
- random_shuffle (pools.begin(), pools.end());
+ std::random_device rd;
+ std::shuffle(pools.begin(), pools.end(), std::mt19937{rd()});
cout << "pools ";
for (auto& i: pools)
cout << osdmap.get_pool_name(i) << " ";