Bug #4689
mount resource for nfs share gives error:
| Status: | Accepted | Start date: | 09/02/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | mount | |||
| Target version: | 2.7.x | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ||||
| Votes: | 0 |
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
Updated by James Turnbull over 1 year ago
- Status changed from Unreviewed to Accepted
- Target version set to 2.7.x