Bug 965142 - libvirt shouldn't force you to specify a port in <host> elements
libvirt shouldn't force you to specify a port in <host> elements
Status: CLOSED CURRENTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-20 09:56 EDT by Richard W.M. Jones
Modified: 2015-03-18 03:26 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-18 03:26:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2013-05-20 09:56:46 EDT
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 03:26:47 EDT
Fixed by:
commit 8110a8249d1b3c48f69d642d15d4894b7fcf05c4
Author:     Paolo Bonzini <pbonzini@redhat.com>
AuthorDate: 2013-03-21 12:53:51 +0100
Commit:     Osier Yang <jyang@redhat.com>
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@redhat.com>

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.