Bug 1338747 - Upgrade Step: remove_elasticsearch logs ERRORs about packages
Summary: Upgrade Step: remove_elasticsearch logs ERRORs about packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Christine Fouant
QA Contact: Lukas Pramuk
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-05-23 11:37 UTC by Lukas Pramuk
Modified: 2019-09-26 14:47 UTC (History)
4 users (show)

Fixed In Version: katello-installer-3.0.0.34-1,katello-installer-base-3.0.0.38-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:38:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14128 0 None None None 2016-05-23 20:02:30 UTC
Foreman Issue Tracker 14695 0 None None None 2016-05-24 02:16:58 UTC
Foreman Issue Tracker 15218 0 None None None 2016-05-27 19:02:30 UTC

Description Lukas Pramuk 2016-05-23 11:37:08 UTC
Description of problem:
Upgrade Step: remove_elasticsearch logs ERRORs about packages
If these are expected then they shouldnt be logged as errors

Version-Release number of selected component (if applicable):
Sat6.2.0-Snap12

How reproducible:
always

Steps to Reproduce:
1.Upgrade Step: remove_elasticsearch
[ INFO 2016-05-21 07:21:33 main] Upgrade Step: remove_elasticsearch...
[DEBUG 2016-05-21 07:21:33 main] elasticsearch-0.90.10-7.el6.noarch

[ERROR 2016-05-21 07:21:33 main] error: package ruby193-rubygem-tire is not installed

[ERROR 2016-05-21 07:21:33 main] error: package tfm-rubygem-tire is not installed

[DEBUG 2016-05-21 07:21:34 main] warning: /etc/sysconfig/elasticsearch saved as /etc/sysconfig/elasticsearch.rpmsave
warning: /etc/elasticsearch/elasticsearch.yml saved as /etc/elasticsearch/elasticsearch.yml.rpmsave

[ERROR 2016-05-21 07:21:34 main] error: Failed dependencies:
        sigar = 1.6.5-0.9.git58097d9.el6sat is needed by (installed) sigar-java-1.6.5-0.9.git58097d9.el6sat.x86_64

[DEBUG 2016-05-21 07:21:34 main] 
[DEBUG 2016-05-21 07:21:35 main] 
[DEBUG 2016-05-21 07:21:35 main] 
[ INFO 2016-05-21 07:21:35 main] Elasticsearch has been removed as a dependency, the database files can be removed manually with #rm -rf /var/lib/elasticsearch


Actual results:
errors in log

Expected results:
no errors

Additional info:

Comment 2 Christine Fouant 2016-05-23 19:15:45 UTC
Connecting redmine issue http://projects.theforeman.org/issues/14128 from this bug

Comment 3 Christine Fouant 2016-05-23 19:23:21 UTC
https://github.com/Katello/katello-installer/pull/312

This pull request makes the user responsible for actually deleting elasticsearch, and thus would solve the incorrect errors showing upon upgrade.

Comment 4 Brad Buckingham 2016-05-24 02:17:59 UTC
This fix will require 2 redmine issues.  Refer to external trackers for details.

Comment 5 Lukas Pramuk 2016-05-26 12:08:03 UTC
VERIFIED.

@satellite-6.2.0-13.0.el6sat.noarch
katello-installer-base-3.0.0.34-2.el6sat.noarch

# satellite-installer  --upgrade 
...
Upgrade Step: db_seed...
Upgrade Step: import_package_groups (this may take a while) ...
Upgrade Step: import_rpms (this may take a while) ...
Upgrade Step: import_distributions (this may take a while) ...
Upgrade Step: import_puppet_modules (this may take a while) ...
Upgrade Step: import_subscriptions (this may take a while) ...
Upgrade Step: elasticsearch_message...
Elasticsearch has been removed as a dependency.  The database files can be removed manually with #rm -rf /var/lib/elasticsearch.  Some packages are no longer needed and can be removed:  #rpm -e ruby193-rubygem-tire tfm-rubygem-tire elasticsearch sigar snappy-java lucene4-contrib lucene4
Upgrade Step: remove_docker_v1_content (this may take a while) ...
Katello upgrade completed!

