Issue #7300 has been updated by Stefan Schulte.

The ensurestate of `:ghost` was introduced in 2.6.7. This was necessary because 
when the user has something like

    mount { 'foo':
      ensure => mounted,
    }

And the mount is not in fstab, puppet has to know whether it has to add an 
entry to fstab and then mount the device (change from :absent to :mounted) or 
it only has to add an entry to fstab (change from :ghost to :mounted).

My patch now also supports :mounted, :umounted and :ghost when running `puppet 
resource mount`

If I understand you correctly Nigel you just want to retrieve `mounted` and 
`unmounted` mountpoints when running `puppet resource mount` (pre 2.6.7 
behaviour)?

If that's true I can modify my patch (in fact it makes the patch simpler) but I 
didn't know if it is desired behaviour to NOT show ghost mounts.
----------------------------------------
Bug #7300: "puppet resource mount" reports wrong mountstate
https://projects.puppetlabs.com/issues/7300

Author: Stefan Schulte
Status: Ready For Testing
Priority: Normal
Assignee: Stefan Schulte
Category: mount
Target version: 2.6.9
Affected Puppet version: 2.6.7
Keywords: 
Branch: https://github.com/stschulte/puppet/tree/ticket/2.7.x/7300


In 2.6.7 the instances method of the mountprovider is broken:
<pre>
% puppet resource mount /
mount { '/':
  ensure  => 'unmounted', # obviously wrong
  [...]
  target  => '/etc/fstab',
}
</pre>

Since puppet-2.6.7 the behaviour of the mounttype has changed (in order to fix 
#4914). The Mounttype doesn't run the mountcommand anymore when `retrieve` is 
called. Instead it relies on the prefetched value of the mountprovider.

But when running `puppet resource mount`, puppet uses the `instances` method 
(instead of prefetch). Because the `instances` method just parses `/etc/fstab` 
every mount is reported as `unmounted`.


-- 
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.

Reply via email to