Project

General

Profile

Bug #6352

Default install fails when hostname contains uppercase characters

Added by Andy Airey over 7 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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-case hostnamesClosed2014-11-13

Associated revisions

Revision 0f83ef79 (diff)
Added by Ewoud Kohl van Wijngaarden over 7 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 over 7 years ago

  • Category changed from foreman-installer script to Foreman modules

#2 Updated by Ewoud Kohl van Wijngaarden over 7 years ago

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

#3 Updated by Dominic Cleal over 7 years ago

  • Legacy Backlogs Release (now unused) set to 10

#4 Updated by Dominic Cleal over 7 years ago

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

#5 Updated by Fabien Combernous almost 7 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 almost 7 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 almost 7 years ago

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

#8 Updated by Fabien Combernous almost 7 years ago

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

#9 Updated by Eliezer Croitoru over 1 year ago

  • Triaged set to No

Dominic Cleal wrote:

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

This issue is present now in 1.9.3.

#10 Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Triaged changed from No to Yes

That version is ancient and this is an ancient bug. Please verify with a supported version (1.23 or 1.24 at this moment) and open a new bug if you still have any issue.

Also available in: Atom PDF