Issue #6819 has been updated by Stefan Schulte. Assignee set to Stefan Schulte
I think I was wrong. When you run puppet, it parses every line of every `authorized_keys`-file (it is aware of). The content of every line (except comments and blank lines) is stored in an array of hashes (records). A record does NOT have to be unique. So one key CAN appear in more than one files and should not cause problems. However when you *manage* a record that appears in both files, puppet doesn't know which record should be connected to your resource. As a result puppet may think the record is in sync or decides that the target is wrong an moves the key. Purging the whole file however is definitly a bug. Unfortunately I was not able to reproduce the issue yet. - is the above manifest really everything that is needed or do you manage other keys than the specified one? - is the user present BEFORE the puppetrun? - do you do anything in your manifest (shipping authorized_keys with a file resource, installing a package) that can modify the authorized_key file DURING the puppetrun? ---------------------------------------- Bug #6819: ssh_authorized_key empty authorized_keys for users other than root https://projects.puppetlabs.com/issues/6819 Author: Cristian Tomoiaga Status: Investigating Priority: Normal Assignee: Stefan Schulte Category: provider Target version: Affected Puppet version: Keywords: ssh_authorized_key Branch: Hello everyone, I just installed puppet: Client 2.6.6 on CentOS 5.5 from epel-testing Server 2.6.2-4~bpo50+1 on Ubuntu 10.04.1 from Debian repo (same issue with the default package, tried and sticked with the Debian for now) Using the manifest below (tried with different variants, added name, changed from rsa to dss a.s.o.) will result in an empty authorized_keys file for user. I also tried adding target but the result is the same, the file is still empty. The file will be emptied/recreated each time puppet runs. class ssh_keys { ssh_authorized_key { "rsa-key-20110323": user => "test", key => "AAAAB...=", type => "ssh-rsa", ensure => "present", } } If I change from user test to root everything works ok. puppet agent --test info: Caching catalog for [server hostname] info: Applying configuration version '1300902056' notice: /Stage[main]/Ssh_keys/Ssh_authorized_key[rsa-key-20110323]/ensure: created info: FileBucket got a duplicate file {md5}d41d8cd98f00b204e9800998ecf8427e notice: Finished catalog run in 0.36 seconds "FileBucket got a duplicate file" won't appear on the first run, after that it will be there everytime. -- 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.
