ceph/ceph — pull request #2470 by apeters1971 (2014-09-12 15:01:06+00:00)
Title: RADOS: add a 'locator' interface via a new class 'RadosLocator' 

.... to lookup OSD IPs (optional Hostnames) storing a given object name. Requirement is to provide a public API to location information to deploy an authenticating overlay server network on top of OSDs with redirection to object primary locations.

The functionality is for convenience also exported as a RADOS shell command:
```
[root@XXX src]# ./rados -p mypool locate /123
osd-id=0050 pg-seed=0450 ip=111.142.21.46
osd-id=0079 pg-seed=0450 ip=111.142.21.44
osd-id=0148 pg-seed=0450 ip=111.142.21.81

[root@XXX src]# ./rados --dns -p mypool locate /123
osd-id=0050 pg-seed=0450 ip=111.142.21.46 hostname=p051.fake.ch
osd-id=0079 pg-seed=0450 ip=111.142.21.44 hostname=p052.fake.ch
osd-id=0148 pg-seed=0450 ip=111.142.21.81 hostname=p053.fake.ch
```

The API adds two functions to librados (the implementation is in librados::RadosLocator)
```
librados::Rados::locate(...)
librados::Rados::dump_location(...);
```
Currently these are not wrapped in the C api. Please give feedback if the structure is not good since the structure of librado is not so straight forward either ...