Issue #3922 has been updated by Al Hoang.

I am also getting bitten by this behavior on a 0.25.5 installation.  Running 
puppet daemon with lots of debugging (puppetd --debug --verbose --trace 
--no-daemon) I get the following stack trace:

<pre>
debug: Flushing ssh_authorized_key provider target 
/home/foo/.ssh/authorized_keys
/usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir'
/usr/lib/ruby/1.8/fileutils.rb:243:in `fu_mkdir'
/usr/lib/ruby/1.8/fileutils.rb:217:in `mkdir_p'
/usr/lib/ruby/1.8/fileutils.rb:215:in `reverse_each'
/usr/lib/ruby/1.8/fileutils.rb:215:in `mkdir_p'
/usr/lib/ruby/1.8/fileutils.rb:201:in `each'
/usr/lib/ruby/1.8/fileutils.rb:201:in `mkdir_p'
/usr/lib/ruby/site_ruby/1.8/puppet/network/handler/filebucket.rb:100:in 
`addfile'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:145:in `withumask'
/usr/lib/ruby/site_ruby/1.8/puppet/network/handler/filebucket.rb:93:in `addfile'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/dipper.rb:29:in `backup'
/usr/lib/ruby/site_ruby/1.8/puppet/util/filetype.rb:92:in `backup'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/parsedfile.rb:91:in `backup_target'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/parsedfile.rb:97:in `flush_target'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/parsedfile.rb:74:in `flush'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/parsedfile.rb:72:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/parsedfile.rb:72:in `flush'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/parsedfile.rb:356:in `flush'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/ssh_authorized_key/parsed.rb:72:in 
`flush'
/usr/lib/ruby/site_ruby/1.8/puppet/util/suidmanager.rb:59:in `asuser'
/usr/lib/ruby/site_ruby/1.8/puppet/provider/ssh_authorized_key/parsed.rb:72:in 
`flush'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:752:in `flush'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:94:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:247:in 
`eval_children_and_apply_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:418:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:417:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:246:in 
`eval_children_and_apply_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:199:in `eval_resource'
</pre>

After a bit of tracing this down it seems that it is related to 
lib/puppet/provider/ssh_authorized_key/parsed.rb in the flush() method 
interacting with the filebucket during backup.  I committed what I consider at 
temporary fix on a private branch here of 0.25.x here:

http://github.com/hoanga/puppet/tree/bug/0.25.x/3922-ssh_authorized_key
----------------------------------------
Bug #3922: Ssh_authorized_key "Could not apply complete catalog: Could not back 
up"
http://projects.puppetlabs.com/issues/3922

Author: mélanie Gault
Status: Investigating
Priority: Normal
Assigned to: Matt Robinson
Category: ssh
Target version: 
Affected version: 0.25.5
Keywords: backup clientbucket catalog Ssh_authorized_key
Branch: 


I manage user, directories, ssh_authorized_key, ... on redhat 4 and 5 boxes 
with a master and a client with 0.25.5 version.
My puppet client runs as root and my maser with the user puppet.

Everything works fine for some of my users, but I got an error with 
clientbucket directory :

<pre>info: Caching catalog for puppet-client
info: Applying configuration version '1275367180'
notice: //users/My::User[my.user]/Ssh_authorized_key[my.user]/ensure: created
err: Could not apply complete catalog: Could not back up 
/home/my.user/.ssh/authorized_keys: Permission denied - 
/var/lib/puppet/clientbucket/f
notice: Finished catalog run in 3.52 seconds</pre>

If I create manualy this directory I got the same error for 
/var/lib/puppet/clientbucket/f/6 next for /var/lib/puppet/clientbucket/f/6/9...
And at the end I have :

<pre>[r...@monserveur: i386 ]$ puppetd --server my-puppet -t -o
info: Caching catalog for puppet-client
info: Applying configuration version '1275367180'
notice: //users/My::User[my.user]/Ssh_authorized_key[my.user]/ensure: created
err: Could not apply complete catalog: Could not back up 
/home/my.user/.ssh/authorized_keys: Permission denied - 
/var/lib/puppet/clientbucket/f/6/9/4/9/5/1/7/f6949517cbf4fddfa665d41361f8bce4
notice: Finished catalog run in 3.69 seconds</pre>


manifest citation :
<pre>  ssh_authorized_key { $name:
    ensure => $ensure,
    type   => "dsa",
    key    => $key,
    user   => $name,
    require => File["/home/$name/.ssh"],
  }
</pre>

With 0.25.3 I didn't have this issue.




-- 
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://projects.puppetlabs.com/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.

Reply via email to