puppet 0.23.0 → 0.23.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 (125) hide show
  1. data/CHANGELOG +58 -0
  2. data/Rakefile +1 -1
  3. data/bin/filebucket +6 -6
  4. data/bin/puppetca +11 -1
  5. data/bin/puppetmasterd +7 -6
  6. data/conf/redhat/client.init +1 -0
  7. data/conf/redhat/{puppetd.conf → puppet.conf} +1 -1
  8. data/conf/redhat/puppet.spec +43 -31
  9. data/conf/redhat/server.init +1 -0
  10. data/lib/puppet.rb +3 -3
  11. data/lib/puppet/configuration.rb +16 -5
  12. data/lib/puppet/metatype/attributes.rb +12 -19
  13. data/lib/puppet/metatype/evaluation.rb +10 -1
  14. data/lib/puppet/metatype/instances.rb +39 -15
  15. data/lib/puppet/metatype/manager.rb +1 -28
  16. data/lib/puppet/metatype/metaparams.rb +20 -16
  17. data/lib/puppet/metatype/providers.rb +8 -2
  18. data/lib/puppet/metatype/schedules.rb +14 -19
  19. data/lib/puppet/{modules.rb → module.rb} +2 -0
  20. data/lib/puppet/network/authstore.rb +5 -1
  21. data/lib/puppet/network/client/dipper.rb +2 -2
  22. data/lib/puppet/network/client/master.rb +18 -9
  23. data/lib/puppet/network/handler/fileserver.rb +3 -6
  24. data/lib/puppet/network/handler/report.rb +2 -1
  25. data/lib/puppet/network/server/mongrel.rb +4 -2
  26. data/lib/puppet/network/xmlrpc/client.rb +10 -3
  27. data/lib/puppet/parameter.rb +11 -4
  28. data/lib/puppet/parser/ast/collexpr.rb +10 -10
  29. data/lib/puppet/parser/ast/hostclass.rb +2 -2
  30. data/lib/puppet/parser/ast/resourceparam.rb +4 -3
  31. data/lib/puppet/parser/ast/resourceref.rb +16 -2
  32. data/lib/puppet/parser/collector.rb +8 -4
  33. data/lib/puppet/parser/functions.rb +5 -2
  34. data/lib/puppet/parser/interpreter.rb +48 -9
  35. data/lib/puppet/parser/lexer.rb +2 -1
  36. data/lib/puppet/parser/parser.rb +669 -589
  37. data/lib/puppet/parser/resource.rb +20 -11
  38. data/lib/puppet/parser/resource/param.rb +21 -10
  39. data/lib/puppet/parser/resource/reference.rb +2 -2
  40. data/lib/puppet/parser/scope.rb +22 -10
  41. data/lib/puppet/{type/property.rb → property.rb} +48 -15
  42. data/lib/puppet/propertychange.rb +3 -3
  43. data/lib/puppet/provider/cron/crontab.rb +38 -36
  44. data/lib/puppet/provider/host/netinfo.rb +1 -2
  45. data/lib/puppet/provider/mailalias/aliases.rb +31 -0
  46. data/lib/puppet/provider/maillist/mailman.rb +113 -0
  47. data/lib/puppet/provider/mount.rb +5 -11
  48. data/lib/puppet/provider/mount/parsed.rb +2 -2
  49. data/lib/puppet/provider/package/appdmg.rb +1 -2
  50. data/lib/puppet/provider/package/apt.rb +3 -1
  51. data/lib/puppet/provider/package/aptrpm.rb +14 -4
  52. data/lib/puppet/provider/package/blastwave.rb +6 -4
  53. data/lib/puppet/provider/package/dpkg.rb +12 -4
  54. data/lib/puppet/provider/package/pkgdmg.rb +2 -2
  55. data/lib/puppet/provider/package/rpm.rb +11 -1
  56. data/lib/puppet/provider/package/rug.rb +1 -0
  57. data/lib/puppet/provider/package/urpmi.rb +11 -1
  58. data/lib/puppet/provider/package/yum.rb +12 -2
  59. data/lib/puppet/provider/parsedfile.rb +36 -6
  60. data/lib/puppet/rails.rb +9 -2
  61. data/lib/puppet/rails/param_name.rb +2 -3
  62. data/lib/puppet/rails/param_value.rb +20 -1
  63. data/lib/puppet/rails/resource.rb +8 -2
  64. data/lib/puppet/reference/configuration.rb +14 -16
  65. data/lib/puppet/reference/type.rb +4 -4
  66. data/lib/puppet/transaction.rb +4 -4
  67. data/lib/puppet/type.rb +19 -6
  68. data/lib/puppet/type/component.rb +9 -3
  69. data/lib/puppet/type/cron.rb +10 -4
  70. data/lib/puppet/type/exec.rb +9 -5
  71. data/lib/puppet/type/group.rb +2 -3
  72. data/lib/puppet/type/mailalias.rb +50 -0
  73. data/lib/puppet/type/maillist.rb +57 -0
  74. data/lib/puppet/type/mount.rb +25 -11
  75. data/lib/puppet/type/package.rb +6 -27
  76. data/lib/puppet/type/pfile.rb +5 -6
  77. data/lib/puppet/type/pfile/source.rb +8 -2
  78. data/lib/puppet/type/pfilebucket.rb +4 -3
  79. data/lib/puppet/type/resources.rb +1 -3
  80. data/lib/puppet/type/schedule.rb +16 -16
  81. data/lib/puppet/type/service.rb +4 -1
  82. data/lib/puppet/type/tidy.rb +1 -2
  83. data/lib/puppet/type/user.rb +2 -3
  84. data/lib/puppet/type/yumrepo.rb +2 -2
  85. data/lib/puppet/util.rb +29 -4
  86. data/lib/puppet/util/autoload.rb +45 -16
  87. data/lib/puppet/util/fileparsing.rb +23 -6
  88. data/lib/puppet/util/filetype.rb +12 -1
  89. data/lib/puppet/util/log.rb +2 -2
  90. data/lib/puppet/util/log_paths.rb +16 -0
  91. data/lib/puppet/util/reference.rb +2 -2
  92. data/test/language/ast/hostclass.rb +21 -4
  93. data/test/language/ast/resourceref.rb +95 -0
  94. data/test/language/functions.rb +5 -5
  95. data/test/language/interpreter.rb +129 -1
  96. data/test/language/node.rb +13 -2
  97. data/test/language/resource.rb +26 -1
  98. data/test/language/scope.rb +25 -5
  99. data/test/lib/puppettest/support/collection.rb +2 -2
  100. data/test/network/client/master.rb +28 -42
  101. data/test/network/server/mongrel_test.rb +7 -1
  102. data/test/other/propertychange.rb +2 -2
  103. data/test/other/transactions.rb +44 -5
  104. data/test/puppet/modules.rb +2 -1
  105. data/test/rails/ast.rb +7 -8
  106. data/test/rails/collection.rb +2 -2
  107. data/test/rails/railsresource.rb +21 -5
  108. data/test/ral/manager/attributes.rb +33 -1
  109. data/test/ral/manager/instances.rb +33 -6
  110. data/test/ral/manager/type.rb +29 -49
  111. data/test/ral/providers/cron/crontab.rb +61 -13
  112. data/test/ral/providers/mailalias/aliases.rb +57 -0
  113. data/test/ral/providers/mount/parsed.rb +4 -4
  114. data/test/ral/providers/package/apt.rb +13 -1
  115. data/test/ral/providers/parsedfile.rb +20 -7
  116. data/test/ral/types/cron.rb +17 -1
  117. data/test/ral/types/mailalias.rb +50 -0
  118. data/test/ral/types/mount.rb +35 -2
  119. data/test/ral/types/package.rb +10 -2
  120. data/test/ral/types/parameter.rb +4 -4
  121. data/test/ral/types/property.rb +39 -1
  122. data/test/util/autoload.rb +33 -18
  123. data/test/util/filetype.rb +49 -3
  124. metadata +13 -6
  125. data/lib/puppet/element.rb +0 -52
