Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1205960 - [RFE] installer check for underscores in hostname
[RFE] installer check for underscores in hostname
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
6.0.8
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: Unused
Assigned To: Katello Bug Bin
Sanket Jagtap
http://projects.theforeman.org/issues...
FAILEDQA in Upstream
: FutureFeature, Triaged
: 1205027 1205044 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-25 21:35 EDT by jnikolak
Modified: 2016-07-27 04:49 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 04:49:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
katello installer log (10.52 KB, text/plain)
2015-03-25 21:35 EDT, jnikolak
no flags Details
katello-installer log (1.29 MB, text/plain)
2015-10-27 08:50 EDT, Tazim Kolhar
no flags Details
katello-installer log (1.29 MB, text/plain)
2015-11-20 13:35 EST, Tazim Kolhar
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 10175 None None None 2016-04-22 12:18 EDT
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 08:24:38 EDT

  None (edit)
Description jnikolak 2015-03-25 21:35:01 EDT
Created attachment 1006617 [details]
katello installer log

rpm -qa katello-installer
katello-installer-0.0.67-1.el6sat.noarch

rpm -qf /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb
rubygem-kafo-0.6.4-2.el6sat.noarch

facter domain fqdn hostname
domain => gsslab.pek.redhat.com
fqdn => jnikolak_sat6_rhel6a.gsslab.pek.redhat.com
hostname => jnikolak_sat6_rhel6a


I get this error when trying to install or reset.

