Bug 1110932

Summary: [RFE] Installer should support "optional" checks
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: InstallationAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, bkearney, cwelton, kbidarka, sthirugn
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/6279
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 08:41:55 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1110521    
Attachments:
Description Flags
Foreman-installer - optional options none

Description Bryan Kearney 2014-06-18 19:53:02 UTC
Based on https://bugzilla.redhat.com/show_bug.cgi?id=1110521, the request is for the kafo installer to have optional checks, or the ability to override them. 

One implementation I could see is for the check to issue a warning, which the user needs to accept to keep installing. The second would be a way to pass in a "--skip-checks-trust-me-I-know-what-I-am-doing" type flag to the installer.

Comment 1 Bryan Kearney 2014-06-18 19:53:43 UTC
Created redmine issue http://projects.theforeman.org/issues/6279 from this bug

Comment 2 RHEL Program Management 2014-06-18 20:04:42 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Bryan Kearney 2015-05-05 08:02:32 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6279 has been closed

Comment 5 Tazim Kolhar 2015-11-17 08:45:48 UTC
Hi,

  please provide verification steps

Thanks and regards,
Tazim

Comment 6 Bryan Kearney 2016-01-12 17:09:52 UTC
Tazim, the goal is that the pre-check will fail, but you can pass in a -s flag to skip the checks and do the install anyways. note, the final installation does not need to work.. just continue..

I would suggest the following:

1) Set your hostname to start with a capital letter (use the sethostname command, or hostname, or edit /etc/sysconfig/network
2) run facter and check that the fqdn shows the capital letter
3) run the installer, and the installer should fail
4) rerun the installer with -s. If the installer starts, the fix is good.

Comment 9 Tazim Kolhar 2016-04-03 07:17:49 UTC
FAILEDQA:
# rpm -qa foreman
foreman-1.11.0.9-1.el7sat.noarch

Steps:
1) Set your hostname to start with a capital letter (use the sethostname command, or hostname, or edit /etc/sysconfig/network
# hostname Dell-pem610-01.rhts.eng.bos.redhat.com

2) run facter and check that the fqdn shows the capital letter
# hostname
Dell-pem610-01.rhts.eng.bos.redhat.com

# hostname -f
Dell-pem610-01.rhts.eng.bos.redhat.com



3) run the installer, and the installer should fail

# foreman-installer --scenario katello
The hostname contains a a capital letter.

This is not supported. Please modify the hostname to be all lowercase. If needed, change the hostname permanently via 'hostname' command and editing 
appropriate configuration file.
(e.g. on Red Hat systems /etc/sysconfig/network).

If 'hostname -f' still returns unexpected result, check /etc/hosts and put
hostname entry in the correct order, for example:
 
  1.2.3.4 full.hostname.com full
 
Fully qualified hostname must be the first entry on the line
Installing             Done                                               [100%] [....................................................................................]
  Success!
  * Katello is running at https://dell-pem610-01.rhts.eng.bos.redhat.com
      Initial credentials are admin / SYZB6L8d4XGoUv55
  * 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


Please, note when I try to access the UI,
I had to use admin/changeme to access the UI

the production.log shows:
 
with admin / SYZB6L8d4XGoUv55

2016-04-03 03:04:22 [app] [I] Started POST "/users/login" for 10.10.61.183 at 2016-04-03 03:04:22 -0400
2016-04-03 03:04:22 [app] [I] Processing by UsersController#login as HTML
2016-04-03 03:04:22 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"TW/I6DsTDRdaQ4JWRoG4bfqRbxgBqQwsHQocll422tU=", "login"=>{"login"=>"admin", "password"=>"[FILTERED]"}, "commit"=>"Login"}
2016-04-03 03:04:22 [app] [I] Redirected to https://dell-pem610-01.rhts.eng.bos.redhat.com/users/login
2016-04-03 03:04:22 [app] [I] Completed 302 Found in 13ms (ActiveRecord: 1.1ms)
2016-04-03 03:04:23 [app] [I] Started GET "/users/login" for 10.10.61.183 at 2016-04-03 03:04:23 -0400
2016-04-03 03:04:23 [app] [I] Processing by UsersController#login as HTML
2016-04-03 03:04:23 [app] [I]   Rendered users/login.html.erb within layouts/login (3.5ms)
2016-04-03 03:04:23 [app] [I]   Rendered layouts/base.html.erb (1.5ms)
2016-04-03 03:04:23 [app] [I] Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.0ms)

