Sam Tresler
2014-Mar-10 21:13 UTC
[Puppet Users] Recursive file delete fails with empty files
Sample config: file { "/var/www/apps": mode => 0644, owner => "username" group => "groupname", ensure => directory, recurse => true, purge => true, force => true, } Then on the agent: root@vpsXXX:/var/www/apps# ls root@vpsXXX:/var/www/apps# touch testfile root@vpsXXX:/var/www/apps# puppet agent -t Warning: Local environment: "production" doesn't match server specified node environment "development", switching agent to "development". Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/facility.rb Info: Loading facts in /var/lib/puppet/lib/facter/gateway.rb Info: Loading facts in /var/lib/puppet/lib/facter/xen_hypervisor_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/is_bridge.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_pass_set_date.rb Info: Caching catalog for vpsXXX.nope.com Info: Applying configuration version '1394485475' Error: Could not back up /var/www/apps/testfile: Error 400 on SERVER: No data to save Error: Could not back up /var/www/apps/testfile: Error 400 on SERVER: No data to save Error: /Stage[main]/App_manager/File[/var/www/apps/testfile]/ensure: change from file to absent failed: Could not back up /var/www/apps/testfile: Error 400 on SERVER: No data to save Notice: /Stage[main]/App_manager/App_manager::App[treslervania]/File[/var/www/apps/treslervania]: Dependency File[/var/www/apps/testfile] has failures: true Warning: /Stage[main]/App_manager/App_manager::App[treslervania]/File[/var/www/apps/treslervania]: Skipping because of failed dependencies ----many more dependency failures due to that ^^^ ------ root@vpsXXX:/var/www/apps# echo 'foo' >> testfile root@vpsXXX:/var/www/apps# puppet agent -t Warning: Local environment: "production" doesn't match server specified node environment "development", switching agent to "development". Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/facility.rb Info: Loading facts in /var/lib/puppet/lib/facter/gateway.rb Info: Loading facts in /var/lib/puppet/lib/facter/xen_hypervisor_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/is_bridge.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_pass_set_date.rb Info: Caching catalog for vpsXXX.nope.com Info: Applying configuration version '1394485381' Info: /Stage[main]/App_manager/File[/var/www/apps/testfile]: Filebucketed /var/www/apps/testfile to main with sum d3b07384d113edec49eaa6238ad5ff00 Notice: /Stage[main]/App_manager/File[/var/www/apps/testfile]/ensure: removed Notice: Finished catalog run in 46.07 seconds root@vpsXXX:/var/www/apps# So, is this a known bug, by design, or something that I should figure out how to file a bug report for? I can work around it easily enough, but it seems like a recursive, forced, purge shouldn't be stymied by a 0 byte file. neh? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3c81e197-ae0a-410e-acd2-a62e6ba1ea41%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.