Bug 922888 - libvirt nbd transport unix adds "-drive file=nbd:(null):(null)" to qemu command line
Summary: libvirt nbd transport unix adds "-drive file=nbd:(null):(null)" to qemu comma...
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Privoznik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs 910270 922891
TreeView+ depends on / blocked
 
Reported: 2013-03-18 17:53 UTC by Richard W.M. Jones
Modified: 2013-03-20 15:42 UTC (History)
10 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2013-03-20 15:42:23 UTC


Attachments (Terms of Use)

Description Richard W.M. Jones 2013-03-18 17:53:53 UTC
Description of problem:

I'm experimenting with libvirt's nbd feature, using the
'unix' transport.  However it doesn't seem to work.

The original XML is:

<?xml version="1.0"?>
<domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">
  <name>guestfs-3ujzjfcpypadwmna</name>
  <memory unit="MiB">500</memory>
  <currentMemory unit="MiB">500</currentMemory>
  <vcpu>1</vcpu>
  <clock offset="utc"/>
  <os>
    <type>hvm</type>
    <kernel>/home/rjones/d/libguestfs/tmp/.guestfs-1000/kernel.25906</kernel>
    <initrd>/home/rjones/d/libguestfs/tmp/.guestfs-1000/initrd.25906</initrd>
    <cmdline>panic=1 console=ttyS0 udevtimeout=600 no_timer_check acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color</cmdline>
  </os>
  <on_reboot>destroy</on_reboot>
  <devices>
    <controller type="scsi" index="0" model="virtio-scsi"/>
    <disk device="disk" type="network">
      <source protocol="nbd">
        <host transport="unix" socket="/home/rjones/d/libguestfs/tests/nbd/unix.sock"/>
      </source>
      <target dev="sda" bus="scsi"/>
      <driver name="qemu" type="raw"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="disk">
      <source file="/home/rjones/d/libguestfs/tmp/libguestfs5XonVS/snapshot1"/>
      <target dev="sdb" bus="scsi"/>
      <driver name="qemu" type="qcow2" cache="unsafe"/>
      <address type="drive" controller="0" bus="0" target="1" unit="0"/>
      <shareable/>
    </disk>
    <serial type="unix">
      <source mode="connect" path="/home/rjones/d/libguestfs/tmp/libguestfs5XonVS/console.sock"/>
      <target port="0"/>
    </serial>
    <channel type="unix">
      <source mode="connect" path="/home/rjones/d/libguestfs/tmp/libguestfs5XonVS/guestfsd.sock"/>
      <target type="virtio" name="org.libguestfs.channel.0"/>
    </channel>
  </devices>
  <qemu:commandline>
    <qemu:env name="TMPDIR" value="/home/rjones/d/libguestfs/tmp"/>
  </qemu:commandline>
</domain>

The generated command line + other logs is:

LC_ALL=C LD_LIBRARY_PATH=/home/rjones/d/libguestfs/ruby/ext/guestfs:/home/rjones/d/libguestfs/src/.libs:/home/rjones/d/libguestfs/gobject/.libs PATH=/home/rjones/d/libguestfs/erlang:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/rjones/.local/bin:/home/rjones/bin HOME=/home/rjones USER=rjones LOGNAME=rjones TMPDIR=/home/rjones/d/libguestfs/tmp /usr/bin/qemu-kvm -name guestfs-3ujzjfcpypadwmna -S -M pc-i440fx-1.4 -m 500 -smp 1,sockets=1,cores=1,threads=1 -uuid 5505655c-f1b7-7fbc-3c63-b899d9c3d74c -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/home/rjones/.config/libvirt/qemu/lib/guestfs-3ujzjfcpypadwmna.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -no-shutdown -no-acpi -kernel /home/rjones/d/libguestfs/tmp/.guestfs-1000/kernel.25906 -initrd /home/rjones/d/libguestfs/tmp/.guestfs-1000/initrd.25906 -append panic=1 console=ttyS0 udevtimeout=600 no_timer_check acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=nbd:(null):(null),if=none,id=drive-scsi0-0-0-0,format=raw -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -drive file=/home/rjones/d/libguestfs/tmp/libguestfs5XonVS/snapshot1,if=none,id=drive-scsi0-0-1-0,format=qcow2,cache=unsafe -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,id=scsi0-0-1-0 -chardev socket,id=charserial0,path=/home/rjones/d/libguestfs/tmp/libguestfs5XonVS/console.sock -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/home/rjones/d/libguestfs/tmp/libguestfs5XonVS/guestfsd.sock -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.libguestfs.channel.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
Domain id=4 is tainted: custom-argv
qemu-system-x86_64: -drive file=nbd:(null):(null),if=none,id=drive-scsi0-0-0-0,format=raw: address resolution failed for (null):(null): Servname not supported for ai_socktype
qemu: terminating on signal 15 from pid 25917
2013-03-18 17:46:10.341+0000: shutting down

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

libvirt-daemon-1.0.3-1.fc20.x86_64

How reproducible:

100%

Comment 1 Michal Privoznik 2013-03-20 15:23:55 UTC
Rich,

I think I found the root cause. The 1.0.3 release is missing sockets support for NBD transport. The patch that implements it is pushed upstream though:

commit be2a15dd60fc116f4c7bf2f8ca8e1974ff743d4d
Author:     Paolo Bonzini <pbonzini@redhat.com>
AuthorDate: Mon Feb 25 18:44:24 2013 +0100
Commit:     Eric Blake <eblake@redhat.com>
CommitDate: Fri Mar 15 15:27:56 2013 -0600

    qemu: support NBD with Unix sockets
    
    This reuses the XML format that was introduced for Gluster.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Eric Blake <eblake@redhat.com>


v1.0.3-86-gbe2a15d

So, either you wait for the next release or build your own package from the current git.

Comment 2 Richard W.M. Jones 2013-03-20 15:42:23 UTC
Ah OK, I didn't check upstream, but in that case I'll set the
resolution.  Is Fedora 19 going to get an update?


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