Add some logging around failure cases.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
{
list<string> sup_list;
get_str_list(str, sup_list);
+ if (sup_list.empty()) {
+ lderr(cct) << "WARNING: empty auth protocol list" << dendl;
+ }
for (list<string>::iterator iter = sup_list.begin(); iter != sup_list.end(); ++iter) {
+ ldout(cct, 5) << "adding auth protocol: " << *iter << dendl;
if (iter->compare("cephx") == 0) {
auth_supported.push_back(CEPH_AUTH_CEPHX);
} else if (iter->compare("none") == 0) {
created = ceph_clock_now(cct);
CryptoHandler *h = cct->get_crypto_handler(type);
- if (!h)
+ if (!h) {
+ lderr(cct) << "ERROR: cct->get_crypto_handler(type=" << type << ") returned NULL" << dendl;
return -EOPNOTSUPP;
+ }
int ret = h->validate_secret(s);
if (ret < 0)
created = ceph_clock_now(cct);
CryptoHandler *h = cct->get_crypto_handler(type);
- if (!h)
+ if (!h) {
+ lderr(cct) << "ERROR: cct->get_crypto_handler(type=" << type << ") returned NULL" << dendl;
return -EOPNOTSUPP;
+ }
return h->create(secret);
}
type = mon->auth_service_required.pick(supported);
s->auth_handler = get_auth_service_handler(type, g_ceph_context, &mon->key_server);
if (!s->auth_handler) {
+ dout(1) << "client did not provide supported auth type" << dendl;
ret = -ENOTSUP;
goto reply;
}