Bug 1159016 - libvirt backend does not set RBD password
Summary: libvirt backend does not set RBD password
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1159030
TreeView+ depends on / blocked
 
Reported: 2014-10-30 17:17 UTC by Daniel Berrangé
Modified: 2014-11-10 05:58 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.28.2-2.fc21
Clone Of:
: 1159030 (view as bug list)
Environment:
Last Closed: 2014-11-10 05:58:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2014-10-30 17:17:00 UTC
Description of problem:
After configuring an RBD disk with libguestfs I get this error when launching the appliance


2014-10-30 16:53:24.859 TRACE nova.compute.manager [instance: 3f8c2d01-4b07-4864-b3ed-7a45bc2b95bd] Original error from libvirt: XML error: missing auth secret uuid or usage attribute [code=27 domain=18])

Forcing the backend to 'direct' successfully launches

I can see the XML libguesfs builds is:

    <disk device="disk" type="network">
      <source protocol="rbd" name="2f98aa3a-c005-4c21-8fb3-595a5a698005_disk/vms">
        <host name="10.33.9.42" port="6789"/>
      </source>
      <auth username="cinder"/>
      <target dev="sda" bus="scsi"/>
      <driver name="qemu" type="raw" cache="writeback"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>

The auth XML element should refer to a secret

      <auth username="cinder">
        <secret type="ceph" uuid="457eb676-33da-42ec-9a8c-9293d545c337"/>
      </auth>


Version-Release number of selected component (if applicable):
libguestfs-1.26.9-1.fc20.x86_64

Comment 1 Daniel Berrangé 2014-10-30 17:51:36 UTC
Ah ha, seems this is a known todo item

          start_element ("auth") {
            attribute ("username", drv->src.username);
            /* TODO: write the drive secret, after first storing it separately
             * in libvirt
             */
          } end_element ();

Comment 2 Richard W.M. Jones 2014-10-31 11:05:24 UTC
https://www.redhat.com/archives/libguestfs/2014-October/msg00248.html

Only compile tested so far, I'm running the tests now.  I will
have to resurrect my ceph server and try to work out how to
configure authentication.

Comment 3 Richard W.M. Jones 2014-10-31 16:07:39 UTC
v2 is here:
https://www.redhat.com/archives/libguestfs/2014-October/msg00250.html

Comment 4 Richard W.M. Jones 2014-10-31 17:56:06 UTC
This is upstream in 1.29.4.

A backport to Fedora 20 might be "interesting".  Fedora 21 is
pretty easy.  Do you need this for F20/F21 or is the bug just
misfiled?

Comment 5 Daniel Berrangé 2014-10-31 18:00:25 UTC
I just happened to be testing on F20. If you just want to target F21 that's fine. It won't be important until the next OpenStack release in May (6 months).

Comment 6 Richard W.M. Jones 2014-10-31 19:48:23 UTC
Because of the change to gnulib configuration, I think the only
way to do this is to build a completely new tarball ...

Comment 7 Fedora Update System 2014-11-01 07:44:12 UTC
libguestfs-1.28.2-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libguestfs-1.28.2-2.fc21

Comment 8 Fedora Update System 2014-11-02 07:27:54 UTC
Package libguestfs-1.28.2-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libguestfs-1.28.2-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14147/libguestfs-1.28.2-2.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-11-10 05:58:12 UTC
libguestfs-1.28.2-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.