Re: librbd++: How to access more detailed error messages?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, 15. Mai 2013, 07:58:57 schrieb Gregory Farnum:
> On Wednesday, May 15, 2013, Guido Winkelmann wrote:
> > Hi,
> > 
> > When using librbd, one usually just gets a simple error code from RBD
> > methods
> > if something goes wrong, and those sometime have me guessing exactly what
> > they
> > could mean in a specific situation.
> > 
> > While perusing librbd/internal.cc, I noticed that many of the methods in
> > the
> > background will produce more detailed error messages, like this line from
> > snap_protect():
> > 
> > lderr(ictx->cct) << "snap_protect: image must support layering"
> > 
> >        << dendl;
> > 
> > How do I access those more detailed error messages?
> > 
> >         Guido
> 
> You've discovered our debug logging generators! Those line outputting to
> lderr are directed to both stderr and our own debug logs; those directed to
> ldout are directed to just our debug logs. You can configure librbd so it
> will output this on startup via any of the config interfaces. There's not a
> good way to parse it via code, though -- it's meant for humans to consume.
> -Greg

Human consumption was what I was going for as well.
I was hoping to be enable my program, which uses librbd, to show or log error 
messages along the lines of

"While doing x, could not do RBD operation so_and_so, librbd said: 
this_and_that",

so that the admin (or me, when debugging) would have a better chance at 
locating and fixing the source of an error, should one occur.

	Guido
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux