Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionBrad Buckingham
2012-03-22 20:11:29 UTC
Description of problem:
This issue would actually exist with both the UI and CLI.
If the user creates a repository, syncs it and then deletes it, the search server's index is not updated to remove the packages and errata previously indexed.
Version-Release number of selected component (if applicable):
git master
How reproducible:
always
Steps to Reproduce:
1. create a provider/product/repo (zoo2/zoo2/zoo2)
2. sync the repo (zoo2)
3. perform a query on elastic search (using curl) for a package in the repo
4. delete the repo (zoo2)
5. perform a query on elastic search (using curl) for a package in the repo
6. re-create and sync the repo (zoo2)
7. perform a query on elastic search (using curl) for a package in the repo
see results for example of steps 3, 5 & 7
Results:
step 3: results are good/expected ("hits" => "total" : 1 => this is what we expected)
-----------------------------------------------------------------------
curl -X GET "http://localhost:9200/katello_package/_search?pretty=true" -d '{"size":1,"query":{"query_string":{"query":"nvrea:cam*"}},"from":0}'
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "katello_package",
"_type" : "package",
"_id" : "cbe9bab8-665f-466f-bcca-3fa517dc1356",
"_score" : 1.0, "_source" : {"repo_defined":true,"vendor":"","_type":"package","_id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","provides":["camel"],"requires":[],"name":"camel","_ns":"packages","checksum":{"sha256":"82e497ca3e7affb5682362b50537af290d0a202e4ad00b6ef62357a2cc9819ba"},"arch":"noarch","id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","group":"Internet/Applications","repoids":["ACME_Corporation-zoo2-zoo2"],"description":"A dummy package of camel","download_url":"https://localhost//pulp/repos/ACME_Corporation/Library/custom/zoo2/zoo2/camel-0.1-1.noarch.rpm","nvrea_sort":"camel-0.1-1.noarch","size":2439,"filename":"camel-0.1-1.noarch.rpm","epoch":"0","license":"GPLv2","buildhost":"smqe-ws15","nvrea":"camel-0.1-1.noarch","release":"1","version":"0.1"}
} ]
}
step 5: results bad ("hits" => "total" : 1 => did not expect to see any results since repo was deleted)
----------------------------------------------------------------------
curl -X GET "http://localhost:9200/katello_ackage/_search?pretty=true" -d '{"size":1,"query":{"query_string":{"query":"nvrea:cam*"}},"from":0}'
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "katello_package",
"_type" : "package",
"_id" : "cbe9bab8-665f-466f-bcca-3fa517dc1356",
"_score" : 1.0, "_source" : {"repo_defined":true,"vendor":"","_type":"package","_id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","provides":["camel"],"requires":[],"name":"camel","_ns":"packages","checksum":{"sha256":"82e497ca3e7affb5682362b50537af290d0a202e4ad00b6ef62357a2cc9819ba"},"arch":"noarch","id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","group":"Internet/Applications","repoids":["ACME_Corporation-zoo2-zoo2"],"description":"A dummy package of camel","download_url":"https://localhost//pulp/repos/ACME_Corporation/Library/custom/zoo2/zoo2/camel-0.1-1.noarch.rpm","nvrea_sort":"camel-0.1-1.noarch","size":2439,"filename":"camel-0.1-1.noarch.rpm","epoch":"0","license":"GPLv2","buildhost":"smqe-ws15","nvrea":"camel-0.1-1.noarch","release":"1","version":"0.1"}
} ]
}
}
step 7: bad results again ("hits" => "total" : 2 => expected there to only be 1 result)
------------------------------------------------------------------------------
curl -X GET "http://localhost:9200/katello_ackage/_search?pretty=true" -d '{"size":1,"query":{"query_string":{"query":"nvrea:cam*"}},"from":0}'
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : 1.0,
"hits" : [ {
"_index" : "katello_package",
"_type" : "package",
"_id" : "cbe9bab8-665f-466f-bcca-3fa517dc1356",
"_score" : 1.0, "_source" : {"repo_defined":true,"vendor":"","_type":"package","_id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","provides":["camel"],"requires":[],"name":"camel","_ns":"packages","checksum":{"sha256":"82e497ca3e7affb5682362b50537af290d0a202e4ad00b6ef62357a2cc9819ba"},"arch":"noarch","id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","group":"Internet/Applications","repoids":["ACME_Corporation-zoo2-zoo2"],"description":"A dummy package of camel","download_url":"https://localhost//pulp/repos/ACME_Corporation/Library/custom/zoo2/zoo2/camel-0.1-1.noarch.rpm","nvrea_sort":"camel-0.1-1.noarch","size":2439,"filename":"camel-0.1-1.noarch.rpm","epoch":"0","license":"GPLv2","buildhost":"smqe-ws15","nvrea":"camel-0.1-1.noarch","release":"1","version":"0.1"}
} ]
}
}
Additional info:
katello commit - 3046522152a23dc9f4cc22cabd06a1781e18bd73
When repo is deleted, if the repo is the only one associated with a given pkg or errata, the index entries for those pkg or errata are removed. If, however, there are multiple repos associated with a given pkg or errata, the deleted repo will be removed from the list of repoids.
QA Verified - 0.1.307-1.el6:
After initially creating and syncing the repo, the query returns one result.
After deleting repo and repeating query, result disappeares
After recreating and syncing the repo, the query once again returns one and only one result.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHEA-2012-0665.html
Description of problem: This issue would actually exist with both the UI and CLI. If the user creates a repository, syncs it and then deletes it, the search server's index is not updated to remove the packages and errata previously indexed. Version-Release number of selected component (if applicable): git master How reproducible: always Steps to Reproduce: 1. create a provider/product/repo (zoo2/zoo2/zoo2) 2. sync the repo (zoo2) 3. perform a query on elastic search (using curl) for a package in the repo 4. delete the repo (zoo2) 5. perform a query on elastic search (using curl) for a package in the repo 6. re-create and sync the repo (zoo2) 7. perform a query on elastic search (using curl) for a package in the repo see results for example of steps 3, 5 & 7 Results: step 3: results are good/expected ("hits" => "total" : 1 => this is what we expected) ----------------------------------------------------------------------- curl -X GET "http://localhost:9200/katello_package/_search?pretty=true" -d '{"size":1,"query":{"query_string":{"query":"nvrea:cam*"}},"from":0}' { "took" : 2, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 1.0, "hits" : [ { "_index" : "katello_package", "_type" : "package", "_id" : "cbe9bab8-665f-466f-bcca-3fa517dc1356", "_score" : 1.0, "_source" : {"repo_defined":true,"vendor":"","_type":"package","_id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","provides":["camel"],"requires":[],"name":"camel","_ns":"packages","checksum":{"sha256":"82e497ca3e7affb5682362b50537af290d0a202e4ad00b6ef62357a2cc9819ba"},"arch":"noarch","id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","group":"Internet/Applications","repoids":["ACME_Corporation-zoo2-zoo2"],"description":"A dummy package of camel","download_url":"https://localhost//pulp/repos/ACME_Corporation/Library/custom/zoo2/zoo2/camel-0.1-1.noarch.rpm","nvrea_sort":"camel-0.1-1.noarch","size":2439,"filename":"camel-0.1-1.noarch.rpm","epoch":"0","license":"GPLv2","buildhost":"smqe-ws15","nvrea":"camel-0.1-1.noarch","release":"1","version":"0.1"} } ] } step 5: results bad ("hits" => "total" : 1 => did not expect to see any results since repo was deleted) ---------------------------------------------------------------------- curl -X GET "http://localhost:9200/katello_ackage/_search?pretty=true" -d '{"size":1,"query":{"query_string":{"query":"nvrea:cam*"}},"from":0}' { "took" : 0, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 1.0, "hits" : [ { "_index" : "katello_package", "_type" : "package", "_id" : "cbe9bab8-665f-466f-bcca-3fa517dc1356", "_score" : 1.0, "_source" : {"repo_defined":true,"vendor":"","_type":"package","_id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","provides":["camel"],"requires":[],"name":"camel","_ns":"packages","checksum":{"sha256":"82e497ca3e7affb5682362b50537af290d0a202e4ad00b6ef62357a2cc9819ba"},"arch":"noarch","id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","group":"Internet/Applications","repoids":["ACME_Corporation-zoo2-zoo2"],"description":"A dummy package of camel","download_url":"https://localhost//pulp/repos/ACME_Corporation/Library/custom/zoo2/zoo2/camel-0.1-1.noarch.rpm","nvrea_sort":"camel-0.1-1.noarch","size":2439,"filename":"camel-0.1-1.noarch.rpm","epoch":"0","license":"GPLv2","buildhost":"smqe-ws15","nvrea":"camel-0.1-1.noarch","release":"1","version":"0.1"} } ] } } step 7: bad results again ("hits" => "total" : 2 => expected there to only be 1 result) ------------------------------------------------------------------------------ curl -X GET "http://localhost:9200/katello_ackage/_search?pretty=true" -d '{"size":1,"query":{"query_string":{"query":"nvrea:cam*"}},"from":0}' { "took" : 2, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "failed" : 0 }, "hits" : { "total" : 2, "max_score" : 1.0, "hits" : [ { "_index" : "katello_package", "_type" : "package", "_id" : "cbe9bab8-665f-466f-bcca-3fa517dc1356", "_score" : 1.0, "_source" : {"repo_defined":true,"vendor":"","_type":"package","_id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","provides":["camel"],"requires":[],"name":"camel","_ns":"packages","checksum":{"sha256":"82e497ca3e7affb5682362b50537af290d0a202e4ad00b6ef62357a2cc9819ba"},"arch":"noarch","id":"cbe9bab8-665f-466f-bcca-3fa517dc1356","group":"Internet/Applications","repoids":["ACME_Corporation-zoo2-zoo2"],"description":"A dummy package of camel","download_url":"https://localhost//pulp/repos/ACME_Corporation/Library/custom/zoo2/zoo2/camel-0.1-1.noarch.rpm","nvrea_sort":"camel-0.1-1.noarch","size":2439,"filename":"camel-0.1-1.noarch.rpm","epoch":"0","license":"GPLv2","buildhost":"smqe-ws15","nvrea":"camel-0.1-1.noarch","release":"1","version":"0.1"} } ] } } Additional info: