]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/config: EPERM setting config option after startup
authorSage Weil <sage@redhat.com>
Sun, 22 Sep 2019 18:29:18 +0000 (13:29 -0500)
committerSage Weil <sage@redhat.com>
Fri, 4 Oct 2019 14:07:03 +0000 (09:07 -0500)
Not sure why ENOSYS was chosen before...

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config.cc
src/test/daemon_config.cc

index d5c9e1c6f87fd8e62c585482dec5cc1c2f86250a..0259ef2f8ee22de3eb4303f9357addb009e06208 100644 (file)
@@ -1379,7 +1379,7 @@ int md_config_t::_set_val(
     if (new_value != _get_val_nometa(values, opt)) {
       *error_message = string("Configuration option '") + opt.name +
        "' may not be modified at runtime";
-      return -ENOSYS;
+      return -EPERM;
     }
   }
 
index bfe993798756cc94ebfaad22ce9dcd0e5484cecd..26048868f25fe533de3a8e4ca463941373274704 100644 (file)
@@ -204,7 +204,7 @@ TEST(DaemonConfig, InjectArgsReject) {
   // variable and there isn't an observer for it.
   std::string injection2("--osd_data /tmp/some-other-directory --log-graylog-port 4");
   ret = g_ceph_context->_conf.injectargs(injection2, &cout);
-  ASSERT_EQ(-ENOSYS, ret);
+  ASSERT_EQ(-EPERM, ret);
 
   // It should be unchanged.
   memset(buf2, 0, sizeof(buf2));
@@ -316,7 +316,7 @@ TEST(DaemonConfig, ThreadSafety1) {
   // Verify that we can't change this, since safe_to_start_threads has
   // been set.
   ret = g_ceph_context->_conf.set_val("osd_data", "");
-  ASSERT_EQ(-ENOSYS, ret);
+  ASSERT_EQ(-EPERM, ret);
 
   g_conf()._clear_safe_to_start_threads();