Bug #4689

mount resource for nfs share gives error:

Added by Merritt Krakowitzer almost 3 years ago. Updated 4 days ago.

Status:Merged - Pending ReleaseStart date:09/02/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:mount
Target version:3.3.0
Affected Puppet version: Branch:https://github.com/puppetlabs/puppet/pull/1699
Keywords:

Description

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']
}
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

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.

History

#1 Updated by James Turnbull almost 3 years ago

  • Status changed from Unreviewed to Accepted
  • Target version set to 2.7.x

#2 Updated by Ben Ford 6 months ago

Running on puppet 2.7.19 (puppet enterprise), this bug is still in effect. Bah.

#3 Updated by Andrew Parker 5 months ago

  • Target version deleted (2.7.x)

#4 Updated by Jeff Johnson 11 days ago

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”?

#5 Updated by Adrien Thebo 4 days ago

  • Status changed from Accepted to Merged - Pending Release
  • Target version set to 3.3.0
  • Branch set to https://github.com/puppetlabs/puppet/pull/1699

Issue fixed in PR/1699 and merged into master in 67e1ff6. This should be released in 3.3.0.

Also available in: Atom PDF