Issue #4689 has been updated by Jeff Johnson.

I just stumbled upon this bug running on Puppet 2.7.21.  As an alternative to 
fixing this in a future Puppet release, would it be possible to get the 
documentation for mount updated to indicate that the blockdevice parameter is 
required when the fstype is "nfs"?

----------------------------------------
Bug #4689: mount resource for nfs share gives error: 
https://projects.puppetlabs.com/issues/4689#change-92554

* Author: Merritt Krakowitzer
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: mount
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
I have an nfs mount on solaris 10 defined as: 

    file { '/mnt/FA_CR_CONT_UNPAID':
        ensure => directory,
    }
    mount { '/mnt/FA_CR_CONT_UNPAID':
        device => 'foo:/FA_CR_CONT_UNPAID',
        fstype => 'nfs',
       ensure => 'mounted',
        options => 'rw,bg,soft',
        atboot => true,
        require => File['/mnt/FA_CR_CONT_UNPAID']
    }

<pre>
info: Applying configuration version '1283415533'
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; 
using pson
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; 
using pson
debug: 
/Stage[main]/Ledwdspd1w01_fa_cr_cont_unpaid/File[/mnt/FA_CR_CONT_UNPAID]: 
Changing ensure
debug: 
/Stage[main]/Ledwdspd1w01_fa_cr_cont_unpaid/File[/mnt/FA_CR_CONT_UNPAID]: 1 
change(s)
notice: 
/Stage[main]/Ledwdspd1w01_fa_cr_cont_unpaid/File[/mnt/FA_CR_CONT_UNPAID]/ensure:
 created
debug: Time for triggering 1 events to edges: 0.000156879425048828
debug: 
/Stage[main]/Ledwdspd1w01_fa_cr_cont_unpaid/Mount[/mnt/FA_CR_CONT_UNPAID]: 
Changing ensure
debug: 
/Stage[main]/Ledwdspd1w01_fa_cr_cont_unpaid/Mount[/mnt/FA_CR_CONT_UNPAID]: 1 
change(s)
debug: Puppet::Type::Mount::ProviderParsed: Executing '/usr/sbin/mount'
debug: Puppet::Type::Mount::ProviderParsed: Executing '/usr/sbin/mount'
debug: Flushing mount provider target /etc/vfstab
info: Filebucket[/var/lib/puppet/clientbucket]: Adding 
/etc/vfstab(7c1e86d83602ca421173f3fd10db210c)
err: /Stage[main]/foo_fa_cr_cont_unpaid/Mount[/mnt/FA_CR_CONT_UNPAID]/ensure: 
change from absent to mounted failed: Could not set mounted on ensure: Field 
'blockdevice' is required at /etc/puppet/manifests/classes/nfsmounts.pp:12
debug: Flushing mount provider target /etc/vfstab
err: Got an uncaught exception of type ArgumentError: Field 'blockdevice' is 
required
debug: Storing state
debug: Stored state in 0.52 seconds
notice: Finished catalog run in 2.92 seconds
</pre>

This can be resolved by specifying the blockdevice as "-"

    file { '/mnt/FA_CR_CONT_UNPAID':
        ensure => directory,
    }
    mount { '/mnt/FA_CR_CONT_UNPAID':
        device => 'foo:/FA_CR_CONT_UNPAID',
        fstype => 'nfs',
        ensure => 'mounted',
        options => 'rw,bg,soft',
        atboot => true,
        require => File['/mnt/FA_CR_CONT_UNPAID'],
        blockdevice => '-'
    }

I would think the mount resource should already know that for nfs. The docs say:
blockdevice
The device to fsck. This is property is only valid on Solaris, and in most 
cases will default to the correct value.


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to