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

Bug #6808

Provide informative message when ensure => present, *and* managing content/source, and target is a symlink

Added by Nigel Kersten about 3 years ago. Updated 5 months ago.

Status:ClosedStart date:03/21/2011
Priority:LowDue date:
Assignee:-% Done:

0%

Category:file
Target version:3.3.0
Affected Puppet version: Branch:https://github.com/puppetlabs/puppet/pull/1716
Keywords:links customer

We've Moved!

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

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

/tmp/foo -> /tmp/bar
file { "/tmp/foo":
  ensure  => present,
  content => "foo",
}

When you run this, you get no indication that the content will not be written. This is because the existence of the symlink suffices for “ensure => present”, and the content isn’t evaluated.

This is almost certainly another indicator that we should be breaking the symlink type out into it’s own type, separate from File, but in the meantime we should try to log something here if feasible.


Related issues

Related to Puppet - Feature #4938: Deprecate confusing symlink specification in 'ensure' for... Accepted 10/05/2010
Related to Puppet - Bug #22576: Puppet 3.3 changes behaviour for file { replace => false ... Needs More Information

History

#1 Updated by Nigel Kersten almost 3 years ago

  • Priority changed from Normal to Low

#2 Updated by Daniel Pittman over 2 years ago

  • Status changed from Accepted to Needs Decision
  • Assignee set to Nigel Kersten

Nigel, can you classify the severity of this:

A debug message, useful when someone investigates to figure it out?

A notice, which will show up normally, but be strange.

A warning on the client side, but carry on?

An error on the client side (or, correctly, during compilation) if both of those are specified?

I lean heavily to the last; in the huge matrix of things you can tell file to do, this one is invalid, and can be detected, so let us just fail the thing honestly and make the user fix it.

Finally, if we do that, where should we target this? 2.6, 2.7, trunk? It would break otherwise “working” manifests, in that they presently do something, just not something that the user probably expects…

#3 Updated by Nigel Kersten over 2 years ago

Is it feasible to do:

“A warning on the client side, but carry on?” –> 2.7.x

“An error on the client side (or, correctly, during compilation) if both of those are specified?” –> Telly

?

That feels like the right thing to do.

#4 Updated by Nigel Kersten over 2 years ago

  • Assignee changed from Nigel Kersten to Daniel Pittman

#5 Updated by Daniel Pittman over 2 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Daniel Pittman)

#6 Updated by Michael Stahnke about 2 years ago

  • Target version changed from 2.6.x to 2.7.x

2.6.x is closed. Moving to 2.7.x

#7 Updated by Andrew Parker over 1 year ago

  • Target version deleted (2.7.x)

#8 Updated by Andrew Parker over 1 year ago

As the 2.7.x line is winding down, I am removing the target at 2.7.x from tickets in the system. The 2.7 line should only receive fixes for major problems (crashes, for instance) or security problems.

#9 Updated by Charlie Sharpsteen about 1 year ago

  • Assignee set to Charlie Sharpsteen

#10 Updated by Charlie Sharpsteen about 1 year ago

  • Keywords set to customer

#12 Updated by Charlie Sharpsteen 10 months ago

  • Category set to file
  • Status changed from Accepted to In Topic Branch Pending Review
  • Keywords changed from customer to links customer
  • Branch set to https://github.com/puppetlabs/puppet/pull/1716

Pull request submitted to add a warning. Later this can be upgraded to an depreciation notice or error as necessary.

#13 Updated by Adrien Thebo 10 months ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version set to 3.3.0

Merged into master in a74d122; this should be released in 3.3.0.

#14 Updated by Charlie Sharpsteen 10 months ago

  • Assignee deleted (Charlie Sharpsteen)

#15 Updated by Andrew Parker 5 months ago

  • Status changed from Merged - Pending Release to Closed

Released in 3.3.0

#16 Updated by Andrew Parker 5 months ago

Released in 3.3.0

Also available in: Atom PDF