Project

General

Profile

Actions

Bug #1994

closed

Puppet 3: $vardir also has to be set or it fails to interpolate

Added by Dominic Cleal about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Puppet integration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

With Puppet 3, we call the initialize_global_settings method with the --confdir and the value of the :puppetconfdir setting. However if the puppet.conf references $vardir (which settings do by default) then --vardir also has to be set when we initialise Puppet.

As mentioned in Jeff's comment here, this had to be added to the puppet config.ru for 3.0.1 too:
http://projects.puppetlabs.com/issues/16637#note-9

This is equivalent to how we initialise Puppet 3 today, which throws an error:

irb(main):001:0> require 'puppet'
=> true
irb(main):002:0> Puppet.settings.initialize_global_settings(['--confdir', '/etc/puppet', '--run_mode', 'master'])
=> true
irb(main):003:0> puts Puppet[:hostcert]
Puppet::Settings::InterpolationError: Error converting value for param 'hostcert': Error converting value for param 'certdir': Error converting value for param 'ssldir': Could not find value for $vardir
Other minor related problems:
  1. :puppetconfdir is actually pointing to /etc/puppet/puppet.conf usually, so this should really be --conf rather than confdir
  2. :puppetconfdir was removed in 7c08e30a47a16d387f26d1c617cdedc60d9d0582
  3. missing comma in my commit inside '--run_mode' 'master'

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #1872: Puppet and foreman 3.0 Do not play well togetherClosedSam Kottler09/19/2012Actions
Actions

Also available in: Atom PDF