Screenshot attached


with admin/changme

2016-04-03 03:07:08 [app] [I] Started POST "/users/login" for 10.10.61.183 at 2016-04-03 03:07:08 -0400
2016-04-03 03:07:08 [app] [I] Processing by UsersController#login as HTML
2016-04-03 03:07:08 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"8KburUpXfjd5hsWQ6Q8TPU/9I8WlVTQGOOYh4xovOD8=", "login"=>{"login"=>"admin", "password"=>"[FILTERED]"}, "commit"=>"Login"}
2016-04-03 03:07:08 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.6ms)
2016-04-03 03:07:08 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.1ms)
2016-04-03 03:07:08 [app] [I] Redirected to https://dell-pem610-01.rhts.eng.bos.redhat.com/hosts
2016-04-03 03:07:08 [app] [I] Completed 302 Found in 32ms (ActiveRecord: 10.6ms)
2016-04-03 03:07:08 [app] [I] Started GET "/hosts" for 10.10.61.183 at 2016-04-03 03:07:08 -0400
2016-04-03 03:07:08 [app] [I] Processing by HostsController#index as HTML
2016-04-03 03:07:08 [app] [I]   Rendered hosts/_list.html.erb (24.7ms)
2016-04-03 03:07:08 [app] [I]   Rendered hosts/index.html.erb within layouts/application (38.5ms)
2016-04-03 03:07:08 [app] [I]   Rendered common/_searchbar.html.erb (8.3ms)
2016-04-03 03:07:08 [app] [I]   Rendered layouts/_application_content.html.erb (8.9ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (1.9ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_user_dropdown.html.erb (2.3ms)
2016-04-03 03:07:08 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_organization_dropdown.html.erb (5.1ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_location_dropdown.html.erb (4.9ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_org_switcher.html.erb (10.9ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (5.3ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (5.9ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (2.0ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (8.4ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (4.3ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (3.0ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (1.9ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_submenu.html.erb (5.0ms)
2016-04-03 03:07:08 [app] [I] Write fragment views/tabs_and_title_records-3 (1.3ms)
2016-04-03 03:07:08 [app] [I]   Rendered home/_topbar.html.erb (59.3ms)
2016-04-03 03:07:08 [app] [I]   Rendered layouts/base.html.erb (61.3ms)
2016-04-03 03:07:08 [app] [I] Completed 200 OK in 145ms (Views: 105.2ms | ActiveRecord: 12.9ms)


Please note:
As, per my understanding, it throws error but the rest of messages are irrelavant.They should be corrected.Since it causes confusion as whether
foreman-installer worked or not

Comment 10 Tazim Kolhar 2016-04-03 07:19:17 UTC
Created attachment 1142920 [details]
Foreman-installer - optional options

Comment 11 Marek Hulan 2016-04-04 07:34:48 UTC
Tazim, if I understand correctly, your report is about installer printing different password than has been set via some QE automation. It's not related to what this BZ was about - skipping checks. Moving again to ON_QA to test, if you're uncertain how to do it, please ping me on IRC, I'll explain.

For the issue you reported here, please verify where and how the "changeme" password is set, if it's configured via installer option it should be printed correctly. If it's not, please open a separate BZ.

Comment 12 Sanket Jagtap 2016-04-22 10:53:17 UTC
Ran the installer as :
foreman-installer --scenario katello
installer failed..

foreman-installer --scenerio katello -s

Installer started..

Comment 14 errata-xmlrpc 2016-07-27 08:41:55 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:1500