Bug 1476823

Summary: [RFE] remove network name restrictions.
Product: [oVirt] ovirt-engine Reporter: Leon Goldberg <lgoldber>
Component: Backend.CoreAssignee: Leon Goldberg <lgoldber>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.4.2CC: bugs, danken, lveyde
Target Milestone: ovirt-4.1.6Keywords: FutureFeature
Target Release: ---Flags: rule-engine: ovirt-4.1?
rule-engine: planning_ack?
danken: devel_ack+
rule-engine: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.1.5.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-19 10:01:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1477204    

Description Leon Goldberg 2017-07-31 14:30:16 UTC
Currently, oVirt limits the names of its networks to 15 alphanumeric characters. This limitation dates back to the ages where all networks were VM network, all were implemented by a Linux bridge, and the same name was used to identify the network and the Linux bridge implementing it on each host. 

That has to change. 15 characters are not enough for humans; spaces, and other special characters are visually useful, and non-English speaking users would love to use their native alphabet in network names. 

For this reason network names are allowed to consist of 256 Unicode characters. If a Linux bridge is created, the name is created from the network name, if it is suitable, or from the network's uuid.

Comment 1 Michael Burman 2017-08-06 05:35:36 UTC
This RFE need some additional work - 

- Issue 1 - When creating names like -
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg

tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt

Engine fails to create vNIC profiles to such networks with internal server error:
2017-08-06 08:23:47,804+03 ERROR [org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand] (default task-8) [6148f74c-7bf4-4cd6-b1b8-6fedc73f30e8] Exception: org.springframework.dao.DataIntegrityViolationExcept
ion: CallableStatementCallback; SQL [{call insertvnicprofile(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(50)
  Where: SQL statement "INSERT INTO vnic_profiles (
        id,
        name,
        network_id,
        network_qos_id,
        port_mirroring,
        passthrough,
        migratable,
        custom_properties,
        description,
        network_filter_id
        )
    VALUES (
        v_id,
        v_name,
        v_network_id,
        v_network_qos_id,
        v_port_mirroring,
        v_passthrough,
        v_migratable,
        v_custom_properties,
        v_description,
        v_network_filter_id
        )"

- Issue 2 - When creating long names with special characters(@#$%^&*) for example:
test-netw-123456-%5#@%&*()_+=1111111
test-net-@#$%^&*(
test55555555555@
Engine doesn't show and recognize those profiles in the VM's vNIC drop down list. 
Engine shows in the VM's vNIC drop down list only long names without special characters, such as:
test555555555555

Comment 2 Michael Burman 2017-09-13 12:09:17 UTC
Verified on - 4.1.6.2-0.1.el7 and vdsm-4.19.31-1.el7ev.x86_64