]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/AuthMonitor: improve error message 17678/head
authorDouglas Fuller <dfuller@redhat.com>
Mon, 20 Nov 2017 18:12:08 +0000 (13:12 -0500)
committerDouglas Fuller <dfuller@redhat.com>
Mon, 20 Nov 2017 18:26:32 +0000 (13:26 -0500)
Improve the error message for 'ceph fs authorize' where the
given entity exists but has different auth caps.

Fixes: http://tracker.ceph.com/issues/21765
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
src/mon/AuthMonitor.cc

index 9c60e37944fbdd4add8117a0bdd6379f330ad33e..ff78dfb62164ae50e1518994ceedae29cee977af 100644 (file)
@@ -1325,8 +1325,8 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op)
       for (const auto &sys_cap : wanted_caps) {
        if (entity_auth.caps.count(sys_cap.first) == 0 ||
            !entity_auth.caps[sys_cap.first].contents_equal(sys_cap.second)) {
-         ss << "key for " << entity << " exists but cap " << sys_cap.first
-            << " does not match";
+         ss << entity << " already has fs capabilities that differ from those supplied. To generate a new auth key for "
+            << entity << ", first remove " << entity << " from configuration files, execute 'ceph auth rm " << entity << "', then execute this command again.";
          err = -EINVAL;
          goto done;
        }