Created attachment 1340163 [details] logs + screenshot Description of problem: Creation of duplicate OVN networks on different oVirt Data Centers, pops unfriendly UI error message: " Error while executing action: may not be null Attribute: networkId " Version-Release number of selected component (if applicable): 4.2.0-0.0.master.20171013142622.git15e767c.el7.centos ovirt-provider-ovn-1.2-0.20171013135342.git023d6ce.el7.centos.noarch How reproducible: 100% Steps to Reproduce: 1. Create OVN network 'ovn_network_1' with subnet (supply CIDR) on DC1. 2. Try to create additional duplicate network name 'ovn_network_1' with subnet (supply CIDR) on the default DC. 3. UI shows an error (screenshot is attached to the ticket). Actual results: Unfriendly message. Expected results: Should be handled in UI (validation or better error message) or in engine (should block duplicate names).
Since OVN does not support it, we should not allow net name dups. We should have a clearer error message, though.
self.idl.ls_add(switch=name, may_exist=False).execute() just exits cleanly if name is a duplicate Two solution for this: - better log message - must validate the logical switch exists before adding it - allow duplicate names - store actual name in external_ids
Patch posted: https://gerrit.ovirt.org/#/c/92177/
Instead of updating the ui to throw a better error message, the ovirt-provider-ovn service was updated to *allow* networks having the same name. This suggestion can be seen in comment#2: 'allow duplicate names - store actual name in external_ids'. To verify the bug, you should check that indeed networks with the same name are allowed - e.g. no UI error thrown. To further verify it, you could use ovn-nbctl in engine node to check the data of the networks: - ovn-nbctl list logical_switch You should see multiple logical switches with names in the following format: ovirt-<network_name>-<generated_uuid>. Each of those logical switches should have the user specified name in its external ids column - one entry like 'name: <user_specified_name>'
Verified according to comment #4 on: ovirt-engine-4.2.6-0.1.el7ev.noarch ovirt-provider-ovn-1.2.14-1.el7ev.noarch openvswitch-ovn-common-2.9.0-55.el7fdp.x86_64 openvswitch-ovn-central-2.9.0-55.el7fdp.x86_64