Bug 1039342 - openstack-foreman-installer: fails due to missing command '/usr/sbin/puppetca'.
Summary: openstack-foreman-installer: fails due to missing command '/usr/sbin/puppetca'.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: foreman
Version: 4.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 4.0
Assignee: Jordan OMara
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-08 13:37 UTC by Omri Hochman
Modified: 2016-04-26 15:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-10 13:54:19 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Omri Hochman 2013-12-08 13:37:15 UTC
openstack-foreman-installer: fails due to missing command '/usr/sbin/puppetca'.  

Environment:
-------------
OpenStack-4.0 Puddle: 2013-12-06.3
puppet-3.2.4-3.el6_5.noarch.rpm
puppet-server-3.2.4-3.el6_5.noarch
openstack-foreman-installer-0.0.22-1.el6ost.noarch


steps:
-------
run foreman_server.sh

Foreman installer fails with the following error:  
--------------------------------------------------
err: /Stage[main]/Puppet::Server::Config/Exec[puppet_server_config-generate_ca_cert]/returns: change from notrun to 0 failed: Could not find command '/usr/sbin/puppetca'
err: /Stage[main]/Puppet::Server::Config/Exec[puppet_server_config-generate_ca_cert]: Failed to call refresh: Could not find command '/usr/sbin/puppetca'

It seems that both puppet-server-3.2.4-3.el6_5 and  puppet-3.2.4-3.el6_5 doesn't contain the file /usr/sbin/puppetca - like it use to do before: 

[root@puma39 tmp]# rpm -ql puppet-server | grep /usr/sbin/puppetca
[root@puma39 tmp]# rpm -ql puppet | grep /usr/sbin/puppetca


From looking at vim /usr/share/foreman-installer/modules/puppet/manifests/params.pp +95 ( it should use 'puppet cert' and not 'puppetca') :

  # Only use 'puppet cert' on versions where puppetca no longer exists
  if versioncmp($::puppetversion, '3.0') < 0 {
    $puppetca_path = '/usr/sbin'
    $puppetca_bin  = 'puppetca'
    $puppetrun_cmd = '/usr/sbin/puppetrun'
  } else {
    $puppetca_path = '/usr/bin'
    $puppetca_bin = 'puppet cert'
    $puppetrun_cmd = '/usr/bin/puppet kick'


Issue (2)  -( probably side effect of the first issue. )

ERROR: We did not find at least one configured Smart Proxy with the Puppet feature
rake aborted!
undefined method `class_params' for nil:NilClass

Tasks: TOP => db:seed
(See full trace by running task with --trace)
curl: (7) couldn't connect to host
Foreman is installed and almost ready for setting up your OpenStack
First, you need to alter a few parameters in Foreman.
Visit: https://puma39.scl.lab.tlv.redhat.com/hostgroups
From this list, click on each class that you plan to use
Go to the Smart Class Parameters tab and work though each of the parameters
in the left-hand column

Then copy /tmp/foreman_client.sh to your openstack client nodes
Run that script and visit the HOSTS tab in foreman. Pick some
host groups for your nodes based on the configuration you prefer
For further directions, see:
http://openstack.redhat.com/Deploying_RDO_Using_Foreman

Once puppet runs on the machines, OpenStack is ready!
~
Connection to 10.35.160.87 closed.


From looking at :
/etc/init.d/foreman-proxy status:
foreman-proxy is stopped

[root@puma39 tmp]# /etc/init.d/foreman-proxy start
Starting foreman-proxy: WARNING: Missing SSL setup, working in clear text mode !

        from /usr/share/foreman-proxy/bin/../lib/smart_proxy.rb:51
                                                           [  OK  ]

Comment 3 Dominic Cleal 2013-12-09 08:56:28 UTC
Please attach /var/log/yum.log from the affected system.

Can you confirm which version of puppet was installed prior to the first foreman_server.sh run?

Comment 4 Omri Hochman 2013-12-09 19:34:04 UTC
 (In reply to Dominic Cleal from comment #3)
> Please attach /var/log/yum.log from the affected system.
> 
> Can you confirm which version of puppet was installed prior to the first
> foreman_server.sh run?


puppet-3.2.4-3.el6_5
puppet-server-3.2.4-3.el6_5 

I'll try to reproduce and provide the yum.log

Comment 5 Dominic Cleal 2013-12-09 19:36:45 UTC
(In reply to Omri Hochman from comment #4)
>  (In reply to Dominic Cleal from comment #3)
> > Please attach /var/log/yum.log from the affected system.
> > 
> > Can you confirm which version of puppet was installed prior to the first
> > foreman_server.sh run?
> 
> 
> puppet-3.2.4-3.el6_5
> puppet-server-3.2.4-3.el6_5 

puppet-server won't have been installed before the Puppet run, but it really is the version before the installer ran that's critical here I think.

I suspect there was an old version of Puppet (not the one in RHOS) installed before the run.

> I'll try to reproduce and provide the yum.log

Thanks.

Comment 6 Omri Hochman 2013-12-10 13:52:26 UTC
The problem was the old puppet-client (puppet.noarch 0:2.7.23-1.el6 ) that came from eple.repo that was installed on this machine during the execution of foreman_server.sh script. 
 
new workaround:
----------------
completely removed the puppet from the machine and allow foreman_server.sh to install puppet version available in the rhos.repo.


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