Issue #2398 has been updated by James Turnbull. Status changed from Needs more information to Accepted Complexity changed from Unknown to Easy
---------------------------------------- Bug #2398: Mount ensure => absent does not unmount file systems not listed in /etc/fstab http://projects.reductivelabs.com/issues/2398 Author: John Bollinger Status: Accepted Priority: Normal Assigned to: Luke Kanies Category: mount Target version: Complexity: Easy Affected version: 0.24.8 Keywords: I'm working on using Puppet to change from standard mounts to automounts for some remote file systems. To make this as seamless as possible, I want to replace the original mount points with symlinks to the new ones. Naturally, changing a mount point to a symlink must be done only after the filesystem is unmounted, lest havoc and destruction ensue. Puppet appeared to provide everything I needed for the job. As long as the mount is listed in /etc/fstab, these resource specifications seem to do the trick: mount { "/example": ensure => "absent" } file { "/example": ensure => "/net/host/example", links => "manage", force => true, require => Mount["/example"], } If a file system is mounted on the specified mount point but _not_ listed in /etc/fstab, however, then Puppet _does not_ (with those specifications) unmount that file system before attempting to replace its mount point with a symlink. As a result, Puppet ends up attempting to recursively delete the remote FS's entire contents. The outcome depends largely on export and mount options, but it can be catastrophic. The type reference says of mount: "Manages mounted filesystems, including putting mount information into the mount table." At best, that's a misleading description of the observed behavior. The implementation seems more geared to managing the mount table as a primary task, with management of actual mounting and unmounting being subordinate. Ideally, this will be resolved by updating the mount type to take account of the actual active mounts, as available from "mount -l", "df", or "/proc/mounts", so as to better ensure that _all_ file systems that should be unmounted really are unmounted. It could possibly be extended to also support mounting file systems without recording them in the mount table. If the current behavior is retained, however, then the documentation should be updated to make that behavior clearer. -- 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 -~----------~----~----~----~------~----~------~--~---
