Bug 1506215

Summary: [UI] Default Network Provider per cluster is not selected as default provider when creating a network
Product: [oVirt] ovirt-engine Reporter: Mor <mkalfon>
Component: Frontend.WebAdminAssignee: Ales Musil <amusil>
Status: CLOSED CURRENTRELEASE QA Contact: Mor <mkalfon>
Severity: low Docs Contact:
Priority: low    
Version: ---CC: bugs, danken, mkalfon, ylavi
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: ovirt-4.3+
Target Release: ---   
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: 2017-12-20 10:46:12 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:
Attachments:
Description Flags
screenshot none

Description Mor 2017-10-25 12:20:22 UTC
Description of problem:
When you have multiple external network providers, and the default 'ovirt-provider-ovn' is selected for a cluster, when you create new external network on this cluster, it selects the last created external network provider as default, where it should select the 'ovirt-provider-ovn' as configured in the cluster settings.

Version-Release number of selected component (if applicable):
4.2.0-0.0.master.20171020191516.gitff33cdc.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. Create additional external network provider (except ovirt-provider-ovn that should be created by engine-setup).
2. Edit exiting cluster and select 'ovirt-provider-ovn' as default network provider.
3. Create external network on that cluster and choose 'Create on external provider' checkbox.

Actual results:
Wrong provider is selected as default external provider (last one that was created in engine).

Expected results:
Should select the default one.

Additional info:

Comment 1 Ales Musil 2017-10-27 12:51:09 UTC
Hi,

Correct me if I am wrong. You want to have selected value based on which cluster is attached? If so it doesn't make much sense: 
- When you have multiple cluster selected which one do you choose for the provider? 
- Current workflow -> User first selects external provider and then clusters.

Comment 2 Mor 2017-10-29 05:48:19 UTC
The bug is about the default value for the external of a logical network created under a cluster that has a value for default network provider. I expect the default value of the logical network to be the one that is defined in the cluster.

Comment 3 Mor 2017-10-29 05:48:53 UTC
Created attachment 1344946 [details]
screenshot

Comment 4 Mor 2017-11-21 08:47:59 UTC
Hi Ales,

I tried to test it on version: 4.2.0-0.0.master.20171119135709.git6d448d3.el7.centos

The behaviour is not what I expected to be (also see my comment #2). 

Currently, it selects 'ovirt-provider-ovn' always, where it should select the External Network Provider as it's set on the cluster entity.

Steps:

1. Create a dummy External Network Provider named 'test_enp'. 
'ovirt-provider-ovn' should exist by default. (at this point, two providers exists the system)
2. Edit a cluster and set the default External Network Provider to be 'test_enp'.
3. Under clusters, choose the cluster and go to the Logical Networks tab, click Add Network and tick on Create on external provider.

--> 'ovirt-provider-ovn' is selected where 'test_enp' should be selected.

Comment 5 Mor 2017-12-07 15:56:22 UTC
Verified on RHV 4.2.0-0.6.el7.noarch

Comment 6 Sandro Bonazzola 2017-12-20 10:46:12 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.