Description of problem: On a 5.3.0 satellite, if there're custom info keys but no values set for servers, then attempting to do system search via Custom Info will return no-index error in UI and exception in logs, e.g., - /var/log/rhn/search/rhn_search.log: ... com.redhat.satellite.search.index.IndexingException: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/usr/share/rhn/search/indexes/serverCustomInfo: files: at com.redhat.satellite.search.index.IndexManager.search(IndexManager.java:189) at com.redhat.satellite.search.rpc.handlers.IndexHandler.search(IndexHandler.java:147) at com.redhat.satellite.search.rpc.handlers.IndexHandler.search(IndexHandler.java:120) ) ... Caused by: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/usr/share/rhn/search/indexes/serverCustomInfo: files: at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:587) at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:63) at org.apache.lucene.index.IndexReader.open(IndexReader.java:209) at org.apache.lucene.index.IndexReader.open(IndexReader.java:192) at com.redhat.satellite.search.index.IndexManager.getIndexReader(IndexManager.java:364) at com.redhat.satellite.search.index.IndexManager.search(IndexManager.java:161) ... 15 more ... /var/log/rhn/search/rhn_search_daemon.log: ... INFO | jvm 1 | 2009/11/13 16:03:36 | 2009-11-13 16:03:35,985 [Thread-6] ERROR com.redhat.satellite.search.rpc.handlers.IndexHandler - Caught exception: INFO | jvm 1 | 2009/11/13 16:03:36 | com.redhat.satellite.search.index.IndexingException: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/usr/share/rhn/search/indexes/serverCustomInfo: files: INFO | jvm 1 | 2009/11/13 16:03:36 | at com.redhat.satellite.search.index.IndexManager.search(IndexManager.java:189) INFO | jvm 1 | 2009/11/13 16:03:36 | at com.redhat.satellite.search.rpc.handlers.IndexHandler.search(IndexHandler.java:147) INFO | jvm 1 | 2009/11/13 16:03:36 | at com.redhat.satellite.search.rpc.handlers.IndexHandler.search(IndexHandler.java:120) INFO | jvm 1 | 2009/11/13 16:03:36 | at com.redhat.satellite.search.rpc.handlers.IndexHandler.search(IndexHandler.java:80) ... INFO | jvm 1 | 2009/11/13 16:03:36 | Caused by: INFO | jvm 1 | 2009/11/13 16:03:36 | java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/usr/share/rhn/search/indexes/serverCustomInfo: files: INFO | jvm 1 | 2009/11/13 16:03:36 | at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:587) INFO | jvm 1 | 2009/11/13 16:03:36 | at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:63) IndexReader.java:209) IndexReader.java:192) nager.getIndexReader(IndexManager.java:364) nager.search(IndexManager.java:161) INFO | jvm 1 | 2009/11/13 16:03:36 | ... 15 more atcher writeError /rhn/search/indexes/serverCustomInfo: files: ... This is b/c index files are currently only generated when data is returned from the database. An empty one should be generated regardless if there's data or not, instead of erroring out on UI and stacktraces in logs. Version-Release number of selected component (if applicable): Red Hat Network (RHN) Satellite 5.3.0 How reproducible: Always. Steps to Reproduce: 1. Have a 5.3.0 satellite with at least 1 server custom info key but value set for any systems. 2. Go to Systems -> Advanced Search and search for something by Custom Info. Actual results: Error in UI about missing index files and asking user to re-generate search index, however the error persists after that. Also error in search logs (see stacktraces above). No files found under /usr/share/rhn/search/indexes/serverCustomInfo/ at all. Expected results: Empty index files should be generated, and search should return no results instead of error. Additional info: Solution is to set at least one custom info value for at least one server, then regenerate search indexes (/etc/init.d/rhn-search cleanindex; service rhn-search restart).
I believe this should fix the issue: b2218820cb0d0e854a48050051f2afd443bf0a0b
I managed to reproduce the problem on Satellite 5.3 (spacewalk-search-0.5.10-15.el5sa.) On Satellite 5.4 (spacewalk-search-1.2.2-1.el5sat.noarch) the problem does not appear. Dimi
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford