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.
Bug 1331117 - Reinstalling satellite after katello-remove failed
Summary: Reinstalling satellite after katello-remove failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.2.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Chris Duryee
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-27 18:58 UTC by sthirugn@redhat.com
Modified: 2019-09-25 20:40 UTC (History)
6 users (show)

Fixed In Version: katello-3.0.0-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:28:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14125 0 Normal Closed katello-remove does not remove many things 2020-03-01 23:30:45 UTC

Description sthirugn@redhat.com 2016-04-27 18:58:13 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1. Install Satellite 6.2 Snap 9.3
2. Sync some repos, create/publish content views
3. backup satellite:
   - cd /mnt/backup
   - katello-backup .
5. Remote satellite:
   - katello-remove
6. Reinstall satellite to perform restore:
   - yum -y install katello
7. # foreman-installer --scenario=katello
Installing             +++ /tmp/puppet-file20160427-20128-1admhrkg/Exec[2016-04 [99%] [......................................................... /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
 /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0]
 Proxy ibm-x3550m3-10.lab.eng.brq.redhat.com cannot be registered (422 Unprocessable Entity): Unable to communicate with the Capsule: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verif...) for Capsule https://ibm-x3550m3-10.lab.eng.brq.redhat.com:8443/features Please check the Capsule is configured and running on the host.
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ibm-x3550m3-10.lab.eng.brq.redhat.com]/ensure: change from absent to present failed: Proxy ibm-x3550m3-10.lab.eng.brq.redhat.com cannot be registered (422 Unprocessable Entity): Unable to communicate with the Capsule: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verif...) for Capsule https://ibm-x3550m3-10.lab.eng.brq.redhat.com:8443/features Please check the Capsule is configured and running on the host.
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ibm-x3550m3-10.lab.eng.brq.redhat.com]: Failed to call refresh: Proxy ibm-x3550m3-10.lab.eng.brq.redhat.com cannot be registered (ApipieBindings::MissingArgumentsError: id): N/A
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ibm-x3550m3-10.lab.eng.brq.redhat.com]: Proxy ibm-x3550m3-10.lab.eng.brq.redhat.com cannot be registered (ApipieBindings::MissingArgumentsError: id): N/A
Installing             Done                                               [100%] [....................................................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/katello.log


Actual results:
Installation failed

Expected results:
Installation should pass so I can run restore from backup

Additional info:

Comment 1 sthirugn@redhat.com 2016-04-27 18:59:23 UTC
Description of problem:
Reinstalling satellite after katello-remove failed

Version-Release number of selected component (if applicable):
Sat-6.2.beta-snap-9.3

How reproducible:
Always

Comment 6 Chris Roberts 2016-05-07 20:43:22 UTC
[root@dhcp-10-12-211-50 amqp]# cd /etc/gutterball/
[root@dhcp-10-12-211-50 gutterball]# ls
certs  gutterball.conf
[root@dhcp-10-12-211-50 gutterball]# ll -R
.:
total 4
drwxr-xr-x. 3 root   root    17 May  7 16:40 certs
-rw-r-----. 1 tomcat tomcat 575 Oct 30  2015 gutterball.conf

./certs:
total 0
drwxr-x---. 2 tomcat tomcat 6 Oct 30  2015 amqp

./certs/amqp:
total 0

Clean /etc/gutterball directory after my upstream remove script and a reinstall of katello (# yum install katello) Will test install now with katello-installer.

Comment 7 Chris Roberts 2016-05-07 20:54:02 UTC
[ERROR 2016-05-07 16:46:21 main]  /Stage[main]/Certs::Gutterball/Certs::Ssltools::Keytool::Import_keypair[import client certificate into gutterball keystore]/Certs::Ssltools::Keytool::Convert_pkcs12_to_jks[[import client certificate into gutterball keystore] convert tmp pkcs12 keystore to jks]/Exec[[import client certificate into gutterball keystore] convert tmp pkcs12 keystore to jks]: Failed to call refresh: keytool -importkeystore -destkeystore /etc/gutterball/certs/amqp//gutterball.jks -srckeystore /tmp/gutterballkeystore.p12 -srcstoretype pkcs12 -alias gutterball -storepass DSAkmyGZuSsS8dnthivTVWCuMeY2rxxe -srcstorepass DSAkmyGZuSsS8dnthivTVWCuMeY2rxxe -noprompt returned 1 instead of one of [0]
[ERROR 2016-05-07 16:46:21 main]  /Stage[main]/Certs::Gutterball/Certs::Ssltools::Keytool::Import_keypair[import client certificate into gutterball keystore]/Certs::Ssltools::Keytool::Convert_pkcs12_to_jks[[import client certificate into gutterball keystore] convert tmp pkcs12 keystore to jks]/Exec[[import client certificate into gutterball keystore] convert tmp pkcs12 keystore to jks]: keytool -importkeystore -destkeystore /etc/gutterball/certs/amqp//gutterball.jks -srckeystore /tmp/gutterballkeystore.p12 -srcstoretype pkcs12 -alias gutterball -storepass DSAkmyGZuSsS8dnthivTVWCuMeY2rxxe -srcstorepass DSAkmyGZuSsS8dnthivTVWCuMeY2rxxe -noprompt returned 1 instead of one of [0]
[root@dhcp-10-12-211-50 gutterball]# keytool -importkeystore -destkeystore /etc/gutterball/certs/amqp//gutterball.jks -srckeystore /tmp/gutterballkeystore.p12 -srcstoretype pkcs12 -alias gutterball -storepass DSAkmyGZuSsS8dnthivTVWCuMeY2rxxe -srcstorepass DSAkmyGZuSsS8dnthivTVWCuMeY2rxxe -noprompt
keytool error: java.lang.Exception: Keystore file exists, but is empty: /etc/gutterball/certs/amqp//gutterball.jks

Comment 11 Chris Roberts 2016-05-13 17:19:47 UTC
fixed katello-remove to allow 6.2 to be reinstalled

[ INFO 2016-05-13 13:01:06 verbose]  Class[Foreman_proxy::Register]: Scheduling refresh of Foreman_smartproxy[sat62.toledo.satellite.lab.eng.rdu2.redhat.com]
[ WARN 2016-05-13 13:01:44 verbose]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[sat62.toledo.satellite.lab.eng.rdu2.redhat.com]/ensure: created
[ WARN 2016-05-13 13:01:44 verbose]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[sat62.toledo.satellite.lab.eng.rdu2.redhat.com]: Triggered 'refresh' from 1 events
[ WARN 2016-05-13 13:01:45 verbose]  Finished catalog run in 819.79 seconds
[ INFO 2016-05-13 13:01:50 verbose] Puppet has finished, bye!
[ INFO 2016-05-13 13:01:50 verbose] Executing hooks in group post
  Success!
  * Katello is running at https://sat62.toledo.satellite.lab.eng.rdu2.redhat.com
      Initial credentials are admin / A5vnqsoEFowKzrAo
  * To install additional capsule on separate machine continue by running:

      capsule-certs-generate --capsule-fqdn "$CAPSULE" --certs-tar "~/$CAPSULE-certs.tar"

  The full log is at /var/log/foreman-installer/katello.log
[ INFO 2016-05-13 13:01:50 verbose] All hooks in group post finished


Bash history:

5  yum install satellite -y
8  vi /usr/bin/katello-remove 
9  katello-remove
12 yum install satellite -y 
54  foreman-installer --scenario katello -v

Comment 12 Chris Roberts 2016-05-16 16:41:40 UTC
Did smoketests on RHEL 6 and 7 with 6.2 and tested upstream as well and it reinstalls correctly. Going to submit PR this week.

- Chris

Comment 13 Chris Duryee 2016-07-08 18:48:44 UTC
verified on snap 19.1.

steps:

* install 19.1, create a product, sync a yum repo, publish a CV
* katello-backup /mnt/backup
* katello-remove, no errors
* ensure system has repos enabled to install sat again
* yum install -y satellite
* satellite-installer --scenario satellite
* katello-restore /mnt/backup

result: hit an unrelated error but opened a new BZ. this BZ verified OK.

opened new bz https://bugzilla.redhat.com/show_bug.cgi?id=1354028 for katello-restore issue.

Comment 14 Bryan Kearney 2016-07-27 11:28:25 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.