Re: [libvirt] [RFC PATCH v3 1/4] secret: add Ceph secret type

On Thu, Oct 20, 2011 at 11:01:24AM -0700, Josh Durgin wrote:
From: Sage Weil <sage@newdream.net>
Add a new secret type to store a Ceph authentication key. The name is simply an identifier for easy human reference.
The xml looks like this:
<secret ephemeral='no' private='no'> <uuid>0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f</uuid> <usage type='ceph'> <name>mycluster_admin</name> </usage> </secret>
Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com> --- docs/schemas/secret.rng | 10 ++++++++++ include/libvirt/libvirt.h.in | 3 +++ src/conf/secret_conf.c | 23 ++++++++++++++++++++++- src/conf/secret_conf.h | 1 + src/secret/secret_driver.c | 8 ++++++++ 5 files changed, 44 insertions(+), 1 deletions(-)
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 10/27/2011 02:28 AM, Daniel P. Berrange wrote:
On Thu, Oct 20, 2011 at 11:01:24AM -0700, Josh Durgin wrote:
From: Sage Weil<sage@newdream.net>
Add a new secret type to store a Ceph authentication key. The name is simply an identifier for easy human reference.
The xml looks like this:
<secret ephemeral='no' private='no'> <uuid>0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f</uuid> <usage type='ceph'> <name>mycluster_admin</name> </usage> </secret>
Signed-off-by: Sage Weil<sage@newdream.net> Signed-off-by: Josh Durgin<josh.durgin@dreamhost.com> --- docs/schemas/secret.rng | 10 ++++++++++ include/libvirt/libvirt.h.in | 3 +++ src/conf/secret_conf.c | 23 ++++++++++++++++++++++- src/conf/secret_conf.h | 1 + src/secret/secret_driver.c | 8 ++++++++ 5 files changed, 44 insertions(+), 1 deletions(-)
ACK
I can't find the mail you are replying to, in order to apply it to the libvirt tree; was it accidentally sent off-list? Can anyone point me to a git tree with this patch series ready to be merged, or else resend it? -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 10/28/2011 10:33 AM, Eric Blake wrote:
On 10/27/2011 02:28 AM, Daniel P. Berrange wrote:
On Thu, Oct 20, 2011 at 11:01:24AM -0700, Josh Durgin wrote:
From: Sage Weil<sage@newdream.net>
Add a new secret type to store a Ceph authentication key. The name is simply an identifier for easy human reference.
The xml looks like this:
<secret ephemeral='no' private='no'> <uuid>0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f</uuid> <usage type='ceph'> <name>mycluster_admin</name> </usage> </secret>
Signed-off-by: Sage Weil<sage@newdream.net> Signed-off-by: Josh Durgin<josh.durgin@dreamhost.com> --- docs/schemas/secret.rng | 10 ++++++++++ include/libvirt/libvirt.h.in | 3 +++ src/conf/secret_conf.c | 23 ++++++++++++++++++++++- src/conf/secret_conf.h | 1 + src/secret/secret_driver.c | 8 ++++++++ 5 files changed, 44 insertions(+), 1 deletions(-)
ACK
I can't find the mail you are replying to, in order to apply it to the libvirt tree; was it accidentally sent off-list? Can anyone point me to a git tree with this patch series ready to be merged, or else resend it?
OK, I see an archive of it here: http://thread.gmane.org/gmane.comp.file-systems.ceph.devel/4129/focus=4133 but mail archives tend to corrupt any text with @, so I hope I'm porting it correctly. I'm not sure why the mail showed up on ceph-devel but not libvir-list. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 10/27/2011 02:28 AM, Daniel P. Berrange wrote:
On Thu, Oct 20, 2011 at 11:01:24AM -0700, Josh Durgin wrote:
From: Sage Weil<sage@newdream.net>
Add a new secret type to store a Ceph authentication key. The name is simply an identifier for easy human reference.
The xml looks like this:
<secret ephemeral='no' private='no'> <uuid>0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f</uuid> <usage type='ceph'> <name>mycluster_admin</name> </usage> </secret>
Signed-off-by: Sage Weil<sage@newdream.net> Signed-off-by: Josh Durgin<josh.durgin@dreamhost.com> --- docs/schemas/secret.rng | 10 ++++++++++
Missing docs/formatsecret.html.in changes to document this, but I think I managed.
include/libvirt/libvirt.h.in | 3 +++ src/conf/secret_conf.c | 23 ++++++++++++++++++++++- src/conf/secret_conf.h | 1 + src/secret/secret_driver.c | 8 ++++++++ 5 files changed, 44 insertions(+), 1 deletions(-)
ACK
I'm adding this, and pushing: diff --git i/docs/formatsecret.html.in w/docs/formatsecret.html.in index 63a1f2a..01aff2d 100644 --- i/docs/formatsecret.html.in +++ w/docs/formatsecret.html.in @@ -39,8 +39,8 @@ <dd> Specifies what this secret is used for. A mandatory <code>type</code> attribute specifies the usage category, currently - only <code>volume</code> is defined. Specific usage categories are - described below. + only <code>volume</code> and <code>ceph</code> are defined. + Specific usage categories are described below. </dd> </dl> @@ -54,6 +54,18 @@ this secret is associated with. </p> + <h3>Usage type "ceph"</h3> + + <p> + This secret is associated with a Ceph RBD (rados block device). + The <code><usage type='ceph'></code> element must contain + a single <code>name</code> element that specifies a usage name + for the secret. The Ceph secret can then be used by UUID or by + this usage name via the <code><auth></code> element of + a <a href="domain.html#elementsDisks">disk + device</a>. <span class="since">Since 0.9.7</span>. + </p> + <h2><a name="example">Example</a></h2> <pre> -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 10/28/2011 10:41 AM, Eric Blake wrote:
On 10/27/2011 02:28 AM, Daniel P. Berrange wrote:
On Thu, Oct 20, 2011 at 11:01:24AM -0700, Josh Durgin wrote:
From: Sage Weil<sage@newdream.net>
Add a new secret type to store a Ceph authentication key. The name is simply an identifier for easy human reference.
The xml looks like this:
<secret ephemeral='no' private='no'> <uuid>0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f</uuid> <usage type='ceph'> <name>mycluster_admin</name> </usage> </secret>
Signed-off-by: Sage Weil<sage@newdream.net> Signed-off-by: Josh Durgin<josh.durgin@dreamhost.com> --- docs/schemas/secret.rng | 10 ++++++++++
Missing docs/formatsecret.html.in changes to document this, but I think I managed.
include/libvirt/libvirt.h.in | 3 +++ src/conf/secret_conf.c | 23 ++++++++++++++++++++++- src/conf/secret_conf.h | 1 + src/secret/secret_driver.c | 8 ++++++++ 5 files changed, 44 insertions(+), 1 deletions(-)
ACK
I'm adding this, and pushing:
Thanks, I'm not sure why the mail didn't go through to the libvirt list. It looks like there's a break missing in the pushed version though: diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index fa80888..a51fc69 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -55,6 +55,7 @@ virSecretDefFree(virSecretDefPtr def) case VIR_SECRET_USAGE_TYPE_CEPH: VIR_FREE(def->usage.ceph); + break; default: VIR_ERROR(_("unexpected secret usage type %d"), def->usage_type); I'll send an updated version of the other patches shortly.
diff --git i/docs/formatsecret.html.in w/docs/formatsecret.html.in index 63a1f2a..01aff2d 100644 --- i/docs/formatsecret.html.in +++ w/docs/formatsecret.html.in @@ -39,8 +39,8 @@ <dd> Specifies what this secret is used for. A mandatory <code>type</code> attribute specifies the usage category, currently - only <code>volume</code> is defined. Specific usage categories are - described below. + only <code>volume</code> and <code>ceph</code> are defined. + Specific usage categories are described below. </dd> </dl>
@@ -54,6 +54,18 @@ this secret is associated with. </p>
+ <h3>Usage type "ceph"</h3> + + <p> + This secret is associated with a Ceph RBD (rados block device). + The <code><usage type='ceph'></code> element must contain + a single <code>name</code> element that specifies a usage name + for the secret. The Ceph secret can then be used by UUID or by + this usage name via the <code><auth></code> element of + a <a href="domain.html#elementsDisks">disk + device</a>. <span class="since">Since 0.9.7</span>. + </p> + <h2><a name="example">Example</a></h2>
<pre>

On 10/28/2011 12:47 PM, Josh Durgin wrote:
Thanks, I'm not sure why the mail didn't go through to the libvirt list. It looks like there's a break missing in the pushed version though:
diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index fa80888..a51fc69 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -55,6 +55,7 @@ virSecretDefFree(virSecretDefPtr def)
case VIR_SECRET_USAGE_TYPE_CEPH: VIR_FREE(def->usage.ceph); + break;
Apologies; that's what I get for manually applying your patch. :( I've pushed a trivial fix for that... -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Daniel P. Berrange
-
Eric Blake
-
Josh Durgin