Issue #2117 has been updated by luke.
Status changed from Accepted to Needs more information
I can't reproduce this:
<pre>
l...@phage $ ls -l /tmp/k5test
gls: cannot access /tmp/k5test: No such file or directory
l...@phage $ head -3 ~/bin/test.pp
#!/usr/bin/env puppet --verbose
k5login { "/tmp/k5test": principals => [foo, bar], ensure => present, mode =>
644 }
l...@phage $ test.pp
info: Loading facts in test
notice: //K5login[/tmp/k5test]/ensure: created
l...@phage $
</pre>
Can I get a stack trace and a specific means of reproducing?
----------------------------------------
Bug #2117: k5login type fails if file not already present
http://projects.reductivelabs.com/issues/2117
Author: johnireland
Status: Accepted
Priority: Normal
Assigned to: luke
Category: unknown
Target version: 0.25.0
Complexity: Trivial
Affected version: 0.24.4
Keywords:
The k5login type is documented as supporting 'ensurable' but actually fails if
the file doesn't already exist, regardless of this setting. This appears to be
due to an uncaught error condition when checking the file mode. The affected
file is k5login.rb and the following patch appears to fix this issue:
--- k5login.rb.orig 2009-03-27 22:45:55.000000000 +0000
+++ k5login.rb 2009-03-27 22:45:39.000000000 +0000
@@ -72,5 +72,9 @@
# Return the mode as an octal string, not as an integer
def mode
- "%o" % (File.stat(@resource[:name]).mode & 007777)
+ if File.exists?(@resource[:name])
+ "%o" % (File.stat(@resource[:name]).mode & 007777)
+ else
+ "0000"
+ end
end
I am running version 0.24.4 as supplied in the Debian Lenny distribution.
--
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
-~----------~----~----~----~------~----~------~--~---