Bug 476708 - virsh pool-define-as creates xml libvirt doesn't like
Summary: virsh pool-define-as creates xml libvirt doesn't like
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-16 16:57 UTC by Jarod Wilson
Modified: 2009-03-10 12:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-10 12:33:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jarod Wilson 2008-12-16 16:57:31 UTC
Description of problem:
virsh pool-define-as creates xml that libvirt doesn't like. From the libvirt.org site, the following input xml works fine:

<pool type="iscsi">
  <name>virtimages</name>
  <source>
    <host name="iscsi.example.com"/>
    <device path="demo-target"/>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
  </target>
</pool>

Looking at the cmdPoolDefineAs() function in virsh.c, the generated xml looks more like this:

<pool type="iscsi">
  <name>virtimages</name>
  <source>
    <host>iscsi.example.com</host>
    <device>demo-target</device>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
  </target>
</pool>

When one tries to feed this xml into virsh pool-define (or tries to use virsh pool-define-as w/the appropriate flags, one gets:

libvir: Storage error : XML description for missing storage pool source host name is not well formed or invalid

So either cmdPoolDefineAs needs to be modified to spit out something that looks more like the example, or both forms need to be parseable.

Version-Release number of selected component (if applicable):
libvirt-0.5.1-1.fc11

Comment 2 Cole Robinson 2009-01-21 14:15:46 UTC
Hi, this is fixed upstream as of Dec 22:

http://git.et.redhat.com/?p=libvirt.git;a=commit;h=440d4ec2b90d7ada3615ae643993b82841b3705d

Moving to POST.

Comment 3 Daniel Berrangé 2009-03-10 12:33:34 UTC
Fixed in rawhide in 0.6.1 release (or perhaps even 0.6.0)


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