Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking master when I apply r10k config #64

Closed
prolixalias opened this issue Jul 24, 2014 · 3 comments
Closed

breaking master when I apply r10k config #64

prolixalias opened this issue Jul 24, 2014 · 3 comments

Comments

@prolixalias
Copy link

We have a fresh install of RHEL 6.4 with PE 3.2.3. I can install the zack-r10k module without any issue, it appears. However, once applying the r10k "setup" manifest to the master it's unable to pass info between client node and master... Even if that node is the master itself. For example, 'puppet agent --test' yields some html output indicating a passenger error:

Warning: Unable to fetch my node definition, but the agent run will continue:�[0m

�[1;31mWarning: Error 500 on SERVER:

...

Additionally, getting, "could not retrieve facts from inventory service 500 'internal server error'" in the console.

Contents of my r10k "setup" manifest are:

# cat r10k_installation.pp

if $::osfamily == 'redhat' {
  class { 'firewall': ensure => stopped, }
}

file { 'r10k environments dir':
  ensure   => directory,
  path     => '/etc/puppetlabs/puppet/environments',
}

class { 'r10k':
  version           => '1.3.0',

  sources           => {
    'puppet' => {
    'remote'  => 'https://bitbucket.org/prolixalias/puppet-r10k-environments',
    'basedir' => "${::settings::confdir}/environments",
    'prefix'  => false,
  },

  'hiera' => {
    'remote'  => 'https://bitbucket.org/prolixalias/puppet-r10k-hiera',
    'basedir' => "${::settings::confdir}/hiera",
    'prefix'  => true,
  }
},

purgedirs         => ["${::settings::confdir}/environments"],
manage_modulepath => true,
modulepath        => "${::settings::confdir}/environments/\$environment/modules:/opt/puppet/share/puppet/modules",
}

exec { 'r10k deploy environment --puppetfile':
  path     => ['/bin','/sbin','/usr/bin','/usr/sbin','/opt/puppet/bin'],
  require  => [Package['git'],File['r10k environments dir'],Class['r10k::install']],
}

ini_setting { 'master module path':
  ensure   => present,
  path     => '/etc/puppetlabs/puppet/puppet.conf',
  section  => 'main',
  setting  => 'modulepath',
  value    => '/etc/puppetlabs/puppet/environments/$environment/modules:/opt/puppet/share/puppet/modules',
}

ini_setting { 'master manifest path':
  ensure   => present,
  path     => '/etc/puppetlabs/puppet/puppet.conf',
  section  => 'main',
  setting  => 'manifest',
  value    => '/etc/puppetlabs/puppet/environments/$environment/manifests/site.pp',
}

NOTE: this all works in Vagrant CentOS and Ubuntu envs.

I'm at a loss on how to diagnose. Any guidance would be great.

@prolixalias prolixalias changed the title breaking master when I apply the r10k config breaking master when I apply r10k config Jul 24, 2014
@prolixalias
Copy link
Author

This is the message sent back with 500:

Permission denied - /opt/puppet/lib/ruby/gems/1.9.1/specifications/multipart-post-1.2.0.gemspec (Errno::EACCES)
/opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:541:in read' /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:541:inload'
/opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:269:in block (2 levels) in _all' /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:268:ineach'
/opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:268:in block in _all' /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:267:ineach'
/opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:267:in _all' /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:410:ineach'
/opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:442:in find' /opt/puppet/lib/ruby/1.9.1/rubygems/specification.rb:442:infind_by_path'
/opt/puppet/lib/ruby/1.9.1/rubygems.rb:206:in try_activate' /opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:59:inrescue in require'
/opt/puppet/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in require' /opt/puppet/share/phusion_passenger/helper-scripts/rack-preloader.rb:103:inpreload_app'
/opt/puppet/share/phusion_passenger/helper-scripts/rack-preloader.rb:153:in <module:App>' /opt/puppet/share/phusion_passenger/helper-scripts/rack-preloader.rb:29:inmodule:PhusionPassenger'
/opt/puppet/share/phusion_passenger/helper-scripts/rack-preloader.rb:28:in `

'

Application root
/var/opt/lib/pe-puppetmaster

@acidprime
Copy link
Collaborator

Hmm I have tried to replicate this but I have not been able to.

@prolixalias
Copy link
Author

Hey there Zack. It ended up being a permissions issue. Had to make
pe-puppet the owner (recursively) of environments and hiera dirs under
/etc/puppetlabs/puppet.

Appreciate you getting back to me. Many thanks.
On Aug 6, 2014 5:58 PM, "Zack Smith" notifications@github.com wrote:

Closed #64 https://github.com/acidprime/r10k/issues/64.


Reply to this email directly or view it on GitHub
https://github.com/acidprime/r10k/issues/64#event-149991558.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants