mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
krbd: return error when no initial monitor address found
Since we filter monitor addresses based on ms_mode, check that at least one address was found. Otherwise, we mismatch arguments when calling sysfs/add_single_major which emits a misleading error message to dmesg: libceph: resolve 'name=user1' (ret=-3): failed libceph: parse_ips bad ip 'name=user1,key=client.user1' Fixes: https://tracker.ceph.com/issues/54128 Signed-off-by: Burt Holzman <burt@fnal.gov>
This commit is contained in:
parent
8505861220
commit
0076ffc86e
@ -223,6 +223,11 @@ static int build_map_buf(CephContext *cct, const krbd_spec& spec,
|
||||
}
|
||||
}
|
||||
|
||||
if (oss.tellp() == 0) {
|
||||
std::cerr << "rbd: failed to get mon address (possible ms_mode mismatch)" << std::endl;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
oss << " name=" << cct->_conf->name.get_id();
|
||||
|
||||
KeyRing keyring;
|
||||
|
Loading…
Reference in New Issue
Block a user