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

libnbd fails nbd_can_meta_context with nbd-server 3.25

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • CentOS Stream 9, rhel-9.3.0, rhel-9.4
    • libnbd
    • Yes
    • None
    • Hide
      Upstream commits:
      83c72c3f43a596634ea634e726b5853854cf2cd9 api: Fix nbd_can_meta_context for server that lacks meta contexts
      2af31e231b77c74c6c7132977b70cc69a0d1bed6 copy, info: Treat can_meta_context failures as unsupported
      Show
      Upstream commits: 83c72c3f43a596634ea634e726b5853854cf2cd9 api: Fix nbd_can_meta_context for server that lacks meta contexts 2af31e231b77c74c6c7132977b70cc69a0d1bed6 copy, info: Treat can_meta_context failures as unsupported
    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • All
    • None

      What were you trying to do that didn't work?

      Libnbd 1.16 introduced a regression (fixed in 1.18.3 and 1.20.0) where nbd_can_meta_context() fails with an error rather than returning false when talking to a server that has structured replies but lacks block status support.  This is a corner case: most servers (including qemu-nbd and nbdkit) are either so old that they support neither feature, or new enough that both features were added in the same release.  nbd-server (from the upstream nbd project) 3.24 lacked both features, making nbd 3.25 (upstream release May 2023) being the only known server in the wild that triggers the libnbd regression.

      Please provide the package NVR for which bug is seen:

      libnbd-1.18.1-3

      How reproducible:

      100% with nbd-server 3.25 as server

      Steps to reproduce

      1. echo hello world > file1
      2. nbd-server -r 10809 $PWD/file1
      3. nbdcopy nbd://localhost:10809 file2

      Expected results

      file1 and file2 should have identical contents

      Actual results

      nbdcopy fails with:

      nbd://localhost:10809: nbd_block_status_64: did not negotiate any metadata contexts, either you did not call nbd_add_meta_context before connecting or the server does not support it: Operation not supported

      Most of the Red Hat virtualization stack does not use nbd-server (nbdkit and qemu-nbd are more common); but since RHEL does ship the nbd project (which includes nbd-server), customers can hit this.

              eblake_redhat Eric Blake
              eblake_redhat Eric Blake
              virt-maint virt-maint
              vera wu vera wu
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: