All of lore.kernel.org
 help / color / mirror / Atom feed
* Blocking rados_* calls
@ 2013-10-10 11:50 Wido den Hollander
  2013-10-10 13:45 ` Sage Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Wido den Hollander @ 2013-10-10 11:50 UTC (permalink / raw)
  To: ceph-devel

Hi,

Currently librados blocks all calls when something is not working inside 
the Ceph cluster.

This is common practice for fopen(), fread() and fwrite(), but I'm 
running into a use-case where I think the rados_connect() should not 
block indefinitely.

The use-case here is the RBD storage pool in libvirt. When for whatever 
reason libvirt is not able to connect to the Ceph cluster libvirt will 
simply block and wait on rados_connect() to complete.

This causes libvirt not being able to report new statistics about the 
RBD storage pool, which causes issues again for the applications using it.

Would it be an idea that you can configure librados not to block 
indefinitely and return for example ETIMEDOUT?

By default librados could stay blocking like it's now so nothing changes 
for existing users.

-- 
Wido den Hollander
42on B.V.

Phone: +31 (0)20 700 9902
Skype: contact42on

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Blocking rados_* calls
  2013-10-10 11:50 Blocking rados_* calls Wido den Hollander
@ 2013-10-10 13:45 ` Sage Weil
  2013-10-10 20:47   ` Wido den Hollander
  0 siblings, 1 reply; 3+ messages in thread
From: Sage Weil @ 2013-10-10 13:45 UTC (permalink / raw)
  To: Wido den Hollander; +Cc: ceph-devel

On Thu, 10 Oct 2013, Wido den Hollander wrote:
> Hi,
> 
> Currently librados blocks all calls when something is not working inside the
> Ceph cluster.
> 
> This is common practice for fopen(), fread() and fwrite(), but I'm running
> into a use-case where I think the rados_connect() should not block
> indefinitely.
> 
> The use-case here is the RBD storage pool in libvirt. When for whatever reason
> libvirt is not able to connect to the Ceph cluster libvirt will simply block
> and wait on rados_connect() to complete.
> 
> This causes libvirt not being able to report new statistics about the RBD
> storage pool, which causes issues again for the applications using it.
> 
> Would it be an idea that you can configure librados not to block indefinitely
> and return for example ETIMEDOUT?
> 
> By default librados could stay blocking like it's now so nothing changes for
> existing users.

Yeah I think this is definitely doable.  The simplest would be to have a 
configurable (or configurables) that are set via rados_conf_set() (or put 
in the config).  There are several timeouts there already, but I think 
they don't capture the entire connect sequence.

Want to open a feature ticket?

sage

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Blocking rados_* calls
  2013-10-10 13:45 ` Sage Weil
@ 2013-10-10 20:47   ` Wido den Hollander
  0 siblings, 0 replies; 3+ messages in thread
From: Wido den Hollander @ 2013-10-10 20:47 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel

On 10/10/2013 03:45 PM, Sage Weil wrote:
> On Thu, 10 Oct 2013, Wido den Hollander wrote:
>> Hi,
>>
>> Currently librados blocks all calls when something is not working inside the
>> Ceph cluster.
>>
>> This is common practice for fopen(), fread() and fwrite(), but I'm running
>> into a use-case where I think the rados_connect() should not block
>> indefinitely.
>>
>> The use-case here is the RBD storage pool in libvirt. When for whatever reason
>> libvirt is not able to connect to the Ceph cluster libvirt will simply block
>> and wait on rados_connect() to complete.
>>
>> This causes libvirt not being able to report new statistics about the RBD
>> storage pool, which causes issues again for the applications using it.
>>
>> Would it be an idea that you can configure librados not to block indefinitely
>> and return for example ETIMEDOUT?
>>
>> By default librados could stay blocking like it's now so nothing changes for
>> existing users.
>
> Yeah I think this is definitely doable.  The simplest would be to have a
> configurable (or configurables) that are set via rados_conf_set() (or put
> in the config).  There are several timeouts there already, but I think
> they don't capture the entire connect sequence.
>
> Want to open a feature ticket?

Done!

http://tracker.ceph.com/issues/6507

Wido

>
> sage
>


-- 
Wido den Hollander
42on B.V.

Phone: +31 (0)20 700 9902
Skype: contact42on

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-10 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-10 11:50 Blocking rados_* calls Wido den Hollander
2013-10-10 13:45 ` Sage Weil
2013-10-10 20:47   ` Wido den Hollander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.