@@ -96,6 +96,15 @@ class Puppet::Type
96
96
  prophash
97
97
  }
98
98
  end
99
+
100
+ # Are we running in noop mode?
101
+ def noop?
102
+ @noop || Puppet[:noop]
103
+ end
104
+
105
+ def noop
106
+ noop?
107
+ end
99
108
 
100
109
  # Retrieve the changes associated with all of the properties.
101
110
  def propertychanges(currentvalues)
@@ -144,4 +153,4 @@ class Puppet::Type
144
153
  end
145
154
  end
146
155
 
147
- # $Id: evaluation.rb 2488 2007-05-09 12:30:03Z ballman $
156
+ # $Id: evaluation.rb 2678 2007-07-11 19:30:42Z luke $
@@ -1,3 +1,5 @@
1
+ require 'puppet/transportable'
2
+
1
3
  class Puppet::Type
2
4
  # Make 'new' private, so people have to use create instead.
3
5
  class << self
@@ -89,7 +91,7 @@ class Puppet::Type
89
91
  # If we're the base class, then pass the info on appropriately
90
92
  if self == Puppet::Type
91
93
  type = nil
92
- if hash.is_a? TransObject
94
+ if hash.is_a? Puppet::TransObject
93
95
  type = hash.type
94
96
  else
95
97
  # If we're using the type to determine object type, then delete it
@@ -116,7 +118,7 @@ class Puppet::Type
116
118
  end
117
119
 
118
120
  name = nil
119
- unless hash.is_a? TransObject
121
+ unless hash.is_a? Puppet::TransObject
120
122
  hash = self.hash2trans(hash)
121
123
  end
122
124
 
@@ -182,13 +184,22 @@ class Puppet::Type
182
184
  end
183
185
 
184
186
  # remove a specified object
185
- def self.delete(object)
187
+ def self.delete(resource)
186
188
  return unless defined? @objects
187
- if @objects.include?(object.title)
188
- @objects.delete(object.title)
189
+ if @objects.include?(resource.title)
190
+ @objects.delete(resource.title)
189
191
  end
190
- if @aliases.include?(object.title)
191
- @aliases.delete(object.title)
192
+ if @aliases.include?(resource.title)
193
+ @aliases.delete(resource.title)
194
+ end
195
+ if @aliases.has_value?(resource)
196
+ names = []
197
+ @aliases.each do |name, otherres|
198
+ if otherres == resource
199
+ names << name
200
+ end
201
+ end
202
+ names.each { |name| @aliases.delete(name) }
192
203
  end
193
204
  end
194
205
 
@@ -236,7 +247,7 @@ class Puppet::Type
236
247
  end
237
248
  # okay, now make a transobject out of hash
238
249
  begin
239
- trans = TransObject.new(title, self.name.to_s)
250
+ trans = Puppet::TransObject.new(title, self.name.to_s)
240
251
  hash.each { |param, value|
241
252
  trans[param] = value
242
253
  }
@@ -255,17 +266,30 @@ class Puppet::Type
255
266
  end
256
267
 
257
268
  # Put the default provider first, then the rest of the suitable providers.
258
- packages = {}
269
+ provider_instances = {}
259
270
  providers_by_source.collect do |provider|
260
271
  provider.instances.collect do |instance|
261
- if other = packages[instance.name]
262
- Puppet.warning "Package %s found in both %s and %s; skipping the %s version" %
263
- [instance.name, other.class.name, instance.class.name, instance.class.name]
272
+ # First try to get the resource if it already exists
273
+ if resource = self[instance.name] and resource.provider.class != instance.class
274
+ # Skip instances that map to a managed resource with a different provider
264
275
  next
