puppet 0.25.0 → 0.25.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (138) hide show
  1. data/CHANGELOG +4772 -19114
  2. data/README +1 -1
  3. data/Rakefile +7 -25
  4. data/{sbin → bin}/puppetca +0 -0
  5. data/{sbin → bin}/puppetd +0 -0
  6. data/{sbin → bin}/puppetmasterd +0 -0
  7. data/{sbin → bin}/puppetqd +0 -0
  8. data/{sbin → bin}/puppetrun +0 -0
  9. data/conf/osx/createpackage.sh +1 -1
  10. data/conf/redhat/client.init +6 -3
  11. data/conf/redhat/puppet.spec +26 -14
  12. data/conf/redhat/server.init +3 -2
  13. data/ext/vim/syntax/puppet.vim +4 -1
  14. data/install.rb +25 -7
  15. data/lib/puppet.rb +1 -1
  16. data/lib/puppet/agent.rb +2 -2
  17. data/lib/puppet/application/puppet.rb +3 -3
  18. data/lib/puppet/application/puppetd.rb +0 -7
  19. data/lib/puppet/application/puppetdoc.rb +1 -0
  20. data/lib/puppet/application/puppetmasterd.rb +2 -2
  21. data/lib/puppet/configurer.rb +6 -1
  22. data/lib/puppet/configurer/fact_handler.rb +2 -2
  23. data/lib/puppet/defaults.rb +2 -2
  24. data/lib/puppet/external/nagios/base.rb +4 -3
  25. data/lib/puppet/external/pson/common.rb +367 -0
  26. data/lib/puppet/external/pson/pure.rb +77 -0
  27. data/lib/puppet/external/pson/pure/generator.rb +429 -0
  28. data/lib/puppet/external/pson/pure/parser.rb +269 -0
  29. data/lib/puppet/external/pson/version.rb +8 -0
  30. data/lib/puppet/feature/pson.rb +6 -0
  31. data/lib/puppet/feature/rails.rb +1 -5
  32. data/lib/puppet/file_serving/configuration.rb +2 -2
  33. data/lib/puppet/indirector/certificate/rest.rb +6 -0
  34. data/lib/puppet/indirector/facts/facter.rb +1 -1
  35. data/lib/puppet/indirector/ldap.rb +1 -1
  36. data/lib/puppet/indirector/queue.rb +3 -3
  37. data/lib/puppet/indirector/rest.rb +1 -1
  38. data/lib/puppet/network/authstore.rb +34 -53
  39. data/lib/puppet/network/formats.rb +59 -9
  40. data/lib/puppet/network/http/mongrel/rest.rb +10 -9
  41. data/lib/puppet/network/http/webrick.rb +8 -1
  42. data/lib/puppet/network/http/webrick/rest.rb +2 -5
  43. data/lib/puppet/network/http_server/webrick.rb +1 -4
  44. data/lib/puppet/parser/ast/leaf.rb +1 -3
  45. data/lib/puppet/parser/collector.rb +14 -8
  46. data/lib/puppet/parser/compiler.rb +7 -0
  47. data/lib/puppet/parser/functions/fqdn_rand.rb +4 -10
  48. data/lib/puppet/parser/functions/regsubst.rb +44 -30
  49. data/lib/puppet/parser/functions/require.rb +18 -3
  50. data/lib/puppet/parser/functions/versioncmp.rb +1 -1
  51. data/lib/puppet/parser/interpreter.rb +1 -1
  52. data/lib/puppet/parser/lexer.rb +29 -31
  53. data/lib/puppet/parser/loaded_code.rb +4 -0
  54. data/lib/puppet/parser/parser_support.rb +5 -2
  55. data/lib/puppet/parser/resource.rb +31 -6
  56. data/lib/puppet/property.rb +3 -2
  57. data/lib/puppet/provider/macauthorization/macauthorization.rb +14 -14
  58. data/lib/puppet/provider/package/dpkg.rb +1 -1
  59. data/lib/puppet/provider/package/portage.rb +15 -5
  60. data/lib/puppet/provider/package/rug.rb +1 -1
  61. data/lib/puppet/provider/package/up2date.rb +1 -1
  62. data/lib/puppet/provider/package/urpmi.rb +1 -1
  63. data/lib/puppet/provider/service/daemontools.rb +7 -10
  64. data/lib/puppet/provider/service/runit.rb +7 -17
  65. data/lib/puppet/provider/ssh_authorized_key/parsed.rb +7 -47
  66. data/lib/puppet/provider/zone/solaris.rb +12 -3
  67. data/lib/puppet/relationship.rb +12 -12
  68. data/lib/puppet/reports/rrdgraph.rb +1 -1
  69. data/lib/puppet/reports/store.rb +2 -2
  70. data/lib/puppet/reports/tagmail.rb +5 -16
  71. data/lib/puppet/resource.rb +15 -20
  72. data/lib/puppet/resource/catalog.rb +40 -29
  73. data/lib/puppet/ssl/certificate_revocation_list.rb +0 -2
  74. data/lib/puppet/ssl/host.rb +2 -3
  75. data/lib/puppet/sslcertificates/ca.rb +0 -5
  76. data/lib/puppet/type/cron.rb +1 -1
  77. data/lib/puppet/type/file/owner.rb +7 -4
  78. data/lib/puppet/type/resources.rb +17 -17
  79. data/lib/puppet/type/yumrepo.rb +10 -3
  80. data/lib/puppet/util.rb +6 -11
  81. data/lib/puppet/util/inifile.rb +8 -0
  82. data/lib/puppet/util/log.rb +2 -2
  83. data/lib/puppet/util/monkey_patches.rb +0 -43
  84. data/lib/puppet/util/{json.rb → pson.rb} +6 -6
  85. data/lib/puppet/util/rdoc.rb +5 -3
  86. data/lib/puppet/util/selinux.rb +12 -6
  87. data/lib/puppet/util/settings.rb +25 -16
  88. data/lib/puppet/util/settings/file_setting.rb +4 -2
  89. data/spec/integration/application/puppet.rb +4 -4
  90. data/spec/integration/defaults.rb +2 -2
  91. data/spec/integration/indirector/catalog/queue.rb +5 -5
  92. data/spec/integration/indirector/certificate/rest.rb +3 -1
  93. data/spec/integration/network/formats.rb +36 -36
  94. data/spec/integration/parser/functions/require.rb +5 -3
  95. data/spec/integration/provider/mailalias/aliases.rb +4 -4
  96. data/spec/integration/resource/catalog.rb +4 -4
  97. data/spec/unit/application/puppet.rb +16 -15
  98. data/spec/unit/application/puppetd.rb +1 -1
  99. data/spec/unit/application/puppetdoc.rb +6 -0
  100. data/spec/unit/application/puppetmasterd.rb +6 -6
  101. data/spec/unit/configurer/fact_handler.rb +3 -3
  102. data/spec/unit/file_serving/configuration.rb +16 -2
  103. data/spec/unit/indirector/certificate/rest.rb +34 -0
  104. data/spec/unit/indirector/queue.rb +15 -15
  105. data/spec/unit/indirector/rest.rb +31 -9
  106. data/spec/unit/network/authstore.rb +105 -26
  107. data/spec/unit/network/formats.rb +124 -39
  108. data/spec/unit/parser/ast/leaf.rb +15 -0
  109. data/spec/unit/parser/collector.rb +20 -9
  110. data/spec/unit/parser/compiler.rb +19 -0
  111. data/spec/unit/parser/functions/fqdn_rand.rb +62 -0
  112. data/spec/unit/parser/functions/regsubst.rb +80 -0
  113. data/spec/unit/parser/functions/require.rb +19 -7
  114. data/spec/unit/parser/interpreter.rb +2 -2
  115. data/spec/unit/parser/lexer.rb +32 -7
  116. data/spec/unit/parser/loaded_code.rb +18 -1
  117. data/spec/unit/parser/parser.rb +10 -2
  118. data/spec/unit/parser/resource.rb +53 -2
  119. data/spec/unit/parser/scope.rb +1 -1
  120. data/spec/unit/property.rb +14 -4
  121. data/spec/unit/provider/package/dpkg.rb +7 -0
  122. data/spec/unit/provider/service/daemontools.rb +19 -2
  123. data/spec/unit/provider/service/redhat.rb +2 -0
  124. data/spec/unit/provider/service/runit.rb +15 -4
  125. data/spec/unit/provider/ssh_authorized_key/parsed.rb +32 -55
  126. data/spec/unit/relationship.rb +21 -46
  127. data/spec/unit/resource.rb +30 -39
  128. data/spec/unit/resource/catalog.rb +66 -51
  129. data/spec/unit/ssl/certificate_revocation_list.rb +0 -12
  130. data/spec/unit/type/cron.rb +33 -0
  131. data/spec/unit/type/file/owner.rb +10 -4
  132. data/spec/unit/util/json.rb +9 -9
  133. data/spec/unit/util/log.rb +36 -0
  134. data/spec/unit/util/settings.rb +6 -0
  135. data/test/data/providers/ssh_authorized_key/parsed/authorized_keys2 +1 -0
  136. data/test/lib/puppettest/support/utils.rb +8 -16
  137. metadata +36 -13
  138. data/lib/puppet/feature/json.rb +0 -2