>>> elasticsearch step is now just messaging thus causing no errors in the log

Comment 6 Lukas Pramuk 2016-05-26 12:15:26 UTC
# rpm -e ruby193-rubygem-tire tfm-rubygem-tire elasticsearch sigar snappy-java lucene4-contrib lucene4

Should it be "... sigar sigar-java..." I see no snappy-java??
If I actually try that command I get:

# rpm -e elasticsearch sigar snappy-java lucene4-contrib lucene4error: Failed dependencies:
	sigar = 1.6.5-0.9.git58097d9.el6sat is needed by (installed) sigar-java-1.6.5-0.9.git58097d9.el6sat.x86_64

>>> deps error with snappy-java

vs.

# rpm -e elasticsearch sigar sigar-java lucene4-contrib lucene4
warning:    erase unlink of /var/lib/elasticsearch failed: No such file or directory
warning: /etc/sysconfig/elasticsearch saved as /etc/sysconfig/elasticsearch.rpmsave
warning: /etc/elasticsearch/elasticsearch.yml saved as /etc/elasticsearch/elasticsearch.yml.rpmsave

>>> succeeded with sigar-java

Comment 8 Brad Buckingham 2016-05-26 12:27:10 UTC
Christine,  from the info above, it looks like the command that we give the user does not work correctly.  Can you take a look and have the message updated?   Thanks!

Comment 9 Bryan Kearney 2016-05-26 14:17:08 UTC
Upstream bug assigned to ehelms

Comment 10 Bryan Kearney 2016-05-27 18:17:54 UTC
Upstream bug assigned to ehelms

Comment 11 Bryan Kearney 2016-05-27 20:16:44 UTC
Upstream bug assigned to cfouant

Comment 12 Bryan Kearney 2016-05-27 20:16:46 UTC
Upstream bug component is Content Management

Comment 13 Bryan Kearney 2016-05-27 20:16:49 UTC
Upstream bug assigned to cfouant

Comment 14 Christine Fouant 2016-05-31 16:23:12 UTC
(In reply to Lukas Pramuk from comment #6)
> # rpm -e ruby193-rubygem-tire tfm-rubygem-tire elasticsearch sigar
> snappy-java lucene4-contrib lucene4
> 
> Should it be "... sigar sigar-java..." I see no snappy-java??
> If I actually try that command I get:
> 
> # rpm -e elasticsearch sigar snappy-java lucene4-contrib lucene4error:
> Failed dependencies:
> 	sigar = 1.6.5-0.9.git58097d9.el6sat is needed by (installed)
> sigar-java-1.6.5-0.9.git58097d9.el6sat.x86_64
> 
> >>> deps error with snappy-java
> 
> vs.
> 
> # rpm -e elasticsearch sigar sigar-java lucene4-contrib lucene4
> warning:    erase unlink of /var/lib/elasticsearch failed: No such file or
> directory
> warning: /etc/sysconfig/elasticsearch saved as
> /etc/sysconfig/elasticsearch.rpmsave
> warning: /etc/elasticsearch/elasticsearch.yml saved as
> /etc/elasticsearch/elasticsearch.yml.rpmsave
> 
> >>> succeeded with sigar-java

Added sigar-java to the list of packages to remove. Kept snappy-java as it is included although you may not have seen it on your system.

Fixed by https://github.com/Katello/katello-installer/pull/349

Comment 15 Lukas Pramuk 2016-06-02 13:17:55 UTC
VERIFIED.

@satellite-6.2.0-14.1.el6sat.noarch
katello-installer-base-3.0.0.39-1.el6sat.noarch

# satellite-installer --upgrade
...
Upgrade Step: elasticsearch_message...
Elasticsearch has been removed as a dependency.  The database files can be removed manually with #rm -rf /var/lib/elasticsearch.  Some packages are no longer needed and can be removed:  #rpm -e ruby193-rubygem-tire tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib lucene4

>>> step causes no errors and lists all packages for removal

Comment 16 Bryan Kearney 2016-07-27 11:38:34 UTC
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.

https://access.redhat.com/errata/RHBA-2016:1501


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