265
276
  end
266
- packages[instance.name] = instance
267
277
 
268
- create(:name => instance.name, :provider => instance, :check => :all)
278
+ # We always want to use the "first" provider instance we find, unless the resource
279
+ # is already managed and has a different provider set
280
+ if other = provider_instances[instance.name]
281
+ Puppet.warning "%s %s found in both %s and %s; skipping the %s version" %
282
+ [self.name.to_s.capitalize, instance.name, other.class.name, instance.class.name, instance.class.name]
283
+ next
284
+ end
285
+ provider_instances[instance.name] = instance
286
+
287
+ if resource
288
+ resource.provider = instance
289
+ resource
290
+ else
291
+ create(:name => instance.name, :provider => instance, :check => :all)
292
+ end
269
293
  end
270
294
  end.flatten.compact
271
295
  end
@@ -292,4 +316,4 @@ class Puppet::Type
292
316
  end
293
317
  end
294
318
 
295
- # $Id: instances.rb 2555 2007-06-08 17:20:00Z luke $
319
+ # $Id: instances.rb 2718 2007-07-19 22:12:51Z luke $
@@ -29,30 +29,6 @@ module Manager
29
29
  typeloader.loadall
30
30
  end
31
31
 
32
- # Do an on-demand plugin load
33
- def loadplugin(name)
34
- paths = Puppet[:pluginpath].split(":")
35
- unless paths.include?(Puppet[:plugindest])
36
- Puppet.notice "Adding plugin destination %s to plugin search path" %
37
- Puppet[:plugindest]
38
- Puppet[:pluginpath] += ":" + Puppet[:plugindest]
39
- end
40
- paths.each do |dir|
41
- file = ::File.join(dir, name.to_s + ".rb")
42
- if FileTest.exists?(file)
43
- begin
44
- load file
45
- Puppet.info "loaded %s" % file
46
- return true
47
- rescue LoadError => detail
48
- Puppet.info "Could not load plugin %s: %s" %
49
- [file, detail]
50
- return false
51
- end
52
- end
53
- end
54
- end
55
-
56
32
  # Define a new type.
57
33
  def newtype(name, options = {}, &block)
58
34
  # Handle backward compatibility
@@ -144,9 +120,6 @@ module Manager
144
120
  unless @types.include? name
145
121
  Puppet.warning "Loaded puppet/type/#{name} but no class was created"
146
122
  end
147
- else
148
- # If we can't load it from there, try loading it as a plugin.
149
- loadplugin(name)
150
123
  end
151
124
 
152
125
  return @types[name]
@@ -166,4 +139,4 @@ module Manager
166
139
  end
167
140
  end
168
141
 
169
- # $Id: manager.rb 2178 2007-02-07 23:56:59Z luke $
142
+ # $Id: manager.rb 2680 2007-07-12 04:27:04Z luke $
@@ -38,14 +38,6 @@ class Puppet::Type
38
38
 
39
39
  The creation of the schedule object does not need to appear in the
40
40
  configuration before objects that use it."
41
-
42
- munge do |name|
43
- if schedule = Puppet.type(:schedule)[name]
44
- return schedule
45
- else
46
- return name
47
- end
48
- end
49
41
  end
50
42
 
51
43
  newmetaparam(:check) do
@@ -59,7 +51,14 @@ class Puppet::Type
59
51
  munge do |args|
60
52
  # If they've specified all, collect all known properties
61
53
  if args == :all
62
- args = @resource.class.properties.collect do |property|
54
+ args = @resource.class.properties.find_all do |property|
55
+ # Only get properties supported by our provider
56
+ if @resource.provider
57
+ @resource.provider.class.supports_parameter?(property)
58
+ else
59
+ true
60
+ end
61
+ end.collect do |property|
63
62
  property.name
64
63
  end
65
64
  end
