Bug 1849091

Summary: [RFE] Support standard NBD URL syntax
Product: [oVirt] ovirt-imageio Reporter: Nir Soffer <nsoffer>
Component: CommonAssignee: Nir Soffer <nsoffer>
Status: CLOSED DEFERRED QA Contact: Avihai <aefrat>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: ahadas, bugs, michal.skrivanek, nsoffer, rjones, tnisan
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: pm-rhel: ovirt-4.5?
pm-rhel: planning_ack?
pm-rhel: devel_ack?
pm-rhel: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-11 12:39:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1849097    

Description Nir Soffer 2020-06-19 15:25:06 UTC
Description of problem:

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.

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.

Comment 1 Nir Soffer 2020-06-19 15:42:26 UTC
Related to bug 1657713, using NBD transport for virt-v2v.

Comment 2 Michal Skrivanek 2020-06-23 12:33:45 UTC
This request is not currently committed to 4.4.z, moving it to 4.5

Comment 3 Eyal Shenitzky 2021-09-29 10:37:03 UTC
Nir, is there a good reason to support the new syntax? can we just stay with the old syntax?

Comment 4 Richard W.M. Jones 2021-09-29 10:40:07 UTC
Consistency with other projects and a predictable system for
quoting/escaping unsafe characters in paths and export names.

Comment 5 Nir Soffer 2021-09-29 10:42:16 UTC
(In reply to Eyal Shenitzky from comment #3)
> Nir, is there a good reason to support the new syntax? can we just stay with
> the old syntax?

New URL format is required for exposing NBD socket to virt-v2v, or to other
clients.

qemu may deprecate the old non-standard URL syntax in future versions, which
will break our backup code.

Keeping the old format is technical debt.

Comment 8 Sandro Bonazzola 2022-03-29 16:16:40 UTC
We are past 4.5.0 feature freeze, please re-target.

Comment 9 Arik 2022-05-11 12:39:20 UTC
We'll keep the bug on VDSM - it's obvious that a change in imageio is needed for this

Comment 10 Nir Soffer 2022-05-15 13:24:19 UTC
Bug is tracked upstream in https://github.com/oVirt/ovirt-imageio/issues/68.