]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/AuthMonitor: no stderr output on success
authorSage Weil <sage@newdream.net>
Tue, 26 Oct 2021 16:28:17 +0000 (12:28 -0400)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 12 Sep 2022 17:03:24 +0000 (17:03 +0000)
These messages are distracting.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
qa/workunits/cephtool/test.sh
src/mon/AuthMonitor.cc

index 13690af4b5d87a2db9b6d832e465db1a750129a4..b545e08facbebf8fbe951cf7ef8271aa6acd5b77 100755 (executable)
@@ -601,8 +601,7 @@ function test_auth()
   ceph auth caps client.xx mon 'allow command "osd tree"'
   ceph auth export | grep client.xx
   ceph auth export -o authfile
-  ceph auth import -i authfile 2>$TMPFILE
-  check_response "imported keyring"
+  ceph auth import -i authfile
 
   ceph auth export -o authfile2
   diff authfile authfile2
index aefdb5dd3f8ac0e67abcf56b16474ba5fcb2dee5..0f7ab5ed03d9317df743149209bcc5aead90fcf3 100644 (file)
@@ -914,7 +914,6 @@ bool AuthMonitor::preprocess_command(MonOpRequestRef op)
          kr.encode_formatted("auth", f.get(), rdata);
        else
          kr.encode_plaintext(rdata);
-       ss << "export " << eauth;
        r = 0;
       } else {
        ss << "no key for " << eauth;
@@ -925,8 +924,6 @@ bool AuthMonitor::preprocess_command(MonOpRequestRef op)
        keyring.encode_formatted("auth", f.get(), rdata);
       else
        keyring.encode_plaintext(rdata);
-
-      ss << "exported master keyring";
       r = 0;
     }
   } else if (prefix == "auth get" && !entity_name.empty()) {
@@ -941,7 +938,6 @@ bool AuthMonitor::preprocess_command(MonOpRequestRef op)
        keyring.encode_formatted("auth", f.get(), rdata);
       else
        keyring.encode_plaintext(rdata);
-      ss << "exported keyring for " << entity_name;
       r = 0;
     }
   } else if (prefix == "auth print-key" ||
@@ -965,10 +961,6 @@ bool AuthMonitor::preprocess_command(MonOpRequestRef op)
       mon.key_server.encode_formatted("auth", f.get(), rdata);
     } else {
       mon.key_server.encode_plaintext(rdata);
-      if (rdata.length() > 0)
-        ss << "installed auth entries:" << std::endl;
-      else
-        ss << "no installed auth entries!" << std::endl;
     }
     r = 0;
     goto done;
@@ -1462,8 +1454,6 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op)
       mon.reply_command(op, -EINVAL, rs, get_last_committed());
       return true;
     }
-    ss << "imported keyring";
-    getline(ss, rs);
     err = 0;
     wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
                                              get_last_committed() + 1));
@@ -1923,15 +1913,12 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op)
     KeyServerData::Incremental auth_inc;
     auth_inc.name = entity;
     if (!mon.key_server.contains(auth_inc.name)) {
-      ss << "entity " << entity << " does not exist";
       err = 0;
       goto done;
     }
     auth_inc.op = KeyServerData::AUTH_INC_DEL;
     push_cephx_inc(auth_inc);
 
-    ss << "updated";
-    getline(ss, rs);
     wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
                                              get_last_committed() + 1));
     return true;