Issue #6738 has been updated by Ben Hughes.

Status changed from Investigating to Closed

The only problem I found was not having "options = 128", I changed that to 
"options = 'size=128m'" and it all works fine.

<pre>
[root@ubuntu:~]# cat mount.pp
$ramdisk_mount_point = '/ramdisk'
$ramdisk_size = '128m'

mount { $ramdisk_mount_point:
  ensure   => mounted,
  device   => "none",
  fstype   => 'tmpfs',
  options  => "size=${ramdisk_size}",
}
</pre>

Now run it, and then run it again:
<pre>
[root@ubuntu:~]# puppet apply -vd mount.pp                  
[snip...]
debug: Loaded state in 0.00 seconds
debug: Prefetching parsed resources for mount
debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/mount'
info: Applying configuration version '1303371804'
notice: /Stage[main]//Mount[/ramdisk]/ensure: ensure changed 'unmounted' to 
'mounted'
debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/mount -o size=128m 
/ramdisk'
info: /Stage[main]//Mount[/ramdisk]: Scheduling refresh of Mount[/ramdisk]
info: Mount[/ramdisk](provider=parsed): Remounting
debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/mount -o remount 
/ramdisk'
notice: /Stage[main]//Mount[/ramdisk]: Triggered 'refresh' from 1 events
info: /Stage[main]//Mount[/ramdisk]: Scheduling refresh of Mount[/ramdisk]
debug: Finishing transaction -611648028
debug: Storing state
debug: Stored state in 0.02 seconds
notice: Finished catalog run in 0.18 seconds
[root@ubuntu:~]# puppet apply -v mount.pp  
info: Applying configuration version '1303371886'
notice: Finished catalog run in 0.06 seconds
</pre>

As you can't work on it any more, and I can't seem to reproduce it here. I'll 
close this ticket. But if you have anything more to add, then please do and 
I'll keep digging.

Thanks.
----------------------------------------
Bug #6738: Mount resource in puppet duplicates ramdrive mounts for each puppet 
run
https://projects.puppetlabs.com/issues/6738

Author: Mark LeBlanc
Status: Closed
Priority: Normal
Assignee: Ben Hughes
Category: 
Target version: 
Affected Puppet version: 2.6.4
Keywords: ramdisk mount resource multiple mounts
Branch: 


If ensure => mounted is used the ramdisk is mounted multiple times (once every 
puppet run), even though only one entry is in fstab.

**puppet code:
* $ramdisk_mount_point = "/ramdisk"
 $ramdisk_size = 128
 mount { "$ramdisk_mount_point":
      ensure   => mounted,
      device   => "none",
      fstype   => "tmpfs",
      options  => "${ramdisk_size}",
  }
*

**fstab entry that was created:
none /ramdisk tmpfs size=128m 0 0




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

Reply via email to