Bug 1334096 - REST API: Search cluster request returns empty result (v3)
Summary: REST API: Search cluster request returns empty result (v3)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.0-beta
: 4.0.0
Assignee: Juan Hernández
QA Contact: Nelly Credi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-08 11:06 UTC by Nelly Credi
Modified: 2016-07-05 07:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-05 07:51:56 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
oourfali: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)
engine logs (516.10 KB, application/x-bzip)
2016-05-08 11:06 UTC, Nelly Credi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 57237 0 master MERGED restapi: Fix system permissions server 2016-05-09 16:38:40 UTC
oVirt gerrit 57319 0 None None None 2016-05-10 16:46:21 UTC

Description Nelly Credi 2016-05-08 11:06:29 UTC
Created attachment 1155037 [details]
engine logs

Description of problem:
In V3, when sending a search request for clusters, an empty object is returned

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. /ovirt-engine/api/clusters;max=-1;case_sensitive=false?search=name%3DGolden_Env
2.
3.

Actual results:


    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <clusters/>
     



Expected results:

list of clusters


Additional info:
attached logs - it happened around 18:18

Comment 1 Red Hat Bugzilla Rules Engine 2016-05-09 05:45:30 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Juan Hernández 2016-05-09 08:23:39 UTC
I can't reproduce this in my environment. However I see in the attached logs some SQL errors, for example:

  ERROR: insert or update on table "host_device" violates foreign key constraint "fk_host_device_parent_name"
  Detail: Key (host_id, parent_device_name)=(19d32811-c8dc-4eca-8d09-497d75899165, scsi_host36) is not present in table "host_device".

Could it be that due to previous errors the cluster wasn't really created?

I also see in the log another API problem with the top level /permissions resource. I will fix that. May that failure abort the test so that the cluster isn't created?

Comment 3 Juan Hernández 2016-05-09 08:49:06 UTC
Note that the proposed patch fixes the issue with the system permissions resource, but as I can't reproduce the original problem in my environment I can't say that it really fixes the issue.

Comment 4 Yaniv Lavi 2016-05-09 10:53:08 UTC
Moving to first RC, since things should not be targeted to second one at this point.

Comment 5 Nelly Credi 2016-05-09 15:55:46 UTC
We are actually not creating the clusters during the tests, but running on a pre-existing environment with 2 clusters matching this regex, so I cannot imagine such situation and the clusters still existed at the end of the execution
I will try to manually reproduce and update

Comment 6 Juan Hernández 2016-05-10 09:13:26 UTC
As it is not clear if the proposed fix solves the issue, I'm moving the bug back to ASSIGNED, and re-setting the need info. Nelly, please clear the need info when/if you are able to reproduce.

Comment 8 Juan Hernández 2016-05-10 16:45:40 UTC
The problem is that the value of the "case_sensitive" parameter is ignored, so the following request:

  /clusters;max=-1;case_sensitive=false?search=name%3DGolden_Env%2A

Was looking for clusters named exactly, including case, Golden_Env*, and the clusters in that environment have lower case names, like "golden_env_mixed_1" and "golden_env_mixed_2". The proposed patch fixes this regression.

Comment 9 Sandro Bonazzola 2016-07-05 07:51:56 UTC
oVirt 4.0.0 has been released, closing current release.


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