mirror of
https://github.com/ceph/ceph
synced 2025-01-18 17:12:29 +00:00
mon/OSDMonitor: ENOENT on disabling non-existend app
so we don't bother to trigger an pool update, which is potentially big stuff. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
parent
b61cbe704c
commit
b4dcdecb6a
@ -2377,6 +2377,7 @@ function test_mon_pool_application()
|
||||
|
||||
expect_false ceph osd pool application disable app_for_test rgw
|
||||
ceph osd pool application disable app_for_test rgw --yes-i-really-mean-it
|
||||
ceph osd pool application disable app_for_test rgw --yes-i-really-mean-it # should be idempotent
|
||||
ceph osd pool ls detail | grep "application rbd"
|
||||
ceph osd pool ls detail --format=json | grep '"application_metadata":{"rbd":{}}'
|
||||
|
||||
|
@ -6435,6 +6435,12 @@ int OSDMonitor::prepare_command_pool_application(const string &prefix,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (!app_exists) {
|
||||
ss << "application '" << app << "' is not enabled on pool '" << pool_name
|
||||
<< "'";
|
||||
return 0; // idempotent
|
||||
}
|
||||
|
||||
p.application_metadata.erase(app);
|
||||
ss << "disable application '" << app << "' on pool '" << pool_name << "'";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user