CEPH_CLIENT_ID environment variable if set now overrides the rados
client id for testsnaps
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
int max_in_flight;
RadosTestContext(const string &pool_name,
- int max_in_flight) :
+ int max_in_flight,
+ const char *id = 0) :
state_lock("Context Lock"),
pool_obj_cont(),
current_snap(0),
errors(0),
max_in_flight(max_in_flight)
{
- rados.init(NULL);
+ rados.init(id);
rados.conf_read_file("ceph.conf");
rados.connect();
rados.ioctx_create(pool_name.c_str(), io_ctx);
<< std::endl;
return 0;
}
+
+ char *id = getenv("CEPH_CLIENT_ID");
+ if (id) cerr << "Client id is: " << id << dendl;
string pool_name = "casdata";
- RadosTestContext context(pool_name, max_in_flight);
+ RadosTestContext context(pool_name, max_in_flight, id);
TestOpStat stats;
SnapTestGenerator gen = SnapTestGenerator(ops, objects, &stats);