From: Seena Fallah Date: Tue, 22 Apr 2025 08:13:42 +0000 (+0200) Subject: rgw: expect vault returns key detail on key creation X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=910bc9ed3d90750609b9e2470eae6da435380495;p=ceph.git rgw: expect vault returns key detail on key creation Vault will return the key detail on creation. no need to log an error for that. Signed-off-by: Seena Fallah --- diff --git a/src/rgw/rgw_kms.cc b/src/rgw/rgw_kms.cc index e9b22da1d2bb..27c8d50e2ce6 100644 --- a/src/rgw/rgw_kms.cc +++ b/src/rgw/rgw_kms.cc @@ -503,6 +503,8 @@ public: int res = send_request(dpp, "POST", "/datakey/plaintext/", key_id, post_data, y, secret_bl); if (res < 0) { + ldpp_dout(dpp, 0) << "ERROR: Failed to send request to Vault, res: " + << res << " response: " << string_view(secret_bl.c_str(), secret_bl.length()) << dendl; return res; } @@ -588,6 +590,8 @@ public: int res = send_request(dpp, "POST", "/decrypt/", key_id, post_data, y, secret_bl); if (res < 0) { + ldpp_dout(dpp, 0) << "ERROR: Failed to send request to Vault for decrypt, res: " + << res << " response: " << string_view(secret_bl.c_str(), secret_bl.length()) << dendl; return res; } @@ -656,12 +660,11 @@ public: int res = send_request(dpp, "POST", "/keys/", key_name, post_data, y, dummy_bl); if (res < 0) { - return res; - } - if (dummy_bl.length() != 0) { - ldpp_dout(dpp, 0) << "ERROR: unexpected response from Vault making a key: " + ldpp_dout(dpp, 0) << "ERROR: key creation failed by Vault, ret: " + << res << " response: " << std::string_view(dummy_bl.c_str(), dummy_bl.length()) << dendl; + return res; } return 0; }