Issue #18296 has been reported by Will Marler.
----------------------------------------
Bug #18296: Puppet only passes location to 'mount', not device and location, so
bind mounts do not work correctly after the inital run.
https://projects.puppetlabs.com/issues/18296
Author: Will Marler
Status: Unreviewed
Priority: Normal
Assignee:
Category: mount
Target version: 2.7.x
Affected Puppet version:
Keywords: bind, mount,
Branch:
Consider the following manifest:
$server = nas.test.com
$path = nas_export
$fstype = nfs #(In our real-world issue it's gluster, but any fstype works to
reproduce)
mount {'/mnt/test':
ensure => 'mounted',
device => "$server:$path",
fstype => $fstype,
options => 'defaults',
atboot => true,
require => File['/mnt/test'];
}
}
mount{ '/var/mnt':
ensure => 'mounted',
device => "/mnt/test",
fstype => 'none',
options => 'rw,bind',
atboot => 'true',
require => [Mount['/mnt/test'],File['/var/mnt']];
}
When run on a clean system, it correctly creates & executes the mounts and the
entries in /etc/fstab. This is good.
However, if one unmounts /mnt/test and /var/mnt, and re-runs puppet, the NFS
mount /mnt/test is not re-mounted. Only the bind mount /var/mnt to /mnt/test is
re-mounted. Puppet throws no errors.
This occurs because puppet calls the mount command in the above scenario as
"debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/mount -o defaults
/mnt/test'". mount interprets "/mnt/test" as the *device* to be mounted and
performs the bind mount (which works, so no error is thrown), rather than as
the *location* which should be attached to nas.test.com:nfs_export. This is
probably "mount" default behavior.
A solution would be for puppet to call the "mount -o <options> <device> <mount
point>" removing the ambiguity of "/mnt/test".
--
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.