Puppet: System Administration Automated

Support

Ticket #785 (closed defect: duplicate)

Opened 1 year ago

Last modified 1 year ago

Unmounting a file system with puppet causes errors if it's already unmounted

Reported by: benmoran Assigned to: michael
Priority: normal Milestone: misspiggy
Component: library Version:
Severity: normal Keywords: mount
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Unknown

Description (Last modified by michael)

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

Change History

09/05/07 18:47:31 changed by michael

  • description changed.

09/06/07 19:18:20 changed by michael

  • owner changed from luke to michael.
  • status changed from new to assigned.
  • stage changed from Unreviewed to Accepted.
  • milestone set to misspiggy.

09/14/07 20:12:35 changed by luke

  • status changed from assigned to closed.
  • resolution set to duplicate.

I expect this is a duplicate of #761; it seems like the mount resource type is no longer successfully checking whether it's mounted or not.

Closing as a duplicate.