data/README CHANGED
@@ -21,7 +21,7 @@ Generally, you need the following things installed:
21
21
  running 'ruby -rxmlrpc/client -e "puts :yep"'. If that errors out, you're missing
22
22
  the library.
23
23
 
24
- * Facter => 1.1.1
24
+ * Facter => 1.5.1
25
25
  You can get this from < http://reductivelabs.com/projects/facter >
26
26
 
27
27
  $Id$
data/Rakefile CHANGED
@@ -3,13 +3,13 @@
3
3
  $: << File.expand_path('lib')
4
4
  $LOAD_PATH << File.join(File.dirname(__FILE__), 'tasks')
5
5
 
6
- Dir['tasks/**/*.rake'].each { |t| load t }
7
-
8
6
  require './lib/puppet.rb'
9
7
  require 'rake'
10
8
  require 'rake/packagetask'
11
9
  require 'rake/gempackagetask'
12
10
 
11
+ Dir['tasks/**/*.rake'].each { |t| load t }
12
+
13
13
  FILES = FileList[
14
14
  '[A-Z]*',
15
15
  'install.rb',
@@ -24,36 +24,18 @@ FILES = FileList[
24
24
  'spec/**/*'
25
25
  ]
26
26
 
27
- task :default do
28
- sh %{rake -T}
29
- end
30
-
31
- spec = Gem::Specification.new do |spec|
32
- spec.platform = Gem::Platform::RUBY
33
- spec.name = 'puppet'
34
- spec.files = FILES.to_a
35
- spec.version = Puppet::PUPPETVERSION
36
- spec.summary = 'Puppet, an automated configuration management tool'
37
- spec.author = 'Reductive Labs'
38
- spec.email = 'puppet@reductivelabs.com'
39
- spec.homepage = 'http://reductivelabs.com'
40
- spec.rubyforge_project = 'puppet'
41
- spec.has_rdoc = true
42
- spec.rdoc_options <<
43
- '--title' << 'Puppet - Configuration Management' <<
44
- '--main' << 'README' <<
45
- '--line-numbers'
46
- end
47
-
48
27
  Rake::PackageTask.new("puppet", Puppet::PUPPETVERSION) do |pkg|
49
28
  pkg.package_dir = 'pkg'
50
29
  pkg.need_tar_gz = true
51
30
  pkg.package_files = FILES.to_a
52
31
  end
53
32
 
54
- Rake::GemPackageTask.new(spec) do |pkg|
33
+ task :default do
34
+ sh %{rake -T}
55
35
  end
56
36
 
37
+ task :puppetpackages => [:create_gem, :package]
38
+
57
39
  desc "Run the specs under spec/"
58
40
  task :spec do
59
41
  require 'spec'
@@ -68,7 +50,7 @@ task :spec do
68
50
  t.spec_files = FileList['spec/**/*.rb']
69
51
  if defined?(Rcov)
70
52
  t.rcov = true
71
- t.rcov_opts = ['--exclude', 'spec/*,test/*,results/*,/usr/lib/*']
53
+ t.rcov_opts = ['--exclude', 'spec/*,test/*,results/*,/usr/lib/*,/usr/local/lib/*']
72
54
  end
73
55
  end
74
56
  end
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -38,7 +38,7 @@ function find_installer() {
38
38
  elif [ -f "../${INSTALLRB}" ]; then
39
39
  installer="$(pwd)/../${INSTALLRB}"
40
40
  elif [ -f "../../${INSTALLRB}" ]; then
41
- installer="$(pwd)/../${INSTALLRB}"
41
+ installer="$(pwd)/../../${INSTALLRB}"
42
42
  else
43
43
  installer=""
44
44
  fi
@@ -25,7 +25,10 @@ RETVAL=0
25
25
  PUPPET_OPTS=""
26
26
  [ -n "${PUPPET_SERVER}" ] && PUPPET_OPTS="--server=${PUPPET_SERVER}"
27
27
  [ -n "$PUPPET_LOG" ] && PUPPET_OPTS="${PUPPET_OPTS} --logdest=${PUPPET_LOG}"
28
- [ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --port=${PUPPET_PORT}"
28
+ [ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --masterport=${PUPPET_PORT}"
29
+
30
+ # Determine if we can use the -p option to killproc. RHEL < 5 can't.
31
+ killproc | grep -q -- '-p' 2>/dev/null && killopts="-p $pidfile"
29
32
 
30
33
  # Figure out if the system just booted. Let's assume
31
34
  # boot doesn't take longer than 5 minutes
@@ -43,7 +46,7 @@ start() {
43
46
 
44
47
  stop() {
45
48
  echo -n $"Stopping puppet: "
46
- killproc $puppetd
49
+ killproc $killopts $puppetd
47
50
  RETVAL=$?
48
51
  echo
49
52
  [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
@@ -51,7 +54,7 @@ stop() {
51
54
 
52
55
  reload() {
53
56
  echo -n $"Restarting puppet: "
54
- killproc $puppetd -HUP
57
+ killproc $killopts $puppetd -HUP
55
58
  RETVAL=$?
56
59
  echo
57
60
  return $RETVAL
@@ -5,7 +5,7 @@
5
5
  %define confdir conf/redhat
6
6
 
7
7
  Name: puppet
8
- Version: 0.25.0
8
+ Version: 0.25.1
9
9
  Release: 1%{?dist}
10
10
  Summary: A network tool for managing many disparate systems
11
11
  License: GPLv2+
@@ -124,17 +124,19 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
124
124
  %files
125
125
  %defattr(-, root, root, 0755)
126
126
  %doc CHANGELOG COPYING LICENSE README examples
127
- %exclude %{_bindir}/pi
127
+ %{_bindir}/pi
128
128
  %{_bindir}/puppet
129
129
  %{_bindir}/ralsh
130
130
  %{_bindir}/filebucket
131
131
  %{_bindir}/puppetdoc
132
+ %{_sbindir}/puppetca
132
133
  %{_sbindir}/puppetd
133
134
  %{ruby_sitelibdir}/*
134
135
  %{_initrddir}/puppet
135
136
  %dir %{_sysconfdir}/puppet
136
137
  %config(noreplace) %{_sysconfdir}/sysconfig/puppet
137
138
  %config(noreplace) %{_sysconfdir}/puppet/puppet.conf
139
+ %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetca.conf
138
140
  %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetd.conf
139
141
  %config(noreplace) %{_sysconfdir}/logrotate.d/puppet
140
142
  # We don't want to require emacs or vim, so we need to own these dirs
@@ -146,12 +148,13 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
146
148
  %attr(-, puppet, puppet) %{_localstatedir}/run/puppet
147
149
  %attr(-, puppet, puppet) %{_localstatedir}/log/puppet
148
150
  %attr(-, puppet, puppet) %{_localstatedir}/lib/puppet
149
- %exclude %{_mandir}/man8/pi.8.gz
150
- %doc %{_mandir}/man8/puppet.8.gz
151
- %doc %{_mandir}/man8/puppet.conf.8.gz
152
- %doc %{_mandir}/man8/puppetd.8.gz
153
- %doc %{_mandir}/man8/ralsh.8.gz
154
- %doc %{_mandir}/man8/puppetdoc.8.gz
151
+ %{_mandir}/man8/pi.8.gz
152
+ %{_mandir}/man8/puppet.8.gz
153
+ %{_mandir}/man8/puppet.conf.8.gz
154
+ %{_mandir}/man8/puppetca.8.gz
155
+ %{_mandir}/man8/puppetd.8.gz
156
+ %{_mandir}/man8/ralsh.8.gz
157
+ %{_mandir}/man8/puppetdoc.8.gz
155
158
 
156
159
  %files server
157
160
  %defattr(-, root, root, 0755)
@@ -162,13 +165,10 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
162
165
  %config(noreplace) %{_sysconfdir}/puppet/fileserver.conf
163
166
  %dir %{_sysconfdir}/puppet/manifests
164
167
  %config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
165
- %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetca.conf
166
168
  %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetmasterd.conf
167
- %{_sbindir}/puppetca
168
- %doc %{_mandir}/man8/filebucket.8.gz
169
- %doc %{_mandir}/man8/puppetca.8.gz
170
- %doc %{_mandir}/man8/puppetmasterd.8.gz
171
- %doc %{_mandir}/man8/puppetrun.8.gz
169
+ %{_mandir}/man8/filebucket.8.gz
170
+ %{_mandir}/man8/puppetmasterd.8.gz
171
+ %{_mandir}/man8/puppetrun.8.gz
172
172
 
173
173
  # Fixed uid/gid were assigned in bz 472073 (Fedora), 471918 (RHEL-5),
174
174
  # and 471919 (RHEL-4)
@@ -214,6 +214,18 @@ fi
214
214
  rm -rf %{buildroot}
215
215
 
216
216
  %changelog
217
+ * Tue Oct 20 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-1
218
+ - Update to 0.25.1
219
+ - Include the pi program and man page (R.I.Pienaar)
220
+
221
+ * Sat Oct 17 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-0.2.rc2
222
+ - Update to 0.25.1rc2
223
+
224
+ * Tue Sep 22 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-0.1.rc1
225
+ - Update to 0.25.1rc1
226
+ - Move puppetca to puppet package, it has uses on client systems
227
+ - Drop redundant %%doc from manpage %%file listings
228
+
217
229
  * Fri Sep 04 2009 Todd Zullinger <tmz@pobox.com> - 0.25.0-1
218
230
  - Update to 0.25.0
219
231
  - Fix permissions on /var/log/puppet (#495096)
@@ -71,8 +71,9 @@ stop() {
71
71
  ret=$?; [ $ret != 0 ] && RETVAL=$ret
72
72
  done
73
73
  else
74
- killproc $PUPPETMASTER
75
- RETVAL=$?
74
+ killproc | grep -q -- '-p' 2>/dev/null && killopts="-p $pidfile"
75
+ killproc $killopts $PUPPETMASTER
76
+ RETVAL=$?
76
77
  fi
77
78
  echo
78
79
  [ $RETVAL -eq 0 ] && rm -f "$lockfile"
@@ -17,7 +17,7 @@ elseif exists("b:current_syntax")
17
17
  endif
18
18
 
19
19
  " match class/definition/node declarations
20
- syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments
20
+ syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe
21
21
  syn keyword puppetDefType class define node inherits contained
22
22
  syn region puppetDefArguments start="(" end=")" contains=puppetArgument
23
23
  syn match puppetArgument "\w\+" contained
@@ -25,6 +25,7 @@ syn match puppetArgument "\$\w\+" contained
25
25
  syn match puppetArgument "'[^']+'" contained
26
26
  syn match puppetArgument '"[^"]+"' contained
27
27
  syn match puppetDefName "\w\+" contained
28
+ syn match puppetNodeRe "/.*/" contained
28
29
 
29
30
  " match 'foo' in 'class foo { ...'
30
31
  " match 'foo::bar' in 'class foo::bar { ...'
@@ -60,6 +61,7 @@ syn match puppetVariable "${\w\+}"
60
61
  " don't match variables if preceded by a backslash.
61
62
  syn region puppetString start=+'+ skip=+\\\\\|\\'+ end=+'+
62
63
  syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable,puppetNotVariable
64
+ syn match puppetString "/.*/"
63
65
  syn match puppetNotVariable "\\$\w\+" contained
64
66
  syn match puppetNotVariable "\\${\w\+}" contained
65
67
 
@@ -97,6 +99,7 @@ if version >= 508 || !exists("did_puppet_syn_inits")
97
99
  HiLink puppetControl Statement
98
100
  HiLink puppetDefType Define
99
101
  HiLink puppetDefName Type
102
+ HiLink puppetNodeRe Type
100
103
  HiLink puppetTypeName Statement
101
104
  HiLink puppetTypeDefault Type
102
105
  HiLink puppetParamName Identifier
data/install.rb CHANGED
@@ -35,7 +35,13 @@
35
35
  require 'rbconfig'
36
36
  require 'find'
37
37
  require 'fileutils'
38
- require 'ftools' # apparently on some system ftools doesn't get loaded
38
+ begin
39
+ require 'ftools' # apparently on some system ftools doesn't get loaded
40
+ $haveftools = true
41
+ rescue LoadError
42
+ puts "ftools not found. Using FileUtils instead.."
43
+ $haveftools = false
44
+ end
39
45
  require 'optparse'
40
46
  require 'ostruct'
41
47
 
@@ -92,9 +98,15 @@ def do_libs(libs, strip = 'lib/')
92
98
  libs.each do |lf|
93
99
  olf = File.join(InstallOptions.site_dir, lf.gsub(/#{strip}/, ''))
94
100
  op = File.dirname(olf)
95
- File.makedirs(op, true)
96
- File.chmod(0755, op)
97
- File.install(lf, olf, 0644, true)
101
+ if $haveftools
102
+ File.makedirs(op, true)
103
+ File.chmod(0755, op)
104
+ File.install(lf, olf, 0644, true)
105
+ else
106
+ FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
107
+ FileUtils.chmod(0755, op)
108
+ FileUtils.install(lf, olf, {:mode => 0644, :verbose => true})
109
+ end
98
110
  end
99
111
  end
100
112
 
@@ -102,9 +114,15 @@ def do_man(man, strip = 'man/')
102
114
  man.each do |mf|
103
115
  omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, ''))
104
116
  om = File.dirname(omf)
105
- File.makedirs(om, true)
106
- File.chmod(0755, om)
107
- File.install(mf, omf, 0644, true)
117
+ if $haveftools
118
+ File.makedirs(om, true)
119
+ File.chmod(0755, om)
120
+ File.install(mf, omf, 0644, true)
121
+ else
122
+ FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
123
+ FileUtils.chmod(0755, om)
124
+ FileUtils.install(mf, omf, {:mode => 0644, :verbose => true})
125
+ end
108
126
  gzip = %x{which gzip}
109
127
  gzip.chomp!
110
128
  %x{#{gzip} -f #{omf}}
@@ -24,7 +24,7 @@ require 'puppet/util/suidmanager'
24
24
  # it's also a place to find top-level commands like 'debug'
25
25
 
26
26
  module Puppet
27
- PUPPETVERSION = '0.25.0'
27
+ PUPPETVERSION = '0.25.1'
28
28
 
29
29
  def Puppet.version
30
30
  return PUPPETVERSION
@@ -122,9 +122,9 @@ class Puppet::Agent
122
122
  def with_client
123
123
  begin
124
124
  @client = client_class.new
125
- rescue => details
125
+ rescue => detail
126
126
  puts detail.backtrace if Puppet[:trace]
127
- Puppet.err "Could not create instance of %s: %s" % [client_class, details]
127
+ Puppet.err "Could not create instance of %s: %s" % [client_class, detail]
128
128
  return
129
129
  end
130
130
  yield @client
@@ -49,12 +49,12 @@ Puppet::Application.new(:puppet) do
49
49
  end
50
50
 
51
51
  begin
52
- catalog = JSON.parse(text)
52
+ catalog = PSON.parse(text)
53
53
  unless catalog.is_a?(Puppet::Resource::Catalog)
54
- catalog = Puppet::Resource::Catalog.json_create(catalog)
54
+ catalog = Puppet::Resource::Catalog.pson_create(catalog)
55
55
  end
56
56
  rescue => detail
57
- raise Puppet::Error, "Could not deserialize catalog from json: %s" % detail
57
+ raise Puppet::Error, "Could not deserialize catalog from pson: %s" % detail
58
58
  end
59
59
 
60
60
  catalog = catalog.to_ral
@@ -160,13 +160,6 @@ Puppet::Application.new(:puppetd) do
160
160
  exit(14)
161
161
  end
162
162
 
163
- # FIXME: we should really figure out how to distribute the CRL
164
- # to clients. In the meantime, we just disable CRL checking if
165
- # the CRL file doesn't exist
166
- unless File::exist?(Puppet[:cacrl])
167
- Puppet[:cacrl] = 'false'
168
- end
169
-
170
163
  handlers = nil
171
164
 
172
165
  if options[:serve].empty?
@@ -79,6 +79,7 @@ Puppet::Application.new(:puppetdoc) do
79
79
  if @manifest
80
80
  Puppet::Util::RDoc.manifestdoc(files)
81
81
  else
82
+ options[:outputdir] = "doc" unless options[:outputdir]
82
83
  Puppet::Util::RDoc.rdoc(options[:outputdir], files)
83
84
  end
84
85
  rescue => detail
@@ -53,13 +53,13 @@ Puppet::Application.new(:puppetmasterd) do
53
53
 
54
54
  command(:compile) do
55
55
  Puppet::Util::Log.newdestination :console
56
- raise ArgumentError, "Cannot render compiled catalogs without json support" unless Puppet.features.json?
56
+ raise ArgumentError, "Cannot render compiled catalogs without pson support" unless Puppet.features.pson?
57
57
  begin
58
58
  unless catalog = Puppet::Resource::Catalog.find(options[:node])
59
59
  raise "Could not compile catalog for %s" % options[:node]
60
60
  end
61
61
 
62
- $stdout.puts catalog.render(:json)
62
+ $stdout.puts catalog.render(:pson)
63
63
  rescue => detail
64
64
  $stderr.puts detail
65
65
  exit(30)
@@ -133,7 +133,12 @@ class Puppet::Configurer
133
133
  # This just passes any options on to the catalog,
134
134
  # which accepts :tags and :ignoreschedules.
135
135
  def run(options = {})
136
- prepare()
136
+ begin
137
+ prepare()
138
+ rescue Exception => detail
139
+ puts detail.backtrace if Puppet[:trace]
140
+ Puppet.err "Failed to prepare catalog: %s" % detail
141
+ end
137
142
 
138
143
  if catalog = options[:catalog]
139
144
  options.delete(:catalog)
@@ -29,11 +29,11 @@ module Puppet::Configurer::FactHandler
29
29
  #format = facts.class.default_format
30
30
 
31
31
  # Hard-code yaml, because I couldn't get marshal to work.
32
- format = :yaml
32
+ format = :b64_zlib_yaml
33
33
 
34
34
  text = facts.render(format)
35
35
 
36
- return {:facts_format => format, :facts => CGI.escape(text)}
36
+ return {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(text)}
37
37
  end
38
38
 
39
39
  # Retrieve facts from the central server.
@@ -168,7 +168,7 @@ module Puppet
168
168
  :queue_source => ["stomp://localhost:61613/", "Which type of queue to use for asynchronous processing. If your stomp server requires
169
169
  authentication, you can include it in the URI as long as your stomp client library is at least 1.1.1"],
170
170
  :async_storeconfigs => {:default => false, :desc => "Whether to use a queueing system to provide asynchronous database integration.
171
- Requires that ``puppetqd`` be running and that 'JSON' support for ruby be installed.",
171
+ Requires that ``puppetqd`` be running and that 'PSON' support for ruby be installed.",
172
172
  :hook => proc do |value|
173
173
  if value
174
174
  # This reconfigures the terminii for Node, Facts, and Catalog
@@ -522,7 +522,7 @@ module Puppet
522
522
  authority requests. It's a separate server because it cannot
523
523
  and does not need to horizontally scale."],
524
524
  :ca_port => ["$masterport", "The port to use for the certificate authority."],
525
- :preferred_serialization_format => ["json", "The preferred means of serializing
525
+ :preferred_serialization_format => ["pson", "The preferred means of serializing
526
526
  ruby instances for passing over the wire. This won't guarantee that all
527
527
  instances will be serialized using this method, since not all classes
528
528
  can be guaranteed to support this format, but it will be used for all
@@ -423,9 +423,10 @@ class Nagios::Base
423
423
  end
424
424
 
425
425
  newtype :serviceescalation do
426
- setparameters :host_name, :hostgroup_name, :service_description, :contacts,
427
- :contact_groups, :first_notification, :last_notification,
428
- :notification_interval, :escalation_period, :escalation_options,
426
+ setparameters :host_name, :hostgroup_name, :servicegroup_name,
427
+ :service_description, :contacts, :contact_groups,
428
+ :first_notification, :last_notification, :notification_interval,
429
+ :escalation_period, :escalation_options,
429
430
  :register, :use,
430
431
  :_naginator_name
431
432