The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #5012

File should autorequire Mounts

Added by Stefan Schulte over 3 years ago. Updated over 1 year ago.

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

0%

Category:file
Target version:-
Affected Puppet version:2.6.1 Branch:
Keywords:communitypatch

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

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

History

#2 Updated by Markus Roberts over 3 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 3 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 3 years ago

sent patch to puppet-dev.

I updated my repository: https://github.com/stschulte/puppet/commits/feature%2Fmaster%2F5012

#5 Updated by Matt Robinson over 3 years ago

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

#6 Updated by Jesse Wolfe over 3 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 3 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