Bug 501925
Summary: | `service rhn-search cleanindex` do not work | ||
---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Jan Hutař <jhutar> |
Component: | New Feature | Assignee: | John Matthews <jmatthew> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Jan Hutař <jhutar> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 530 | CC: | cperry |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | sat530 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-09-10 19:32:36 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 457073 |
Description
Jan Hutař
2009-05-21 11:02:59 UTC
# rpm -qa | grep -i java | sort java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 java-1.6.0-ibm-1.6.0.4-1jpp.1.el5.x86_64 java-1.6.0-ibm-devel-1.6.0.4-1jpp.1.el5.x86_64 java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5.x86_64 java-1.6.0-openjdk-devel-1.6.0.0-0.25.b09.el5.x86_64 spacewalk-java-0.5.44-17.el5sat.noarch spacewalk-java-config-0.5.44-17.el5sat.noarch spacewalk-java-lib-0.5.44-17.el5sat.noarch Most likely want to use: /etc/alternatives/java as command, rather than 'java' for the 'exec java' and hope that it is correctly within the bash environment $PATH. removeindex() { SEARCH_CLASS_PATH=`build-classpath-directory /usr/share/rhn/search/lib /usr/share/java/ojdbc14.jar` CLASSPATH=${SEARCH_CLASS_PATH} exec java com.redhat.satellite.search.DeleteIndexes } Cliff PS - John - not sure why, but maybe cleanindex should also restart search post running, my older (month old 530 Sat shows): 'cleanindex') stopit unlock removeindex ;; I have just resolved this. This appeared on the system where I have installed & uninstalled Satellite few times and I have just noted that /etc/alternatives/java was a broken link. So this is not a $PATH issue, this was problem with a system. `alternatives --auto java` fixed the link. Sorry for a mess :-( Vader commit: 3a09a2120282008ade983a6075e4893f28bc8a04 Changed cleanindex to start search after clean has completed. Seems to be working correctly now on Satellite-5.3.0-RHEL5-re20090612.0-x86_64: # service rhn-search cleanindex Stopping rhn-search... Stopped rhn-search. 09/06/17 13:34:50 INFO search.DeleteIndexes: Running query: deleteLastErrata 09/06/17 13:34:51 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/errata 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastPackage 09/06/17 13:34:52 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/package 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastServer 09/06/17 13:34:52 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/server 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastHardwareDevice 09/06/17 13:34:52 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/hwdevice 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastSnapshotTag 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastServerCustomInfo 09/06/17 13:34:52 INFO search.DeleteIndexes: Index files have been deleted and database has been cleaned up, ready to reindex Starting rhn-search... # service rhn-search status rhn-search is running (6381). 5.3.0 stage testing: service rhn-search cleanindex cleans the indexes and starts the service again -> RELEASE_PENDING An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1434.html |