Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2021-06-14 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-9075  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
 Based on the comments above, I'm to close this as won't fix.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.272161.1534820125000.56113.1623701340023%40Atlassian.JIRA.


Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2019-10-01 Thread Josh Cooper (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-9075  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
 The original behavior comes from https://projects.puppetlabs.com/issues/1750: 
 
If I have a File with ensure=>link and replace=>false, and it already exists as a directory, puppet correctly does not change the directory, but also logs an error about not being able to remove the existing directory.
 The behavior of ensure => absent in combination with replace => false is unspecified in documentation. However, to Eric Sorenson's point, someone is probably relying on the current behavior of never deleting (in addition to modifying) an existing file/link/directory when replace is false.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.272161.1534820125000.124209.1569970680274%40Atlassian.JIRA.


Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2018-09-20 Thread Vincent Lours (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Vincent Lours assigned an issue to Eric Sorenson  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-9075  
 
 
  File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
Change By: 
 Vincent Lours  
 
 
Assignee: 
 Eric Sorenson  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2018-09-16 Thread Vincent Lours (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Vincent Lours commented on  PUP-9075  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
 Hi Eric Sorenson, Thanks for your answer, and I can understand why you don't want to change it. However I cannot imagine what should be the "normal" behaviour expected by people who set a file 'absent', other than to get it removed. I'm pretty sure that nobody already noticed that the file was not removed after changing the ensure status of this kind of "file" in the hiera config. From my point of view the true behaviour should be to remove it, no matter what. Furthermore, I cannot imagine to remove the "replace" from my manifest, as the file ensure can be different depending of the server type.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2018-09-16 Thread Vincent Lours (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Vincent Lours assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-9075  
 
 
  File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
Change By: 
 Vincent Lours  
 
 
Assignee: 
 Vincent Lours  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2018-09-10 Thread Eric Sorenson (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Eric Sorenson assigned an issue to Vincent Lours  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-9075  
 
 
  File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
Change By: 
 Eric Sorenson  
 
 
Assignee: 
 Vincent Lours  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2018-09-10 Thread Eric Sorenson (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Eric Sorenson commented on  PUP-9075  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
 I think this is happening because of this check in lib/puppet/type/file/ensure.rb  
 
 
 
 
 # We have to treat :present specially, because it works with any  
 
 
 # type of file.  
 
 
 def insync?(currentvalue)  
 
 
   unless currentvalue == :absent or resource.replace?  
 
 
 return true  
 
 
   end  
 
 
    
 
 
   if self.should == :present  
 
 
 return !(currentvalue.nil? or currentvalue == :absent)  
 
 
   else  
 
 
 return super(currentvalue)  
 
 
   end  
 
 
 end
  
 
 
 

Jira (PUP-9075) File type "replace => false" doesn't allow to remove the file if "ensure => absent"

2018-08-20 Thread Vincent Lours (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Vincent Lours created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-9075  
 
 
  File type "replace => false" doesn't allow to remove the file if "ensure => absent"   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Affects Versions: 
 PUP 5.5.3  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 Catalog Application  
 
 
Created: 
 2018/08/20 7:55 PM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Vincent Lours  
 
 
Original Estimate: 
4 hours 
 
 
Remaining Estimate:  
4 hours 
 

  
 
 
 
 

 
 Puppet Version: 5.5.4 Puppet Server Version: PE-2018.1.3.1 OS Name/Version: Centos 7.5 You can manage files in puppet with the option "replace => false". Which allow you to not change the content. However, if you decide to remove this file later, by only changing the ensure value, the file will not be removed. How to reproduce: From a Centos docker image, I've created a simple manifest  
 
to create a file with "replace => false" 
apply the manifest 
change the content to check that the replace is working 
apply the manifest, with no change 
Set the file to be 'absent' 
apply the