On Mon, Mar 18, 2019 at 5:08 PM Gianluca Cecchi <gianluca.cecchi@gmail.com> wrote:
On Mon, Mar 18, 2019 at 4:40 PM Miguel Duarte de Mora Barroso <mdbarroso@redhat.com> wrote:
On Mon, Mar 18, 2019 at 2:20 PM Gianluca Cecchi
<gianluca.cecchi@gmail.com> wrote:
>
> Hello,
> passing from old manual to current OVN in 4.3.1 it seems I have some problems with OVN now.
> I cannot assign network on OVN to VM (powered on or off doesn't change).
> When I add//edit a vnic, they are not on the possible choices
> Environment composed by three hosts and one engine (external on vSphere).
> The mgmt network during time has been configured on network named ovirtmgmntZ2Z3
> On engine it seems there are 2 switches for every defined ovn network (ovn192 and ovn172)
> Below some output of commands in case any inconsistency has remained and I can purge it.
> Thanks in advance.
>

I'm very confused here; you mention that on engine there are 2
switches for every ovn network, but, on your ovn-nbctl list
logical_switch output I can clearly see the 2 logical switches where
the OVN logical networks are stored. Who created those ?

I think it could be related to the situation described here (it is the same environment, in the meantime updated also from 4.2.8 to 4.3.1) and previous configuration not backed up at that time:

and some steps not done correctly by me.
After following indications, I tried to import ovn but probably I did it wrong.


Is it possible that you added new networks, instead of importing the old ones?
If so the old networks would just stay in the database, and we would have duplicated networks like you have now.
 
 

Could you show us the properties of those 2 networks ? (e.g. ovn-nbctl
list logical_switch 32367d8a-460f-4447-b35a-abe9ea5187e0 & ovn-nbctl
list logical_switch 64c4c17f-cd67-4e29-939e-2b952495159f)


[root@ovmgr1 ~]# ovn-nbctl list logical_switch 32367d8a-460f-4447-b35a-abe9ea5187e0
_uuid               : 32367d8a-460f-4447-b35a-abe9ea5187e0
acls                : []
dns_records         : []
external_ids        : {}
load_balancer       : []
name                : "ovn192"
other_config        : {subnet="192.168.10.0/24"}
ports               : [affc5570-3e5a-439c-9fdf-d75d6810e3a3, f639d541-2118-4c24-b478-b7a586eb170c]
qos_rules           : []
[root@ovmgr1 ~]# 

[root@ovmgr1 ~]# ovn-nbctl list logical_switch 64c4c17f-cd67-4e29-939e-2b952495159f
_uuid               : 64c4c17f-cd67-4e29-939e-2b952495159f
acls                : []
dns_records         : []
external_ids        : {}
load_balancer       : []
name                : "ovn172"
other_config        : {subnet="172.16.10.0/24"}
ports               : [32c348d9-12e9-4bcf-a43f-69338c887cfc, 3c77c2ea-de00-43f9-a5c5-9b3ffea5ec69]
qos_rules           : []
[root@ovmgr1 ~]# 




@Gianluca Cecchi , I notice that one of your duplicate networks -
'ovn192'  - has no ports attached. That makes it the perfect candidate
to be deleted, and see if it becomes 'listable' on engine. That would
help rule out the 'duplicate name' theory.

 I can try. Can you give me the command to be run?
It is a test oVirt so It would be not a big problem in case of failures in this respect.


At the moment, I can't think of a better alternative. Let's see if
Marcin comes up with a better test / idea / alternative.

Also, please let us know the version of the ovirt-provider-ovn,
openvswitch-ovn-central, and openvswitch-ovn-host.

On engine:
[root@ovmgr1 ~]# rpm -q ovirt-provider-ovn openvswitch-ovn-central openvswitch-ovn-host
ovirt-provider-ovn-1.2.20-1.el7.noarch
openvswitch-ovn-central-2.10.1-3.el7.x86_64
package openvswitch-ovn-host is not installed
[root@ovmgr1 ~]# 

On the 3 hosts I only have this package installed:
openvswitch-ovn-host-2.10.1-3.el7.x86_64

 Thanks
Gianluca