Bug #6352

Default install fails when hostname contains uppercase characters

Added by Andy Airey almost 4 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Ewoud Kohl van Wijngaarden
Category:Foreman modules
Target version:Foreman - Sprint 26
Difficulty:easy Bugzilla link:
Found in release:1.5.0 Pull request:
Story points-
Velocity based estimate-
Release1.6.0Release relationshipAuto

Description

facter fqdn and hostname -f both return
HOSTNAME.domain.com

All config files (like httpd) are configured with this hostname in uppercase.

But the puppet cert that is generated is in lowercase.
Resulting in httpd not beeing able to start.

foreman-installer -i output:

Main Config Menu
1. [✓] Configure foreman_proxy
2. [✓] Configure puppet
3. [✓] Configure foreman
4. [✗] Configure foreman_plugin_puppetdb
5. [✗] Configure foreman_plugin_hooks
6. [✗] Configure foreman_compute_ec2
7. [✗] Configure foreman_compute_gce
8. [✓] Configure foreman_compute_ovirt
9. [✓] Configure foreman_compute_openstack
10. [✗] Configure foreman_compute_rackspace
11. [✓] Configure foreman_compute_vmware
12. [✗] Configure foreman_plugin_chef
13. [✗] Configure foreman_plugin_default_hostgroup
14. [✓] Configure foreman_compute_libvirt
15. [✓] Configure foreman_plugin_setup
16. [✗] Configure foreman_plugin_discovery
17. [✓] Configure foreman_plugin_bootdisk
18. [✓] Configure foreman_plugin_templates
19. Display current config
20. Save and run
21. Cancel run without Saving
Choose an option from the menu... 20
 /Stage[main]/Apache::Service/Service[httpd]/ensure: change from stopped to running failed: Could not start Service[httpd]: Execution of '/sbin/service httpd start' returned 1:  at /usr/share/foreman-installer/modules/apache/manifests/service.pp:34
 /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]/ensure: change from stopped to running failed: Could not start Service[foreman-proxy]: Execution of '/sbin/service foreman-proxy start' returned 1:  at /usr/share/foreman-installer/modules/foreman_proxy/manifests/service.pp:9
Installing             Done                                               [100%] [................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/foreman-installer.log

# service httpd start
Starting httpd: [Tue Jun 24 13:26:59 2014] [warn] module passenger_module is already loaded, skipping
Syntax error on line 37 of /etc/httpd/conf.d/25-puppet.conf:
SSLCertificateFile: file '/var/lib/puppet/ssl/certs/HOSTNAME.domain.com.pem' does not exist or is empty
[FAILED]

There is a .pem file generated in /var/lib/puppet/certs/, but it is in lowercase.

I changed my hostname to lowercase, regenerated a cert, and it now works.
But this should be checked (warning) or worked around for easy deployment.


Related issues

Related to Installer - Bug #8389: foreman-installer does not start foreman-proxy with mixed... Closed 11/13/2014

Associated revisions

Revision 0f83ef79
Added by Ewoud Kohl van Wijngaarden almost 4 years ago

Fixes #6352: Lowercase hostnames in certs

This is the same fix as aad7619 in puppet-foreman1.

Relevant parts from http://projects.theforeman.org/issues/6352

facter fqdn and hostname -f both return
HOSTNAME.domain.com

Starting httpd: [Tue Jun 24 13:26:59 2014] [warn] module passenger_module is already loaded, skipping
Syntax error on line 37 of /etc/httpd/conf.d/25-puppet.conf:
SSLCertificateFile: file '/var/lib/puppet/ssl/certs/HOSTNAME.domain.com.pem' does not exist or is empty
[FAILED]

There is a .pem file generated in /var/lib/puppet/certs/, but it is in
lowercase.

[1]: https://github.com/theforeman/puppet-foreman/commit/aad76195117479ca6b2cbbf9f0579e3672a9c806

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Category changed from foreman-installer script to Foreman modules

#2 Updated by Ewoud Kohl van Wijngaarden almost 4 years ago

  • Status changed from New to Resolved
  • Assigned To set to Ewoud Kohl van Wijngaarden

#3 Updated by Dominic Cleal almost 4 years ago

  • Release set to 1.6.0

#4 Updated by Dominic Cleal almost 4 years ago

  • Status changed from Resolved to Closed
  • Target version set to Sprint 26
  • % Done changed from 0 to 100

#5 Updated by Fabien Combernous over 3 years ago

I used rpms from the foreman repo : foreman-installer-1.6.2-1.el6.
I was yet impacted buy this bug released for 1.6.0.
I renamed the hostname lowercase then the foreman-installer worked like a charm.

#6 Updated by Fabien Combernous over 3 years ago

The output generated by foreman-installer was :
Could not start Service[foreman-proxy]: Execution of '/sbin/service foreman-proxy start' returned 1: Starting foreman-proxy : [FAILED]
/Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]/ensure: change from stopped to running failed: Could not start Service[foreman-proxy]: Execution of '/sbin/service foreman-proxy start' returned 1: Starting foreman-proxy : [FAILED]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[MYHOSTNAME.mydomain]: Failed to call refresh: Could not load data from https://MYHOSTNAME.mydomain
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[MYHOSTNAME.mydomain]: Could not load data from https://MYHOSTNAME.mydomain
Installing Done [100%] [...................................................]
Something went wrong! Check the log for ERROR-level output

#7 Updated by Dominic Cleal over 3 years ago

I think we introduced a new bug in #7822, could you file a new report please?

#8 Updated by Fabien Combernous over 3 years ago

  • Related to Bug #8389: foreman-installer does not start foreman-proxy with mixed-case hostnames added

Also available in: Atom PDF