puppetinabox / controlrepo

39 stars 23 forks source link

Multiple Issues with Centos 6.X #73

Closed MAXxATTAXx closed 8 years ago

MAXxATTAXx commented 8 years ago

Hi, So my machie is a centos 6 vagrant box based of puphpet/centos65-x64 i Added this two lines to the bootstrap.sh:

rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm
yum -y install puppet-agent
ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
...
chkconfig puppetserver on #instead of systemctl
chkconfig puppet on $instead of systemctl

I been trying to bootstrap a puppet master with this repo and the following issues happen:

  1. When trying to start the puppetserver the following error message is displayed:

Error: Could not start Service[puppetserver]: Execution of '/sbin/service puppetserver start' returned 1: Starting puppetserver: runuser: unrecognized option '--pidfile' Try runuser --help' for more information. [ OK ] [FAILED] Error: /Stage[main]/Puppet::Server::Service/Service[puppetserver]/ensure: change from stopped to running failed: Could not start Service[puppetserver]: Execution of '/sbin/service puppetserver start' returned 1: Starting puppetserver: runuser: unrecognized option '--pidfile' Tryrunuser --help' for more information. [ OK ] [FAILED] Notice: /Stage[main]/Puppet::Server::Service/Service[puppetserver]: Triggered 'refresh' from 1 events

Doing some debugging i found that the erb template is not including some areguments for the /etc/sysconfig/puppetserver file (I did the changes to the /root/bootstrap/modules/puppet/templates/server/puppetserver.sysconfig.erb):

USER=puppet
GROUP=puppet
SERVICE_STOP_RETRIES=60
START_TIMEOUT=120

Workaround worked =)

  1. I changed the configuration in r10k to use the rugged provider as so:
class { 'r10k':
  version           => '2.1.1',
  git_settings      => {
    provider => 'rugged',
  },
  sources           => {
    'puppet' => {
      'remote'  => 'git@github.com:puppetinabox/controlrepo.git',
      'basedir' => $::settings::environmentpath,
      'prefix'  => false,
    },
  },
  manage_modulepath => false
}

I Added the rugged provider as my final installation will use it, but i have been unable to find a way on installing the rugged for the puppetserver. The thing is i'm confused where or how should be installed? used puppetserver gem install rugged and /opt/puppetlabs/puppet/bin/gem install rugged are trying to install the non-java version of rugged. (I had a puppet enterprise installation before and they seem to have this gem installed somehow...). Do you know how rugged should be installed properly?

rnelson0 commented 8 years ago

@MAXxATTAXx thanks for this detailed report. Let's see if we can slice this up a bit.

  1. Can you split the CentOS 6/puppetserver bootstrap and ERB changes into a new issue, and include the full contents of the ERB? If you can open a PR, even better; if not I am sure we can put it together from there.
  2. Is there a particular reason to use the rugged provider? If so, I am curious because I may look at integrating that change as well.
  3. I am not sure what the interaction on the master is for the rugged provider. If it is r10k, then the bin/gem should be used. If the puppetserver process itself will use it, then puppetserver gem should probably be used. For instance, since puppetserver does the hiera lookups, deep merge gems get installed through puppetserver gem. Dunno if that helps Is there some documentation you were reviewing that I could catch up on?
MAXxATTAXx commented 8 years ago
  1. yeah, sure i will add a PR eventually when i get some load of from work.
  2. Mostly personal preferences.
  3. Yeah so i ended up installing it on bin\gem. Thanks for the clarification since i thought that the puppetserver gem was a wrapper to bin\gem. Now i realize that puppetserver gem is the one running the service and is JRuby. bin\gem is the installation that comes with puppet agent and it is native gem.

Thanks

MAXxATTAXx commented 8 years ago

Just as an update jlambert121/puppet module got bumped to version 0.8.1 This version contais a fix to the USER and GROUP missing from the template.

rnelson0 commented 8 years ago

@MAXxATTAXx The user/group that was missing was in the chkconfig startup script, correct? If that's all, I can easily bump the version and merge it if it passes the tests. Let me know.

MAXxATTAXx commented 8 years ago

Yeah that fixes it. The file is puppet/templates/server/puppetserver.sysconfig.erb

rnelson0 commented 8 years ago

@MAXxATTAXx thanks for the heads up! Since that issue is closed in #75 and the other two are rugged git-related, I'm going to close this issue.