The note will only be printed if the pool has pg_autoscale_mode set to ON and the bulk flag is missing
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit
7d09154ce87d24993f605c8bbf829d6415b89562)
return -EINVAL;
}
+ if (type != POOL_METADATA && pool->pg_autoscale_mode == pg_pool_t::pg_autoscale_mode_t::ON && !pool->has_flag(pg_pool_t::FLAG_BULK)) {
+ // TODO: consider issuing an info event in this case
+ *ss << " Pool '" << pool_name << "' (id '" << pool_id
+ << "') has pg autoscale mode 'on' but is not marked as bulk." << std::endl
+ << " Consider setting the flag by running" << std::endl
+ << " # ceph osd pool set " << pool_name << " bulk true" << std::endl;
+ }
+
// Nothing special about this pool, so it is permissible
return 0;
}
out:
dout(4) << __func__ << " done, r=" << r << dendl;
/* Compose response */
- string rs;
- getline(ss, rs);
+ string rs = ss.str();
if (r >= 0) {
// success.. delay reply