Bug 1321951

Summary: `foreman-installer --reset` does not finish successfully
Product: Red Hat Satellite Reporter: Adam Price <adprice>
Component: InstallerAssignee: Stephen Benjamin <stbenjam>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, kbidarka, mmccune, riehecky, rplevka, stbenjam, sthirugn
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: katello-installer-base-3.0.0.46-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:22:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Adam Price 2016-03-29 12:53:29 UTC
Created attachment 1141242 [details]
foreman-installer logfile

Description of problem:
Foreman-Installer does not finish successfully when resetting the server.

Version-Release number of selected component (if applicable):
Satellite 6.2 SNAP 5.1 on RHEL7


How reproducible:
Always, as far as I can tell


Steps to Reproduce:
Install the SNAP based on dogfood install directions from Mission Control.

yum install <url-to-dogfood-cert> -y
subscription-manager register --org Sat6-CI --activationkey 'Satellite QA RHEL7'
yum install satellite -y
foreman-installer --scenario katello

foreman-installer --reset


Actual results:
Redirecting to /bin/systemctl stop  httpd.service
 /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]
Installing             Done                                               [100%] [..........................................................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/katello.log


Expected results:
Successful completion


Additional info:
/var/log/foreman-installer/katello.log included in attachments

Comment 3 Brad Buckingham 2016-04-21 20:09:57 UTC
WORKAROUND: There currently isn't a workaround.  If a reset is performed and an error occurs, the Satellite server will need to be re-provisioned.

Comment 4 Stephen Benjamin 2016-05-11 17:36:42 UTC
Created redmine issue http://projects.theforeman.org/issues/15014 from this bug

Comment 5 Stephen Benjamin 2016-06-07 12:19:51 UTC
*** Bug 1342577 has been marked as a duplicate of this bug. ***

Comment 6 Roman Plevka 2016-06-16 12:19:03 UTC
WORKAROUND:

move out the following file /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.47/db/seeds.d/108-ensure_sync_notification.rb

The reset (db:seed) will succeed but obviously the `ensure_sync_notification` step will be skipped

Comment 7 Roman Plevka 2016-06-22 11:29:38 UTC
VERIFIED
on sat6.2.0 beta (GA17.0)

# satellite-installer --reset
Installing             Done                                               [100%] [...............................................................................]
  Success!
  * Katello is running at https://sat6-server.com
  * 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/satellite.log
# rpm -qa satellite
satellite-6.2.0-17.0.el6sat.noarch

Comment 8 Bryan Kearney 2016-07-27 11:22:51 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