Jira (PUP-3656) Prefetch eats all exceptions, there is no way to fail out.

2014-11-24 Thread Matt Carroll (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Matt Carroll commented on  PUP-3656 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Prefetch eats all exceptions, there is no way to fail out.  
 
 
 
 
 
 
 
 
 
 
Just a suggestion here, I think that to create an exception type which will be raised instead of logged on this level if it's rescued would solve this problem - that way provider authors can raise this exception type in the specific case that a failure means that a run should stop. This approach has the benefit that it introduces the required functionality without breaking any old behaviour, and puts the logic for what exceptions should be re-raised as fatal on the provider level. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-3656) Prefetch eats all exceptions, there is no way to fail out.

2014-11-11 Thread Matt Carroll (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Matt Carroll created an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Puppet /  PUP-3656 
 
 
 
  Prefetch eats all exceptions, there is no way to fail out.  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 3.7.3, PUP 2.7.23 
 
 
 

Assignee:
 
 Kylo Ginsberg 
 
 
 

Components:
 

 Types and Providers 
 
 
 

Created:
 

 2014/11/11 8:38 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Matt Carroll 
 
 
 
 
 
 
 
 
 
 
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/transaction.rb#L306-L310 
This bug still exists in the master branch as of today and was introduced in 2.7.8 with this commit: 
https://github.com/puppetlabs/puppet/commit/000a2d811c740f4179a0cd4ced38e886858cf01f 
The rescue condition means that any exception raised by providers during prefetch gets logged but then swallowed by Puppet. As a result of this, any provider which relies only on prefetch to find all instances will end up running the resource creation regardless of whether the resource exists or not. 
In order to negate this behaviour, provider authors would need to create checks for instance existence which run during the creation phase as well, which defeats the point of having prefetch in the first place.