Issue #2371 has been updated by Steven Jenkins.
Note that the default suffix is 'puppet' (cf lib/puppet/type/file.rb:90), which
probably explains Sam's suffix.
I think the following patch may fix the problem, but I've not yet managed to
test it. If someone could assemble a test case, that would be helpful:
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
index 55d4ec7..d65df78 100644
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@ -335,6 +335,7 @@ module Puppet
backup = self[:backup]
return nil unless backup
+ return nil if nil?(backup)
return nil if backup =~ /^\./
unless catalog or backup == "puppet"
----------------------------------------
Bug #2371: Files created with "main" appended
http://projects.reductivelabs.com/issues/2371
Author: fzzzt -
Status: Accepted
Priority: High
Assigned to: Luke Kanies
Category: file
Target version: 0.25.0
Complexity: Unknown
Affected version: 0.25.0beta1
Keywords:
I don't have much info unfortunately, but I've noticed files being created with
"main" appended. For example, one webapp we have called onramp gets a
"onramp.conf" file put in /etc/httpd/conf.d (RHEL5). Right now I see that file
*and* "onramp.confmain" in there. At one point I found a directory that had at
least dozens of "main"s appended, e.g.
"logsmainmainmainmainmainmainmainmainmain". IIRC this was in another directory
with similar problems, but I deleted those... It looks like the "main" file was
created when the new one was installed. I added a new Alias line to the file,
restarted puppet on the client, and the "main" file is the version without the
new line. I don't see any errors in the logs (though I'm not running debug) and
it doesn't seem to happen every time...
onramp's init.pp is:
<pre>
class onramp {
file {
"/etc/httpd/conf.d/onramp.conf":
checksum => md5,
owner => root,
group => root,
mode => 440,
notify => Service['httpd'],
require => Package['httpd'],
source => "puppet:///modules/onramp/etc/httpd/conf.d/onramp.conf",
}
}
</pre>
site.pp has:
<pre>
filebucket {
main:
server => puppet
}
File {
backup => main,
}
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---