ovirt-imageio icon indicating copy to clipboard operation
ovirt-imageio copied to clipboard

Support standard NBD URL

Open nirs opened this issue 2 years ago • 2 comments

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 https://github.com/oVirt/vdsm/issues/174.

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

nirs avatar May 15 '22 13:05 nirs