On Thu, Mar 21, 2019 at 2:04 PM Gianluca Cecchi <gianluca.cecchi@gmail.com> wrote:
On Thu, Mar 21, 2019 at 12:39 PM Ales Musil <amusil@redhat.com> wrote:
 
Hi,
simply "select * from network where provider_network_external_id is not null" should do the trick.
 

Thanks. As you can see one of my queries detailed no values:
 
engine=# select provider_network_provider_id,provider_network_external_id,provider_physical_network_id from network;
 provider_network_provider_id | provider_network_external_id | provider_physical_network_id 
------------------------------+------------------------------+------------------------------
                              |                              | 
                              |                              | 
                              |                              | 
                              |                              | 
                              |                              | 
                              |                              | 
                              |                              | 
                              |                              | 
                              |                              | 
(9 rows)


 
anyway:

engine=# select * from network where provider_network_external_id is not null;
 id | name | description | type | addr | subnet | gateway | vlan_id | stp | storage_pool_id | mtu | 
vm_network | provider_network_provider_id | provider_network_external_id | free_text_comment | label
 | qos_id | vdsm_name | dns_resolver_configuration_id | provider_physical_network_id 
----+------+-------------+------+------+--------+---------+---------+-----+-----------------+-----+-
-----------+------------------------------+------------------------------+-------------------+------
-+--------+-----------+-------------------------------+------------------------------
(0 rows)

engine=# 

One more question. Suppose the problem caused any stale vnic on any vm, previously atached on OVN, is there a way to see at db level?
Currently I only have 4 VMs and "network interfaces" in web admin gui doesn't show any OVN, but I would like to crosscheck also at db level, because I think in previous config before doing damages I has some on OVN.


select iface.name, n.name from vm_interface as iface left join vnic_profiles as vnic on iface.vnic_profile_id = vnic.id left join network n on vnic.network_id = n.id where n.provider_network_external_id is not null
 
A bit longer but should show you the ovn network name that might be attached to the VM.

Hopefully this helps
 
Thanks,
Gianluca


 


--

ALES MUSIL

Associate Software Engineer - rhv network

Red Hat EMEA


amusil@redhat.com   IM: amusil