As requested my attempt for a mountpoint type/provider for the splitted
mount type. The type should be usable but the provider is probably not
and doesnt have any tests yet.
One thought about a mountpoint provider in general:
How to handle mount options? I we specify options as parameters then
we don't detect if a device is mounted with wrong options.
If we want to handle options as properties I can see two possible
solutions:
1) handle options as an array.
Drawback:
Retrieving options in a way that they match the specified options can
become quite hard because mounting with '-o default' will become 'rw' when
running mount afterwards. Or you can see options when running mount that
are probably not even valid with mount -o option. E.g. when running a
Solaris zone you'll see a mountoption "zone=my_zone" when running mount but
you will never (and probably can't) specify such an option when running
mount -o options /dev/foo /foo
Possible Solution:
options are always treated in sync if AT LEAST the user's options appear
in the output. This means if the user specified
mountpoint {'/mnt/foo':
ensure => mounted,
device => '/dev/foo'
options => ['rw','rsize=8192'],
}
options can be 'rw,rsize=8192' or 'rw,rsize=8192,xattr' etc and are always
treated in sync. But then we have to be carefull that 'rsize=8192' and
'rsize=1024' are not two independet options. And if mount reveals that /mnt/foo
is currently mounted 'ro' we should not try to mount 'rw,rsize=8192,ro' because
rw and ro are also not independent.
2) Handle options as different properties
Only support a subset of possible options, handled by their own properties. A
possible mount definition would now look like
mountpoint { '/foo':
ensure => mounted,
device => '/dev/foo',
readonly => no,
suid => yes,
acl => no,
atime => no,
}
Drawback:
The user is limited to the options that the type supports.
-Stefan
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.