Bug #10711
closedceph.in: connect before ping_monitor
0%
Description
[root@ceph ~]# ceph ping mon.a
Error connecting to cluster: ObjectNotFound
Updated by Loïc Dachary about 9 years ago
I'm confused because it works for me, in the current master. I get an ObjectNotFound error only when the targeted monitor does not exist.
loic@fold:~/software/ceph/ceph/src$ ./ceph ping mon.a *** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH *** { "health": { "health": { "health_services": [ { "mons": [ { "name": "a", "kb_total": 191212180, "kb_used": 161046980, "kb_avail": 30148816, "avail_percent": 15, "last_updated": "2015-02-02 11:55:09.474920", "store_stats": { "bytes_total": 434835, "bytes_sst": 0, "bytes_log": 433753, "bytes_misc": 1082, "last_updated": "0.000000" }, "health": "HEALTH_OK" } ] } ] }, "summary": [], "timechecks": { "epoch": 2, "round": 0, "round_status": "finished" }, "overall_status": "HEALTH_OK", "detail": [] }, "mon_status": { "name": "a", "rank": 0, "state": "leader", "election_epoch": 2, "quorum": [ 0 ], "outside_quorum": [], "extra_probe_peers": [], "sync_provider": [], "monmap": { "epoch": 1, "fsid": "23fb5b11-222b-429c-8b55-83aa1c758824", "modified": "2015-02-02 11:53:09.044105", "created": "2015-02-02 11:53:09.044105", "mons": [ { "rank": 0, "name": "a", "addr": "127.0.0.1:6789\/0" } ] } } } loic@fold:~/software/ceph/ceph/src$ ./ceph ping mon.c *** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH *** Error connecting to cluster: ObjectNotFound
Updated by Loïc Dachary about 9 years ago
- Status changed from New to Need More Info
Updated by Xinze Chi about 9 years ago
Loic Dachary wrote:
I'm confused because it works for me, in the current master. I get an ObjectNotFound error only when the targeted monitor does not exist.
[...]
sorry, I make a mistake. The conf in my cluster is:
[global]
fsid=58f19e32-d736-40da-af1d-9fa42e48e919
mon host = 192.168.1.125:6789
public network = 192.168.1.0/24
osd_class_dir = /usr/lib64/rados-classes
auth cluster required = none
auth service required = none
auth client required = none
debug mon = 1
debug monc = 20
debug rados = 20
[osd]
osd journal size = 5120
osd journal zero on create = true
osd crush chooseleaf type = 1
[mon]
mon_initial_members = a
[mon.a]
host = node19
mon addr = 192.168.1.125:6789
mon warn on legacy crush tunables = false
librados::RadosClient::ping_monitor -> monclient.build_initial_monmap() -> MonMap::build_initial
Because I has define "mon host" in [global], so below expression is true
// m foo?
if (!conf>mon_host.empty()) {
int r = build_from_host_list(conf->mon_host, "noname-");
if (r < 0) {
errout << "unable to parse addrs in '" << conf->mon_host << "'"
<< std::endl;
return r;
}
return 0;
}
Updated by Loïc Dachary about 9 years ago
- Status changed from Need More Info to Rejected