Bug 1302358

Summary: File Storage domain export path does not support [IPv6]:/path input
Product: [oVirt] vdsm Reporter: Edward Haas <edwardh>
Component: GeneralAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.20.0CC: amureini, bugs, danken, edwardh, ishaby, ratamir, yzaspits
Target Milestone: ovirt-4.1.1Flags: rule-engine: ovirt-4.1+
danken: testing_plan_complete?
Target Release: 4.19.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Up until now, we could use only IPV4 addresses to create file storage domains. Now, IPV6 Addresses can also be used to do so. Here's an example for an IPV6 export address: [2001:0db8:85a3:8a2e:0370:7334]:/path/to/storage For more information, please refer to: http://www.ovirt.org/develop/release-management/features/network/ipv6-support/
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:47:54 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: 1080725    

Description Edward Haas 2016-01-27 15:24:44 UTC
Description of problem:
When creating a new Storage Domain, the export path cannot be edited with an IPv6 address.
The format should be [IPv6 Address]:/path, e.g [201::1]:/path

Version-Release number of selected component (if applicable):
Latest

How reproducible:
Try to add a new storage domain with an IPv6 address/

Steps to Reproduce:
1. Open Storage tab.
2. Click New Domain
3. Edit in 'Export Path' textbox something like: [201::1]:/my/folder
4. Try to add the domain.

Actual results:
Error on the textbox: NFS mount path is illegal...

Expected results:
To accept the address and connect to the storage.

Additional info:
Should work with all storage types.
It is part of the IPv6 task.
With an FQDN that points to an IPv6 address, it works fine.

Comment 1 Tal Nisan 2016-01-31 17:31:47 UTC
*** Bug 1302356 has been marked as a duplicate of this bug. ***

Comment 2 Yevgeny Zaspitsky 2016-04-20 10:43:40 UTC
org.ovirt.engine.ui.uicommonweb.validation.LinuxMountPointValidation should be updated in order to validate IPv6 containing URLs properly.

Comment 3 Idan Shaby 2017-01-05 16:54:08 UTC
It looks like this bug is only about the webadmin for some reason.
If I got it right, it is not possible to add a file domain using an ipv6 address at all, and not only via the webadmin.
Am I right? Or have I got it wrong when trying to do it via the REST API?
If I am wrong, can you give an example for a REST API call to add an file domain?

Comment 4 Idan Shaby 2017-01-09 07:44:52 UTC
The problem seems to reside in vdsm.
Updating the BZ.

Comment 5 Idan Shaby 2017-01-09 08:04:04 UTC
In more details:
It seems that oop.getProcessPool(possibleDomain)... in fileSD - scanDomains -> collectMetaFile doesn't return the metaFiles because the '[' and ']' are not escaped.
The exact same bug occurred when I tried to create a domain with a name like "the[new]sd". We need to escape the '[]' characters because when trying to find what the sd dir contains I think that vdsm treats the '[]' as a part of a regex, and since it cannot find the dir it complains that the storage domain does not exist.

Comment 6 Idan Shaby 2017-03-07 06:51:16 UTC
Until this bug was solved, file domains could not be created using IPV6 addresses. Therefore, this will probably require creating new automation tests by QE.
Raz, can you please make sure that it happens?

Comment 7 Raz Tamir 2017-03-10 15:04:53 UTC
Sure

Comment 8 Elad 2017-03-12 11:38:16 UTC
IPv6 export path is accepted. ConnectStorageServer is executed using the correct path including the IPv6 address of the NFS server.  

2017-03-12 13:32:15,311+02 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] (default task-28) [b6c72be6-776b-4b6c-a044-f80317eed34e] START, ConnectStorageServerVDSCommand(HostName
 = host_mixed_1, StorageServerConnectionManagementVDSParameters:{runAsync='true', hostId='652a6dec-7c2d-423e-9b9b-abcb4c29d04f', storagePoolId='00000000-0000-0000-0000-000000000000', storageType='NFS', connectio
nList='[StorageServerConnections:{id='null', connection='[fe80::21b:21ff:fe75:35fb]:/Storage_NFS/elad/2', iqn='null', vfsType='null', mountOptions='null', nfsVersion='AUTO', nfsRetrans='null', nfsTimeo='null', i
face='null', netIfaceName='null'}]'}), log id: 33dd9a16



Used:
rhevm-4.1.1.3-0.1.el7.noarch
vdsm-4.19.7-1.el7ev.x86_64