Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support standard NBD URL #68

Open
nirs opened this issue May 15, 2022 · 2 comments
Open

Support standard NBD URL #68

nirs opened this issue May 15, 2022 · 2 comments
Labels
enhancement Enhancing the system by adding new feature or improving performance or reliability

Comments

@nirs
Copy link
Member

nirs commented May 15, 2022

NBD protocol introduced new URL syntax recenlty:
https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.md

NBD URI                         Export name
nbd://example.com/disk          disk
nbd+unix:///disk?socket=sock    disk
nbd://example.com/              (empty string)
nbd://example.com               (empty string)
nbd://example.com//disk         /disk
nbd://example.com/hello%20world hello world

imageio supports qemu non-standard syntax, and the nbd://
URL syntax.

QEMU NBD URI                     Export name
nbd:unix:/socket:exportname=disk disk
nbd:unix:/socket                 (empty string)
nbd:unix:/socket:exportname=     (empty string)
nbd:example.com/disk             disk
nbd://example.com/disk           disk

We need to support the new standard syntax for better compatibility with
virt-v2v and other tools using modern NBD URLs.

NBD URL are generated by vdsm when starting NBD server or backup. Vdsm
can use the new URL syntax only when all hosts are running imageio version
that understand the new syntax.

Plan:

  • Add support for new NBD URL
  • Keep support for old URI if possible

See also oVirt/vdsm#174.

Original bug: https://bugzilla.redhat.com/1849091

@nirs nirs added the enhancement Enhancing the system by adding new feature or improving performance or reliability label May 15, 2022
@rwmjones
Copy link

FYI libnbd can parse URIs: https://libguestfs.org/nbd_connect_uri.3.html

@nirs
Copy link
Member Author

nirs commented May 15, 2022

We don't use libnbd yet, and we cannot use it since it does not support the old non-standard URL generated by vdsm. After we switch to standard URLs and we ensure that we never run on a host with older vdsm generating non standard NBD URLs, we can switch.

Opened #69 for switching to libnbd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancing the system by adding new feature or improving performance or reliability
Projects
None yet
Development

No branches or pull requests

2 participants