Bug 965142 - libvirt shouldn't force you to specify a port in <host> elements
Summary: libvirt shouldn't force you to specify a port in <host> elements
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-20 13:56 UTC by Richard W.M. Jones
Modified: 2015-03-18 07:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-18 07:26:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2013-05-20 13:56:46 UTC
Description of problem:

When trying to create a gluster network disk like this:

    <disk device="disk" type="network">
      <source protocol="gluster" name="/test/rjones/test.img">
        <host name="f18gluster"/>
      </source>
      <target dev="sda" bus="scsi"/>
      <driver name="qemu" type="raw"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>

libvirt moans about the port not being specified:

libguestfs: error: could not create appliance through libvirt: XML error: missing port for host [code=27 domain=20]

While this is literally true, it shouldn't be necessary to
specify a port number.  The qemu command line allows you to
omit it.  This is valid:

    -drive file=gluster+tcp://f18gluster/test/rjones/test.img,format=raw,id=hd0,if=none \

and qemu or gluster or something else picks the appropriate
port number automagically.

Version-Release number of selected component (if applicable):

libvirt-daemon-1.0.3-1.fc20.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 1 Ján Tomko 2015-03-18 07:26:47 UTC
Fixed by:
commit 8110a8249d1b3c48f69d642d15d4894b7fcf05c4
Author:     Paolo Bonzini <pbonzini>
AuthorDate: 2013-03-21 12:53:51 +0100
Commit:     Osier Yang <jyang>
CommitDate: 2013-03-22 12:10:23 +0800

    domain: make port optional for network disks
    
    Only sheepdog actually required it in the code, and we can use 7000 as the
    default---the same value that QEMU uses for the simple "sheepdog:VOLUME"
    syntax.  With this change, the schema can be fixed to allow no port.
    
    Signed-off-by: Paolo Bonzini <pbonzini>

git describe: v1.0.3-140-g8110a82 contains: v1.0.4-rc1~23


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