@@ -214,10 +213,10 @@ class Puppet::Type
214
213
  end
215
214
 
216
215
  newmetaparam(:tag) do
217
- desc "Add the specified tags to the associated element. While all elements
216
+ desc "Add the specified tags to the associated resource. While all resources
218
217
  are automatically tagged with as much information as possible
219
- (e.g., each class and component containing the element), it can
220
- be useful to add your own tags to a given element.
218
+ (e.g., each class and definition containing the resource), it can
219
+ be useful to add your own tags to a given resource.
221
220
 
222
221
  Tags are currently useful for things like applying a subset of a
223
222
  host's configuration::
@@ -329,11 +328,16 @@ class Puppet::Type
329
328
  file { \"/usr/local/scripts/myscript\":
330
329
  source => \"puppet://server/module/myscript\",
331
330
  mode => 755,
332
- require => file[\"/usr/local/scripts\"]
331
+ require => File[\"/usr/local/scripts\"]
333
332
  }
334
333
 
334
+ Multiple dependencies can be specified by providing a comma-seperated list
335
+ of resources, enclosed in square brackets::
336
+
337
+ require => [ File[\"/usr/local\"], File[\"/usr/local/scripts\"] ]
338
+
335
339
  Note that Puppet will autorequire everything that it can, and
336
- there are hooks in place so that it's easy for elements to add new
340
+ there are hooks in place so that it's easy for resources to add new
337
341
  ways to autorequire objects, so if you think Puppet could be
338
342
  smarter here, let us know.
339
343
 
@@ -342,7 +346,7 @@ class Puppet::Type
342
346
  automatically realize that the parent directory should be created
343
347
  before the script is pulled down.
344
348
 
345
- Currently, exec elements will autorequire their CWD (if it is
349
+ Currently, exec resources will autorequire their CWD (if it is
346
350
  specified) plus any fully qualified paths that appear in the
347
351
  command. For instance, if you had an ``exec`` command that ran
348
352
  the ``myscript`` mentioned above, the above code that pulls the
@@ -410,4 +414,4 @@ class Puppet::Type
410
414
  end
411
415
  end # Puppet::Type
412
416
 
413
- # $Id: metaparams.rb 2591 2007-06-15 19:49:26Z luke $
417
+ # $Id: metaparams.rb 2684 2007-07-12 16:39:47Z luke $
@@ -1,3 +1,4 @@
1
+ require 'puppet/provider'
1
2
  require 'puppet/util/provider_features'
2
3
  class Puppet::Type
3
4
  # Add the feature handling module.
@@ -113,6 +114,11 @@ class Puppet::Type
113
114
  def self.provide(name, options = {}, &block)
114
115
  name = Puppet::Util.symbolize(name)
115
116
 
117
+ if obj = @providers[name]
118
+ Puppet.debug "Reloading %s %s provider" % [name, self.name]
119
+ unprovide(name)
120
+ end
121
+
116
122
  parent = if pname = options[:parent]
117
123
  options.delete(:parent)
118
124
  if pname.is_a? Class
@@ -127,7 +133,7 @@ class Puppet::Type
127
133
  end
128
134
  end
129
135
  else
130
- Puppet::Type::Provider
136
+ Puppet::Provider
131
137
  end
132
138
 
133
139
  options[:resource_type] ||= self
@@ -244,4 +250,4 @@ class Puppet::Type
244
250
  end
245
251
  end
246
252
 
247
- # $Id: providers.rb 2552 2007-06-05 01:17:00Z luke $
253
+ # $Id: providers.rb 2714 2007-07-19 18:12:20Z luke $
@@ -3,32 +3,27 @@ class Puppet::Type
3
3
  # the instantiation phase, so that the schedule can be anywhere in the
4
4
  # file.
5
5
  def schedule
6
-
7
- # If we've already set the schedule, then just move on
8
- return if self[:schedule].is_a?(Puppet.type(:schedule))
9
-
10
- return unless self[:schedule]
11
-
12
- # Schedules don't need to be scheduled
13
- #return if self.is_a?(Puppet.type(:schedule))
14
-
15
- # Nor do components
16
- #return if self.is_a?(Puppet.type(:component))
17
-
18
- if sched = Puppet.type(:schedule)[self[:schedule]]
19
- self[:schedule] = sched
20
- else
21
- self.fail "Could not find schedule %s" % self[:schedule]
6
+ unless defined? @schedule
7
+ if name = self[:schedule]
8
+ if sched = Puppet.type(:schedule)[name]
9
+ @schedule = sched
10
+ else
11
+ self.fail "Could not find schedule %s" % name
12
+ end
13
+ else
14
+ @schedule = nil
15
+ end
22
16
  end
17
+ @schedule
23
18
  end
24
19
 
25
20
  # Check whether we are scheduled to run right now or not.
26
21
  def scheduled?
27
22
  return true if Puppet[:ignoreschedules]
28
- return true unless schedule = self[:schedule]
23
+ return true unless schedule = self.schedule
29
24
 
30
25
  # We use 'checked' here instead of 'synced' because otherwise we'll
31
- # end up checking most elements most times, because they will generally
26
+ # end up checking most resources most times, because they will generally
32
27
  # have been synced a long time ago (e.g., a file only gets updated
33
28
  # once a month on the server and its schedule is daily; the last sync time
34
29
  # will have been a month ago, so we'd end up checking every run).
@@ -36,4 +31,4 @@ class Puppet::Type
36
31
  end
37
32
  end
38
33
 
39
- # $Id: schedules.rb 1762 2006-10-10 20:59:10Z luke $
34
+ # $Id: schedules.rb 2665 2007-07-09 21:32:33Z luke $
@@ -111,3 +111,5 @@ class Puppet::Module
111
111
 
112
112
  private :initialize
113
113
  end
114
+
115
+ # $Id: module.rb 2655 2007-07-06 22:22:10Z luke $
@@ -68,6 +68,10 @@ module Puppet
68
68
  @declarations = []
69
69
  end
70
70
 
71
+ def to_s
72
+ "authstore"
73
+ end
74
+
71
75
  private
72
76
 
73
77
  # Store the results of a pattern into our hash. Basically just
@@ -290,4 +294,4 @@ module Puppet
290
294
  end
291
295
  end
292
296
 
293
- # $Id: authstore.rb 2262 2007-03-08 00:16:53Z luke $
297
+ # $Id: authstore.rb 2673 2007-07-10 19:26:36Z luke $
@@ -19,7 +19,7 @@ class Puppet::Network::Client::Dipper < Puppet::Network::Client
19
19
  # Back up a file to our bucket
20
20
  def backup(file)
21
21
  unless FileTest.exists?(file)
22
- raise(BucketError, "File %s does not exist" % file)
22
+ raise(ArgumentError, "File %s does not exist" % file)
23
23
  end
24
24
  contents = ::File.read(file)
25
25
  unless local?
@@ -78,4 +78,4 @@ class Puppet::Network::Client::Dipper < Puppet::Network::Client
78
78
  end
79
79
  end
80
80
 
81
- # $Id: dipper.rb 2348 2007-03-24 21:16:20Z luke $
81
+ # $Id: dipper.rb 2679 2007-07-11 20:23:49Z luke $
@@ -175,7 +175,10 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
175
175
  def getconfig
176
176
  dostorage()
177
177
 
178
- facts = self.class.facts
178
+ facts = nil
179
+ Puppet::Util.benchmark(:debug, "Retrieved facts") do
180
+ facts = self.class.facts
181
+ end
179
182
 
180
183
  if self.objects or FileTest.exists?(self.cachefile)
181
184
  if self.fresh?(facts)
@@ -300,8 +303,12 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
300
303
  lockfile.lockfile
301
304
  else
302
305
  got_lock = true
303
- @configtime = thinmark do
304
- self.getconfig
306
+ begin
307
+ @configtime = thinmark do
308
+ self.getconfig
309
+ end
310
+ rescue => detail
311
+ Puppet.err "Could not retrieve configuration: %s" % detail
305
312
  end
306
313
 
307
314
  if defined? @objects and @objects
@@ -450,18 +457,20 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
450
457
  # Retrieve the plugins from the central server. We only have to load the
451
458
  # changed plugins, because Puppet::Type loads plugins on demand.
452
459
  def self.getplugins
453
- path = Puppet[:pluginpath].split(":")
454
460
  download(:dest => Puppet[:plugindest], :source => Puppet[:pluginsource],
455
461
  :ignore => Puppet[:pluginsignore], :name => "plugin") do |object|
456
462
 
457
- next unless path.include?(::File.dirname(object[:path]))
463
+ next if FileTest.directory?(object[:path])
464
+ path = object[:path].sub(Puppet[:plugindest], '').sub(/^\/+/, '')
465
+ unless Puppet::Util::Autoload.loaded?(path)
466
+ next
467
+ end
458
468
 
459
469
  begin
460
- Puppet.info "Reloading plugin %s" %
461
- ::File.basename(::File.basename(object[:path])).sub(".rb",'')
470
+ Puppet.info "Reloading downloaded file %s" % path
462
471
  load object[:path]
463
472
  rescue => detail
464
- Puppet.warning "Could not reload plugin %s: %s" %
473
+ Puppet.warning "Could not reload downloaded file %s: %s" %
465
474
  [object[:path], detail]
466
475
  end
467
476
  end
@@ -683,4 +692,4 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
683
692
  end
684
693
  end
685
694
 
686
- # $Id: master.rb 2602 2007-06-18 15:35:57Z luke $
695
+ # $Id: master.rb 2671 2007-07-10 19:25:32Z luke $
@@ -393,7 +393,7 @@ class Puppet::Network::Handler
393
393
 
394
394
  mod = Puppet::Module::find(tmp)
395
395
  if mod
396
- mount = @mounts[MODULES].copy(mod, mod.files)
396
+ mount = @mounts[MODULES].copy(mod.name, mod.files)
397
397
  else
398
398
  unless mount = @mounts[tmp]
399
399
  raise FileServerError, "Fileserver module '%s' not mounted" % tmp
@@ -456,7 +456,6 @@ class Puppet::Network::Handler
456
456
  sync.synchronize(Sync::EX) do
457
457
  @@files[path] = data
458
458
  data[:loaded_obj] = Puppet::Util::LoadedFile.new(path)
459
- Puppet.notice "Initializing values for %s" % path
460
459
  data[:values] = properties(obj)
461
460
  return data[:values]
462
461
  end
@@ -469,13 +468,11 @@ class Puppet::Network::Handler
469
468
 
470
469
  if changed
471
470
  sync.synchronize(Sync::EX) do
472
- Puppet.notice "Getting values for %s" % path
473
471
  data[:values] = properties(obj)
474
472
  return data[:values]
475
473
  end
476
474
  else
477
475
  sync.synchronize(Sync::SH) do
478
- Puppet.info "Using cached values for %s" % path
479
476
  return data[:values]
480
477
  end
481
478
  end
@@ -635,7 +632,7 @@ class Puppet::Network::Handler
635
632
  end
636
633
 
637
634
  def to_s
638
- "mount[#{@name}]"
635
+ "mount[%s]" % @name
639
636
  end
640
637
 
641
638
  # Verify our configuration is valid. This should really check to
@@ -660,4 +657,4 @@ class Puppet::Network::Handler
660
657
  end
661
658
  end
662
659
 
663
- # $Id: fileserver.rb 2629 2007-06-19 22:18:55Z luke $
660
+ # $Id: fileserver.rb 2653 2007-07-06 00:54:51Z luke $