Issue #3022 has been updated by Kelsey Hightower. Status changed from In Topic Branch Pending Review to Merged - Pending Release
Merged: [2b62839e54a](https://github.com/puppetlabs/puppet/commit/2b62839e54a815734db50f07ea902b367b306558) ---------------------------------------- Bug #3022: Purge doesn't seem to remove directories. https://projects.puppetlabs.com/issues/3022#change-57437 Author: Josh Endries Status: Merged - Pending Release Priority: Normal Assignee: Nick Fagerlund Category: file Target version: Affected Puppet version: 0.25.1 Keywords: Branch: Setting purge=yes on a recursive file resource doesn't work completely for me in 0.25.1. I have a definition that selects the files to copy based on a given version, e.g. for version 1.0 copy files/1.0/... and for 2.0 copy files/2.0/... recursively. I have purge=>yes. After upgrading the app from 1.0 to 2.0, it attempted to remove old (empty) directories but gave me this: Jan 8 14:56:02 repo1 puppetd[31609]: (/File[/usr/local/fedora/server/fedora-internal-use/fedora-internal-use-backend-service-policies]/ensure) change from directory to absent failed: Could not back up; will not replace Jan 8 14:56:02 repo1 puppetd[31609]: (/File[/usr/local/fedora/server/management/upload]/ensure) change from directory to absent failed: Could not back up; will not replace I applied the fix located at http://projects.reductivelabs.com/projects/puppet/repository/revisions/cccbca4e540db85e49428cae2c78390bfcdbf4a0 which changed the messages to: Jan 8 15:12:28 repo1 puppetd[1497]: (/File[/usr/local/fedora/server/fedora-internal-use/fedora-internal-use-backend-service-policies]) Not removing directory; use 'force' to override Jan 8 15:12:28 repo1 puppetd[1497]: (/File[/usr/local/fedora/server/fedora-internal-use/fedora-internal-use-backend-service-policies]/ensure) removed Jan 8 15:12:28 repo1 puppetd[1497]: (/File[/usr/local/fedora/server/management/upload]) Not removing directory; use 'force' to override Jan 8 15:12:28 repo1 puppetd[1497]: (/File[/usr/local/fedora/server/management/upload]/ensure) removed While it says "removed" for both, it didn't remove them. I re-ran Puppet after that and got the same messages. It should delete the directories as far as I can tell... I don't have any buckets or anything set up so it would be using the defaults for that, which I think is a local "puppet" bucket. Relatedly, in the docs, "force" says: "Force the file operation. Currently only used when replacing directories with links. Valid values are true, false." This should probably be updated regarding links, it seems like it would apply for anything (at least from the logs). Just a discrepancy I ran across. -- 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.