katello-installer --reset
 /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]
 /usr/share/foreman/script/foreman-config      -k ssl_ca_file -v '/etc/foreman/proxy_ca.pem'      -k ssl_certificate -v '/etc/foreman/client_cert.pem'      -k ssl_priv_key -v '/etc/foreman/client_key.pem' returned 1 instead of one of [0]
 /Stage[main]/Certs::Foreman/Exec[foreman_certs_config]/returns: change from notrun to 0 failed: /usr/share/foreman/script/foreman-config      -k ssl_ca_file -v '/etc/foreman/proxy_ca.pem'      -k ssl_certificate -v '/etc/foreman/client_cert.pem'      -k ssl_priv_key -v '/etc/foreman/client_key.pem' returned 1 instead of one of [0]
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[jnikolak_sat6_rhel6a.gsslab.pek.redhat.com]: Could not evaluate: Could not load data from https://jnikolak_sat6_rhel6a.gsslab.pek.redhat.com.gsslab.pek.redhat.com
Installing             Done                                               [100%] [...............................................................................................................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/katello-installer/katello-installer.log
/usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:104:in `error': wrong number of arguments (2 for 1) (ArgumentError)
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:104:in `send'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:104:in `dump_buffer'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:104:in `each'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:104:in `dump_buffer'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:103:in `each'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:103:in `dump_buffer'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:94:in `dump_errors'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/logger.rb:99:in `dump_errors'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/exit_handler.rb:26:in `exit'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:122:in `exit'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:338:in `run_installation'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:109:in `execute'
	from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
	from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
	from /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb:116:in `run'
	from /usr/sbin/katello-installer:9


Looking at the code
#############\
 vi /usr/lib/ruby/gems/1.8/gems/kafo-0.6.4/lib/kafo/kafo_configure.rb
    def self.run
      return super
    rescue SystemExit => e
      self.exit_handler.exit(self.exit_code) # fail in initialize
    end
Comment 1 RHEL Product and Program Management 2015-03-25 21:53:16 EDT
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 3 jnikolak 2015-03-25 23:02:12 EDT
We located that this was caused by having an underscore in the hostname.

If there could be some validation like we have for capitals, than it would be good.


#########
katello-installer --reset
The hostname contains a a capital letter.
This is not supported. Please modify the hostname to be all lowercase.

If this is not possible, than the bug can be closed.
Comment 4 Mike McCune 2015-03-27 11:43:07 EDT
Reworded the summary to state this is an RFE to check for underscores in the installer pre-run checks.
Comment 6 Bryan Kearney 2015-04-17 13:47:26 EDT
Created redmine issue http://projects.theforeman.org/issues/10175 from this bug
Comment 7 Eric Helms 2015-04-21 11:07:22 EDT
*** Bug 1205044 has been marked as a duplicate of this bug. ***
Comment 8 Bryan Kearney 2015-04-23 14:06:05 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/10175 has been closed
-------------
Anonymous
Applied in changeset commit:katello-installer|5621fa77a6f6e110519cd60d9b8d1a51d67dc622.
Comment 9 Tazim Kolhar 2015-10-27 08:49:06 EDT
*** This bug is failing in upstream ****.

# rpm -qa | grep foreman
foreman-proxy-1.11.0-0.develop.201510201341git00875b3.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
foreman-libvirt-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
foreman-compute-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-gce-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
foreman-debug-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
hp-sl2x170zg6-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch
tfm-rubygem-foreman_discovery-4.1.1-1.fm1_11.el7.noarch
foreman-vmware-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch
hp-sl2x170zg6-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
hp-sl2x170zg6-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-ovirt-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
foreman-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
foreman-release-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
foreman-postgresql-1.11.0-0.develop.201510201422git6eb234a.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510201150gitab068d9.el7.noarch

steps:
# katello-installer --reset
Installing             Notice: /Stage[main]/Foreman::Database/Foreman::Ra [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]
Installing             Debug: Executing '/usr/bin/systemctl is-enabled fo [99%] Installing             Debug: Executing '/usr/bin/systemctl is-enabled fo [99%] Installing             Debug: /Stage[main]/Foreman::Service/Service[forem [99%] Installing             Debug: /Stage[main]/Certs::Foreman/Exec[foreman_ce [99%] Installing             Notice: /Stage[main]/Certs::Foreman/Exec[foreman_c [99%] Installing             Notice: /Stage[main]/Foreman_proxy::Register/Forem [99%] Installing             Debug: Stored state in 0.27 seconds                [99%] Installing             Done                                               [100%]Installing             Done                                               [100%] []
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/katello-installer/katello-installer.log

attached the full log
Comment 10 Tazim Kolhar 2015-10-27 08:50 EDT
Created attachment 1086842 [details]
katello-installer log
Comment 11 Bryan Kearney 2015-10-27 10:01:56 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/10175 has been closed
-------------
Anonymous
Applied in changeset commit:katello-installer|5621fa77a6f6e110519cd60d9b8d1a51d67dc622.
Comment 12 Tazim Kolhar 2015-11-20 13:24:01 EST
FAILEDQA:
# rpm -qa  | grep foreman
dell-pem600-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-release-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-ovirt-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-libvirt-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-postgresql-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
dell-pem600-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
dell-pem600-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch
tfm-rubygem-foreman_discovery-4.1.2-1.fm1_11.el7.noarch
foreman-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
foreman-debug-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-proxy-1.11.0-0.develop.201511111339git7cbe47a.el7.noarch
foreman-compute-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201511111650gitdda13df.el7.noarch
foreman-gce-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-vmware-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch

steps:
# katello-installer --reset
Installing             Notice: /Stage[main]/Foreman::Database/Foreman::Ra [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]
Installing             Debug: Executing '/usr/bin/systemctl is-enabled fo [99%] Installing             Debug: Executing '/usr/bin/systemctl is-enabled fo [99%] Installing             Notice: /Stage[main]/Foreman::Service/Exec[restart [99%] Installing             Debug: /Stage[main]/Certs::Foreman/Exec[foreman_ce [99%] Installing             Notice: /Stage[main]/Certs::Foreman/Exec[foreman_c [99%] Installing             Notice: /Stage[main]/Foreman_proxy::Register/Forem [99%] Installing             Debug: Stored state in 0.29 seconds                [99%] Installing             Done                                               [100%]Installing             Done                                               [100%] []
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/katello-installer/katello-installer.log
Comment 13 Tazim Kolhar 2015-11-20 13:35 EST
Created attachment 1097278 [details]
katello-installer log
Comment 14 Bryan Kearney 2015-11-20 14:01:38 EST
Moving to POST since upstream bug http://projects.theforeman.org/issues/10175 has been closed
-------------
Anonymous
Applied in changeset commit:katello-installer|5621fa77a6f6e110519cd60d9b8d1a51d67dc622.
Comment 17 Sanket Jagtap 2016-04-21 07:22:54 EDT
Installer shows an warning/error and then stops successfully. 

Build: snap9.0

Output:
Output of 'hostname -f' does not seems to be valid FQDN

Make sure above command gives fully qualified domain name. At least one
dot must be present and underscores are not allowed. 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
Your system does not meet configuration criteria
Comment 18 Bryan Kearney 2016-05-16 10:26:05 EDT
*** Bug 1205027 has been marked as a duplicate of this bug. ***
Comment 20 errata-xmlrpc 2016-07-27 04:49:56 EDT
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

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