From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Durgin Subject: Re: First work on RBD storage pool support in libvirt Date: Wed, 04 Jan 2012 16:32:33 -0800 Message-ID: <4F04EFA1.5050704@dreamhost.com> References: <4F04A8C1.1090205@widodh.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail.hq.newdream.net ([66.33.206.127]:45857 "EHLO mail.hq.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932119Ab2AEAcf (ORCPT ); Wed, 4 Jan 2012 19:32:35 -0500 In-Reply-To: <4F04A8C1.1090205@widodh.nl> Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Wido den Hollander Cc: ceph-devel@vger.kernel.org On 01/04/2012 11:30 AM, Wido den Hollander wrote: > Hi, > > The last few days I've been working on a storage backend driver for > libvirt which supports RBD. > > This has been in the tracker for a while: > http://tracker.newdream.net/issues/1422 > > My current work can be found at: http://www.widodh.nl/git/libvirt.git in > the 'rbd' branch. Awesome! Glad to see this being worked on. > I realize it is far from done, a lot of work has to be done, but I'd > like to discuss some things first before making some decisions I might > later regret. > > My idea was to discuss it here first and after a few iterations get it > reviewed by the libvirt guys. > > Let me start with the XML: > > > cephclusterdev > > myrbdpool > > > > > I think it will be easier to manage if the format for network volumes and network disks are as similar as possible. In particular, allowing multiple hosts, and making the auth element match the network disk format (even using the same xml schema). With this in mind, the format would be more like: cephclusterdev Or the secret could be identified by name: cephclusterdev > A few things here: > > * I'm leaning on the secretDriver from libvirt for storing the actual > cephx key. Should I also store the id in there or keep that in the pool > declaration? I'd say keep it in the pool declaration for consistency. > > * prefer_ipv6? I'm a IPv6 guy, I try to get as much over IPv6 as I can. > Since Ceph doesn't support dual-stack you have to explicitly enable > IPv6. I did not want to let librados read a ceph.conf from outside > libvirt I added this variable. Not the fanciest way I think, but it > could serve other future storage drivers in libvirt This actually isn't necessary for RBD - the ms_bind_ipv6 option only affects servers (who call bind(2)). > * How should we pass other configuration options? I want to stay away > from the ceph.conf as far as possible. Imho a user should be able to > define a XML and get it all up and running. You will also run into > apparmor/SELinux on systems, so libvirt won't have permission to read > files everywhere you want it to. I also thinks the libvirt guys want to > keep everything as generic as possible. I agree, libvirt should be able to configure everything with no external files. > In the future we might see more > storage backends which have almost the same properties as RBD. How do we > pass extra config options? the volume The libvirt way seems to be adding more well-defined elements or attributes to the xml schema when the new backend is added. Personally I'd be happy with a generic