The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #5012

File should autorequire Mounts

Added by Stefan Schulte over 5 years ago. Updated over 3 years ago.

Status:Code InsufficientStart date:10/15/2010
Priority:NormalDue date:
Assignee:Nigel Kersten% Done:


Target version:-
Affected Puppet version:2.6.1 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


I want to control mounpoints and files with Puppet. This is a common example:

file  {'/foo': ensure => directory}
mount {'/foo': ensure => mounted }
file  {'/foo/bar': ensure => file}

Unfortunately File[/foo/bar] just autorequires File[/foo] so it can happen that puppet creates /foo and /foo/bar and then mount /foo, so /foo/bar disappears and consumes diskspace. Because I cannot think of an use case where a directory or file does NOT depend on the parent mount, I propose to add an autorequire statement in the file-type.

0001-Fix-for-5012-File-should-autorequire-Mounts.patch Magnifier - Fix that adds the autorequire statement (1014 Bytes) Stefan Schulte, 10/15/2010 06:31 pm

Related issues

Related to Puppet - Feature #5015: mount should autorequire mountpoint Code Insufficient 10/15/2010
Related to Puppet - Bug #5200: Many-to-many implementation of stages needlessly inefficient Closed 11/03/2010
Related to Puppet - Bug #2417: mount type doesn't handle enforcing options correctly whe... Accepted 07/16/2009


#2 Updated by Markus Roberts over 5 years ago

  • Status changed from Unreviewed to Needs More Information

Two questions: 1) is this only intended to work if the mount is a direct parent of the file (that appears to be the case) and 2) is the behavior actually new, or is the first affected version some thing far earlier? If it’s not new, this is really a feature request (albeit a reasonable one).

#3 Updated by Stefan Schulte over 5 years ago

2) No this behaviour is not new I just misunderstood the term Affected version (because I thought like “still not fixed in 2.6.1” instead of “its a bug since Version X”) and I guess you’re right about the feature request. Is there a possibility to change a bug into a feature?

1) It just autorequires the parent directory (unless there is no parent directory) so it behaves exactly like the file autorequire (its basically a copy of the autorequire(:file) block). I guess that is sufficent because when you manage /x and /x/y/z you will most likely also manage /x/y and have the dependency chain /x/y/z requires /x/y requires /x.

#4 Updated by Stefan Schulte over 5 years ago

sent patch to puppet-dev.

I updated my repository:

#5 Updated by Matt Robinson over 5 years ago

  • Status changed from Needs More Information to In Topic Branch Pending Review
  • Keywords set to communitypatch

#6 Updated by Jesse Wolfe over 5 years ago

  • Status changed from In Topic Branch Pending Review to Needs Decision
  • Assignee set to Nigel Kersten

See discussion on puppet-dev

#7 Updated by Nigel Kersten over 5 years ago

  • Status changed from Needs Decision to Code Insufficient

We’re not rejecting these, just waiting till issues are resolved.

Also available in: Atom PDF