Issue #6632 has been updated by Paul Berry. Status changed from Accepted to Available In Testing Branch
Fixed in commit:a1fbe9f007b5f099d6303ed496c83290938a77c8. There were two problems: * In lib/puppet/type/mount.rb, we were calling provider.mounted? to determine whether we needed to execute "mount" after updating the in-memory fstab record. This wasn't working properly because provider.mounted? makes its decision based on the data stored in the in-memory fstab record. Since the fstab record had just been updated, provider.mounted? was incorrectly returning true even though the device wasn't actually mounted. Fixed this by checking provider.mounted? before updating the in-memory fstab record. * Calling mount from this point in lib/puppet/type/mount.rb is actually too early, because even though the in-memory fstab record has been created, its contents have not been written to `/etc/fstab` yet. Fixed this by storing a :needs_mount entry in the property_hash and checking it at the end of the flush() method. ---------------------------------------- Bug #6632: Adding a new mount causes error with umount https://projects.puppetlabs.com/issues/6632 Author: Paul Berry Status: Available In Testing Branch Priority: Normal Assignee: Category: Target version: Affected Puppet version: development Keywords: Branch: This behavior was observed on Mac OS X. I suspect it exists on other OSes. These repro steps are based on mounting a device `/dev/disk1s1` at a mount point called `/mnt/NIKON_D40X`. It should be easy to adapt to other devices: * Ensure that `/dev/disk1s1` is not mounted, and is not mentioned in `/etc/fstab`. * Run the following manifest: file { '/mnt': ensure => directory } file { '/mnt/NIKON_D40X': ensure => directory } mount { '/mnt/NIKON_D40X': ensure => mounted, device => "/dev/disk1s1", fstype => msdos, options => ro, require => File['/mnt/NIKON_D40X'] } * Expected result: fstab entry created and device mounted. Observed result: fstab entry created, but Puppet generates this error: err: /Stage[main]//Mount[/mnt/NIKON_D40X]: Failed to call refresh: Execution of '/sbin/umount /mnt/NIKON_D40X' returned 1: umount: /mnt/NIKON_D40X: not currently mounted -- 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.
