All of lore.kernel.org
 help / color / mirror / Atom feed
* Add Metavariable $imagename
@ 2013-09-04 14:46 Mike Dawson
  2013-09-04 15:07 ` Mark Nelson
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Dawson @ 2013-09-04 14:46 UTC (permalink / raw)
  To: ceph-devel@vger.kernel.org

There are currently a few metavariables available for use in ceph.conf:
http://ceph.com/docs/master/rados/configuration/ceph-conf/#metavariables

In addition to those listed in that document, $pid was added in Bobtail. 
That allows me to get RBD admin sockets for libvirt/qemu guests by 
specifying

[client]
     admin socket = /var/run/ceph/rbd-$pid.asok

in /etc/ceph/ceph.conf. That works well for VMs with a single volume, 
but it does not work for VMs with multiple volumes. With multiple 
volumes, the admin only lists data on the last volume specified, leaving 
me unable to monitor stats on any volumes other than the last.

I imagine you could specify a unique admin socket for each volume on the 
command-line that libvirt uses to spawn qemu, but that seems like a pain.

Is it possible instead to add a metavariable that would expand to the 
image name? This way, my ceph.conf would look like


[client]
     admin socket = /var/run/ceph/$imagename.asok

and I would end up with admin sockets like:

/var/run/ceph/rbd-volume-0025b693-6230-443e-ad6a-3aa43efdd648.asok
/var/run/ceph/rbd-volume-009228f3-b8d7-4f3c-8458-0cdbd4809dc6.asok

# rbd -p volumes ls
volume-0025b693-6230-443e-ad6a-3aa43efdd648
volume-009228f3-b8d7-4f3c-8458-0cdbd4809dc6

I'd be happy to provide a patch if someone could give me sufficient 
guidance on how/where to add this functionality.

-- 
Thanks,

Mike Dawson
Co-Founder & Director of Cloud Architecture
Cloudapt LLC
6330 East 75th Street, Suite 170
Indianapolis, IN 46250

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

end of thread, other threads:[~2013-09-05 18:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 14:46 Add Metavariable $imagename Mike Dawson
2013-09-04 15:07 ` Mark Nelson
2013-09-04 15:46   ` Mike Dawson
2013-09-04 16:22     ` Sage Weil
2013-09-05  6:48       ` Josh Durgin
2013-09-05 14:59         ` Sage Weil
2013-09-05 18:32           ` Josh Durgin

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.