Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-33851

guestfish and other libguestfs tools cannot parse nbd+unix:///-style socket URIs

    • libguestfs-1.50.1-9.el9
    • Yes
    • Moderate
    • rhel-sst-virtualization
    • ssg_virtualization
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • x86_64
    • None

      Description of problem:
      virt-inspector: can't  access: nbdkit unix socket with error 'No such file or directory'

      Version-Release number of selected component (if applicable):
      nbdkit-1.36.2-1.el9.x86_64
      nbdkit-1.38.0-1.el9.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1. Use nbdkit file plugin access a raw image and use  virt-inspector detect the image

      # nbdkit file /home/latest-rhel9.img --filter=cow --filter=delay rdelay=200ms cow-on-read=/var/tmp --run 'time virt-inspector --format=raw -a "$uri"'  -v 
      nbdkit: debug: nbdkit 1.36.2 (nbdkit-1.36.2-1.el9)
      nbdkit: debug: TLS disabled: could not load TLS certificates
      nbdkit: debug: service mode: unix socket
      nbdkit: debug: NBD URI: nbd+unix://?socket=/tmp/nbdkitlKvFcJ/socket
      nbdkit: debug: registering plugin /usr/lib64/nbdkit/plugins/nbdkit-file-plugin.so
      nbdkit: debug: registered plugin /usr/lib64/nbdkit/plugins/nbdkit-file-plugin.so (name file)
      nbdkit: debug: file: load
      nbdkit: debug: registering filter /usr/lib64/nbdkit/filters/nbdkit-delay-filter.so
      nbdkit: debug: registered filter /usr/lib64/nbdkit/filters/nbdkit-delay-filter.so (name delay)
      nbdkit: debug: delay: load
      nbdkit: debug: registering filter /usr/lib64/nbdkit/filters/nbdkit-cow-filter.so
      nbdkit: debug: registered filter /usr/lib64/nbdkit/filters/nbdkit-cow-filter.so (name cow)
      nbdkit: debug: cow: load
      nbdkit: debug: cow: config key=file, value=/home/latest-rhel9.img
      nbdkit: debug: delay: config key=file, value=/home/latest-rhel9.img
      nbdkit: debug: file: config key=file, value=/home/latest-rhel9.img
      nbdkit: debug: cow: config key=rdelay, value=200ms
      nbdkit: debug: delay: config key=rdelay, value=200ms
      nbdkit: debug: cow: config key=cow-on-read, value=/var/tmp
      nbdkit: debug: cow: config_complete
      nbdkit: debug: delay: config_complete
      nbdkit: debug: file: config_complete
      nbdkit: debug: using thread model: parallel
      nbdkit: debug: file: get_ready
      nbdkit: debug: delay: get_ready thread_model=3
      nbdkit: debug: cow: get_ready thread_model=3
      nbdkit: debug: cow: temporary directory for overlay: /var/tmp
      nbdkit: debug: bound to unix socket /tmp/nbdkitlKvFcJ/socket
      nbdkit: debug: forked into background (new pid = 103223)
      nbdkit: debug: file: after_fork
      nbdkit: debug: delay: after_fork
      nbdkit: debug: cow: after_fork
      virt-inspector: access: nbd+unix://?socket=/tmp/nbdkitlKvFcJ/socket: No such file or directory
      
      real    0m0.028s
      user    0m0.019s
      sys    0m0.008s
      nbdkit: debug: cow: cleanup
      nbdkit: debug: delay: cleanup
      nbdkit: debug: file: cleanup
      nbdkit: debug: file: unload plugin
      nbdkit: debug: delay: unload filter
      nbdkit: debug: cow: unload filter
      
      # nbdkit file /home/data.img --filter=cow --filter=delay rdelay=200ms cow-on-read=/var/tmp --run 'time virt-inspector --format=raw -a "$uri"'  -v 
      nbdkit: debug: nbdkit 1.38.0 (nbdkit-1.38.0-1.el9)
      nbdkit: debug: TLS disabled: could not load TLS certificates
      nbdkit: debug: service mode: unix socket
      nbdkit: debug: NBD URI: nbd+unix://?socket=/tmp/nbdkitJwALBA/socket
      nbdkit: debug: registering plugin /usr/lib64/nbdkit/plugins/nbdkit-file-plugin.so
      nbdkit: debug: registered plugin /usr/lib64/nbdkit/plugins/nbdkit-file-plugin.so (name file)
      nbdkit: debug: file: load
      nbdkit: debug: registering filter /usr/lib64/nbdkit/filters/nbdkit-delay-filter.so
      nbdkit: debug: registered filter /usr/lib64/nbdkit/filters/nbdkit-delay-filter.so (name delay)
      nbdkit: debug: delay: load
      nbdkit: debug: registering filter /usr/lib64/nbdkit/filters/nbdkit-cow-filter.so
      nbdkit: debug: registered filter /usr/lib64/nbdkit/filters/nbdkit-cow-filter.so (name cow)
      nbdkit: debug: cow: load
      nbdkit: debug: cow: config key=file, value=/home/data.img
      nbdkit: debug: delay: config key=file, value=/home/data.img
      nbdkit: debug: file: config key=file, value=/home/data.img
      nbdkit: debug: cow: config key=rdelay, value=200ms
      nbdkit: debug: delay: config key=rdelay, value=200ms
      nbdkit: debug: cow: config key=cow-on-read, value=/var/tmp
      nbdkit: debug: cow: config_complete
      nbdkit: debug: delay: config_complete
      nbdkit: debug: file: config_complete
      nbdkit: debug: using thread model: parallel
      nbdkit: debug: file: get_ready
      nbdkit: debug: delay: get_ready thread_model=3
      nbdkit: debug: cow: get_ready thread_model=3
      nbdkit: debug: cow: temporary directory for overlay: /var/tmp
      nbdkit: debug: bound to unix socket /tmp/nbdkitJwALBA/socket
      nbdkit: debug: forked into background (new pid = 550809)
      nbdkit: debug: file: after_fork
      nbdkit: debug: delay: after_fork
      nbdkit: debug: cow: after_fork
      virt-inspector: access: nbd+unix://?socket=/tmp/nbdkitJwALBA/socket: No such file or directory
      
      real    0m0.014s
      user    0m0.011s
      sys    0m0.002s
      nbdkit: debug: cow: cleanup
      nbdkit: debug: delay: cleanup
      nbdkit: debug: file: cleanup
      nbdkit: debug: file: unload plugin
      nbdkit: debug: delay: unload filter
      nbdkit: debug: cow: unload filter
      

      Actual results:
      As above description

      Expected result:
      virt-inspector: can access: nbdkit unix socket without error

      Additional info:
      Can't reproduce the bug with nbdkit-1.34.2-1.el9.x86_64

      # nbdkit file /home/latest-rhel9.img --filter=cow --filter=delay rdelay=200ms cow-on-read=/var/tmp --run 'time virt-inspector --format=raw -a "$uri"' 
      <?xml version="1.0"?>
      <operatingsystems>
        <operatingsystem>
          <root>/dev/sda1</root>
          <name>linux</name>
          <arch>x86_64</arch>
          <distro>fedora</distro>
          <product_name>Fedora 27 (Twenty Seven)</product_name>
          <major_version>27</major_version>
          <minor_version>0</minor_version>
          <package_format>rpm</package_format>
          <package_management>dnf</package_management>
          <hostname>atest-guest</hostname>
          <osinfo>fedora27</osinfo>
          <mountpoints>
            <mountpoint dev="/dev/sda1">/</mountpoint>
          </mountpoints>
          <filesystems>
            <filesystem dev="/dev/sda1">
              <type>ext4</type>
              <uuid>ba419b80-2653-4f9b-af33-4966d1045fe6</uuid>
            </filesystem>
          </filesystems>
          <applications>
            <application>
              <name>GeoIP</name>
              <version>1.6.11</version>
              <release>3.fc27</release>
              <arch>x86_64</arch>
              <url>http://www.maxmind.com/app/c</url>
              <summary>Library for country/city/organization to IP address or hostname mapping</summary>
              <description>GeoIP is a C library that enables the user to find the country that any IP
      address or hostname originates from.
      .......
      .......
      LZMA is a general purpose compression algorithm designed by Igor Pavlov as
      part of 7-Zip. It provides high compression ratio while keeping the
      decompression speed fast.</description>
            </application>
            <application>
              <name>xz-libs</name>
              <version>5.2.3</version>
              <release>4.fc27</release>
              <arch>x86_64</arch>
              <url>http://tukaani.org/xz/</url>
              <summary>Libraries for decoding LZMA compression</summary>
              <description>Libraries for decoding files compressed with LZMA or XZ utils.</description>
            </application>
            <application>
              <name>zlib</name>
              <version>1.2.11</version>
              <release>4.fc27</release>
              <arch>x86_64</arch>
              <url>http://www.zlib.net/</url>
              <summary>The compression and decompression library</summary>
              <description>Zlib is a general-purpose, patent-free, lossless data compression
      library which is used by many different programs.</description>
            </application>
          </applications>
        </operatingsystem>
      </operatingsystems>
      
      real    1m8.879s
      user    0m2.219s
      sys    0m1.508s
      

              rhn-eng-rjones Richard Jones
              mxie@redhat.com Ming Xie
              virt-maint virt-maint
              Yongkui Guo Yongkui Guo
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: