jaegerradosgw

Ceph RGW unable to upload object if JaegerTracing is implemented


OS : ubuntu 18.04 ceph : octopus jaeger : master

When I implement jaegertracer in the function that is responsibe for writing file to ceph via RGW, I am unable to upload my file Im getting this error

Warning: failed to create container 'mycontainer': HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /auth (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5076b7a990>: Failed to establish a new connection: [Errno 111] Connection refused',))

But when I remove my tracer from the code it uploads the file successfully

source code

void librados::IoCtxImpl::queue_aio_write(AioCompletionImpl *c)
{
    auto yaml = YAML::LoadFile("tracerConfig.yaml");
    auto config = jaegertracing::Config::parse(yaml);
    auto tracer=jaegertracing::Tracer::make(
        "Writing",
        config,
        jaegertracing::logging::consoleLogger()
    );
    opentracing::Tracer::InitGlobal(
        static_pointer_cast<opentracing::Tracer>(tracer)
    );
    auto span = opentracing::Tracer::Global()->StartSpan("Span1");
    get();
    ofstream file;
    file.open("/home/abhinav/Desktop/write.txt",std::ios::out | std::ios::app);
    file<<"Writing /src/librados/IoCtxImpl.cc 288.\n";
    file.close();
    std::scoped_lock l{aio_write_list_lock};
    ceph_assert(c->io == this);
    c->aio_write_seq = ++aio_write_seq;
    ldout(client->cct, 20) << "queue_aio_write " << this << " completion " << c
        << " write_seq " << aio_write_seq << dendl;
    aio_write_list.push_back(&c->aio_write_list_item);
    opentracing::Tracer::Global()->Close();
}

When I remove the tracer it compiles fine again


Solution

  • The issue was related to yaml file parsing