Bug 1588447 - Forbid relative paths for network disk unix socket
Summary: Forbid relative paths for network disk unix socket
Keywords:
Status: CLOSED DEFERRED
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: TRACKER-bugs-affecting-libguestfs 1588451
TreeView+ depends on / blocked
 
Reported: 2018-06-07 11:19 UTC by Richard W.M. Jones
Modified: 2024-12-17 12:26 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 1588451 (view as bug list)
Environment:
Last Closed: 2024-12-17 12:26:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2018-06-07 11:19:45 UTC
Description of problem:

https://www.redhat.com/archives/libvir-list/2018-June/msg00490.html

If you have a reference to a relative path for a socket,
these no longer work.  They used to in older versions of libvirt,
and they still work on certain architectures (for example, x86_64
still works, but i686 fails).

libvirt should either reject them if they are wrong, or be fixed
so that it works like it used to.

If you decide to reject them, please clone this bug for
libguestfs because we will need to fix the paths that we
pass to libvirt.

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

libvirt 4.4.0-1.fc29

How reproducible:

Unknown, only on certain architectures at certain times.
I was only able to reliably reproduce on i686 in a Koji
build using qemu:///session.

Steps to Reproduce:

1. Start nbdkit serving over a local Unix domain socket in the
current directory:

rm -f my.sock
nbdkit -f -v -U my.sock example1

2. Create a guest which has a disk like:

  <disk device="disk" type="network">
    <source protocol="nbd">
      <host transport="unix" socket="my.sock"/>
    </source>
    <target dev="sda" bus="scsi"/>
    <driver name="qemu" type="raw" cache="writeback"/>
  </disk>

3. Start the guest under qemu:///session

4. Fails with:

  internal error: process exited while connecting to monitor: 2018-06-06T17:02:5
4.450507Z qemu-system-i386: -drive
file=nbd+unix://?socket=my.sock,format=raw,if=none,id=drive-scsi0-0-0-0,cache=w
riteback: Failed to connect socket my.sock: No such file or directory [code=1
int1=-1]

Comment 1 Peter Krempa 2018-06-07 11:29:12 UTC
The XML schema for the network disk unix socket backing always called for an 'absFilePath' so the given XML is not valid.

I think we want to enforce absolute path even in the code for APPS which don't pass correct XML to libvirt.

Comment 2 Daniel Berrangé 2018-06-07 12:44:32 UTC
Even if we don't intend to support relative paths, I'm still left wondering what we changed in libvirt that breaks the way they used to work, especially because its said to be architecture specific breakage. I'm concerned that whatever the root cause was, may have an impact on something else that we do care about supporting

Comment 3 Daniel Berrangé 2024-12-17 12:26:03 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.


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