mirror of
https://github.com/ceph/ceph
synced 2025-01-25 04:24:24 +00:00
OSDMonitor: require --allow-experimental-feature to increase pg_num
Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
fb738506f6
commit
338f3688b0
@ -2696,7 +2696,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (m->cmd[2] == "set") {
|
} else if (m->cmd[2] == "set") {
|
||||||
if (m->cmd.size() != 6) {
|
if (m->cmd.size() < 6) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
ss << "usage: osd pool set <poolname> <field> <value>";
|
ss << "usage: osd pool set <poolname> <field> <value>";
|
||||||
goto out;
|
goto out;
|
||||||
@ -2740,7 +2740,12 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
|
|||||||
paxos->wait_for_commit(new Monitor::C_Command(mon, m, 0, rs, paxos->get_version()));
|
paxos->wait_for_commit(new Monitor::C_Command(mon, m, 0, rs, paxos->get_version()));
|
||||||
return true;
|
return true;
|
||||||
} else if (m->cmd[4] == "pg_num") {
|
} else if (m->cmd[4] == "pg_num") {
|
||||||
if (n <= p->get_pg_num()) {
|
if (m->cmd.size() < 6 ||
|
||||||
|
m->cmd[6] != "--allow-experimental-feature") {
|
||||||
|
ss << "increasing pg_num is currently experimental, add "
|
||||||
|
<< "--allow-experimental-feature as the last argument "
|
||||||
|
<< "to force";
|
||||||
|
} else if (n <= p->get_pg_num()) {
|
||||||
ss << "specified pg_num " << n << " <= current " << p->get_pg_num();
|
ss << "specified pg_num " << n << " <= current " << p->get_pg_num();
|
||||||
} else if (!mon->pgmon()->pg_map.creating_pgs.empty()) {
|
} else if (!mon->pgmon()->pg_map.creating_pgs.empty()) {
|
||||||
ss << "currently creating pgs, wait";
|
ss << "currently creating pgs, wait";
|
||||||
|
Loading…
Reference in New Issue
Block a user