Bug 1267678 - Network names leak between datacenters / Used query (name=ovirtmgmt) produces ambiguous results
Network names leak between datacenters / Used query (name=ovirtmgmt) produces...
Status: CLOSED WONTFIX
Product: ovirt-engine-cli
Classification: oVirt
Component: General (Show other bugs)
3.6.0.2
Unspecified Unspecified
low Severity low (vote)
: ovirt-4.1.0-alpha
: ---
Assigned To: Juan Hernández
Pavel Stehlik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-30 12:01 EDT by Jiri Belka
Modified: 2016-05-10 06:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 06:21:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
juan.hernandez: ovirt‑4.1?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

  None (edit)
Description Jiri Belka 2015-09-30 12:01:39 EDT
Description of problem:
I had two DCs, each of them with 'ovirtmgmt' network.

[RHEVM shell (connected)]# add label --parent-datacenter-name Default --parent-network-name ovirtmgmt --id mylabel
  ====================================================================================================== ERROR ===================================================================================================
                                                                               Used query (name=ovirtmgmt) produces ambiguous results.
  ================================================================================================================================================================================================================

Seems strange as there is "filter" for 'Default' DC only.



* About to connect() to jb-rhevm36.rhev.lab.eng.brq.example.com port 443 (#0)
* Trying 127.0.0.1...
* connected
* Connected to jb-rhevm36.rhev.lab.eng.brq.example.com (127.0.0.1) port 443 (#0)
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject: CN=jb-rhevm36.rhev.lab.eng.brq.example.com,O=rhev.lab.eng.brq.example.com,C=US
* start date: Aug 16 11:37:40 2015 GMT
* expire date: Jul 21 11:37:40 2020 GMT
* common name: jb-rhevm36.rhev.lab.eng.brq.redhat.com
* issuer: CN=jb-rhevm36.rhev.lab.eng.brq.example.com.42113,O=rhev.lab.eng.brq.example.com,C=US
* Server auth using Basic with user 'admin@internal'
> GET /api/networks?search=name%3Dovirtmgmt HTTP/1.1
> Authorization: Basic YWRtaW5AaW50ZXJuYWw6MTIzNDU2
> User-Agent: PycURL/7.19.7
> Host: jb-rhevm36.rhev.lab.eng.brq.example.com
> Cookie: JSESSIONID=J4YWzIDlsER5C3yjSYy79+eO
> Content-Type: application/xml
> Accept: application/xml
> Filter: False
> Prefer: persistent-auth
> Content-Length: 0
< HTTP/1.1 200 OK
< Date: Wed, 30 Sep 2015 15:58:02 GMT
< Pragma: No-cache
< Cache-Control: no-cache
< Expires: Thu, 01 Jan 1970 01:00:00 CET
< JSESSIONID: J4YWzIDlsER5C3yjSYy79+eO
< Content-Type: application/xml
< Content-Length: 1597
< Vary: Accept-Encoding
< Connection: close
< 
< <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< <networks>
<     <network href="/api/networks/3ce62ab4-7de1-47b6-88d6-4fff0c510581" id="3ce62ab4-7de1-47b6-88d6-4fff0c510581">
<         <name>ovirtmgmt</name>
<         <description>Default Management Network</description>
<         <link href="/api/networks/3ce62ab4-7de1-47b6-88d6-4fff0c510581/permissions" rel="permissions"/>
<         <link href="/api/networks/3ce62ab4-7de1-47b6-88d6-4fff0c510581/vnicprofiles" rel="vnicprofiles"/>
<         <link href="/api/networks/3ce62ab4-7de1-47b6-88d6-4fff0c510581/labels" rel="labels"/>
<         <data_center href="/api/datacenters/90ded66c-e9f4-46ef-ba0e-28d12d014648" id="90ded66c-e9f4-46ef-ba0e-28d12d014648"/>
<         <stp>false</stp>
<         <mtu>0</mtu>
<         <usages>
<             <usage>vm</usage>
<         </usages>
<     </network>
<     <network href="/api/networks/00000000-0000-0000-0000-000000000009" id="00000000-0000-0000-0000-000000000009">
<         <name>ovirtmgmt</name>
<         <description>Management Network</description>
<         <link href="/api/networks/00000000-0000-0000-0000-000000000009/permissions" rel="permissions"/>
<         <link href="/api/networks/00000000-0000-0000-0000-000000000009/vnicprofiles" rel="vnicprofiles"/>
<         <link href="/api/networks/00000000-0000-0000-0000-000000000009/labels" rel="labels"/>
<         <data_center href="/api/datacenters/00000001-0001-0001-0001-0000000003e1" id="00000001-0001-0001-0001-0000000003e1"/>
<         <stp>false</stp>
<         <mtu>0</mtu>
<         <usages>
<             <usage>vm</usage>
<         </usages>
<     </network>
< </networks>
* Closing connection #0
[1;31m  ====================================================================================================== ERROR ===================================================================================================
                                                                               Used query (name=ovirtmgmt) produces ambiguous results.
  ================================================================================================================================================================================================================

Version-Release number of selected component (if applicable):
rhevm-sdk-python-3.6.0.2-1.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. two DCs, each with ovirtmgmt network
2. rhevm-shell
3. add label --parent-datacenter-name Default --parent-network-name ovirtmgmt --id mylabel

Actual results:
Used query (name=ovirtmgmt) produces ambiguous results.

Expected results:
imo command should work, there's "filter" which restricts the action to 'Default' DC only

Additional info:
Comment 1 Oved Ourfali 2015-10-14 02:26:21 EDT
Juan - why isn't it network?
Comment 2 Juan Hernández 2015-10-14 03:58:14 EDT
Because the only team that manages SDK issues is infra.
Comment 3 Oved Ourfali 2015-10-14 05:02:32 EDT
Doesn't it happen due to backend related issues?
Comment 4 Juan Hernández 2015-10-14 05:12:55 EDT
I don't think so, but I still have to study it.
Comment 5 Juan Hernández 2016-04-06 08:02:31 EDT
The reason for this error is that the only way that the CLI has to lookup a network by name is to use a query. But queries are only supported by top level collections like /networks, not by sub-collections like /datacenter/{dc:id}/networks. When running the query in the top level collections all the results are returned, because networks can have duplicate names. Fixing this would require important changes to the CLI, which we don't have capacity to do for version 4 of oVirt. We will revisit for 4.1.
Comment 6 Juan Hernández 2016-05-10 06:21:12 EDT
There aren't plans to update the CLI, so this won't be fixed.

Note You need to log in before you can comment on or make changes to this bug.