I tried to ensure a file system is unmounted like this:
define nfsmounts {
mount { "/home":
device => "nfs-server:/home",
ensure => unmounted,
fstype => nfs,
}
}
It works correctly, unmounting the file system without error if it is mounted. But on subsequent runs, after the mount has gone, it causes the following exception (whether I use ensure => absent or ensure => unmounted) :
# puppetd --onetime --verbose --test --debug --trace
...
notice: //basicnode/noninfra/nfsmounts[]/Mount[/home]/ensure: defined 'ensure' as 'present'
debug: Flushing mount provider target /etc/fstab
err: Got an uncaught exception of type ArgumentError: Field 'device' is required
/usr/lib/site_ruby/1.8/puppet/util/fileparsing.rb:95:in `join'
/usr/lib/site_ruby/1.8/puppet/util/fileparsing.rb:89:in `collect'
/usr/lib/site_ruby/1.8/puppet/util/fileparsing.rb:89:in `join'
/usr/lib/site_ruby/1.8/puppet/util/fileparsing.rb:338:in `to_line'
/usr/lib/site_ruby/1.8/puppet/util/fileparsing.rb:311:in `to_file'
/usr/lib/site_ruby/1.8/puppet/util/fileparsing.rb:311:in `collect'
/usr/lib/site_ruby/1.8/puppet/util/fileparsing.rb:311:in `to_file'
/usr/lib/site_ruby/1.8/puppet/provider/parsedfile.rb:295:in `to_file'
/usr/lib/site_ruby/1.8/puppet/provider/parsedfile.rb:86:in `flush_target'
/usr/lib/site_ruby/1.8/puppet/provider/parsedfile.rb:74:in `flush'
/usr/lib/site_ruby/1.8/puppet/provider/parsedfile.rb:72:in `each'
/usr/lib/site_ruby/1.8/puppet/provider/parsedfile.rb:72:in `flush'
/usr/lib/site_ruby/1.8/puppet/provider/parsedfile.rb:336:in `flush'
/usr/lib/site_ruby/1.8/puppet/metatype/evaluation.rb:40:in `flush'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:77:in `apply'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:231:in `eval_resource'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:230:in `thinmark'
/usr/lib/site_ruby/1.8/puppet/util.rb:443:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:342:in `realtime'
/usr/lib/site_ruby/1.8/puppet/util.rb:443:in `thinmark'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:232:in `eval_resource'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:301:in `evaluate'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:300:in `thinmark'
/usr/lib/site_ruby/1.8/puppet/util.rb:443:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:342:in `realtime'
/usr/lib/site_ruby/1.8/puppet/util.rb:443:in `thinmark'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:302:in `evaluate'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:294:in `collect'
/usr/lib/site_ruby/1.8/puppet/transaction.rb:294:in `evaluate'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:68:in `apply'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:319:in `run'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:318:in `benchmark'
/usr/lib/site_ruby/1.8/puppet/util.rb:211:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:342:in `realtime'
/usr/lib/site_ruby/1.8/puppet/util.rb:211:in `benchmark'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:318:in `run'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:300:in `synchronize'
/usr/lib/site_ruby/1.8/puppet/network/client/master.rb:300:in `run'
/usr/sbin/puppetd:426
debug: Storing state
debug: Stored state in 0.15 seconds
notice: Finished configuration run in 3.13 seconds
debug: Creating default schedules