Jira (PUP-10122) Only collect checksum metadata for links pointing to files

2020-05-22 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-10122  
 
 
  Only collect checksum metadata for links pointing to files   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Epic Link: 
 PUP-10533  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
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.333946.1573148555000.68816.1590176340051%40Atlassian.JIRA.


Jira (PUP-10122) Only collect checksum metadata for links pointing to files

2019-11-08 Thread Joshua Partlow (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Joshua Partlow commented on  PUP-10122  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Only collect checksum metadata for links pointing to files   
 

  
 
 
 
 

 
 I blame the comma?  
 

  
 
 
 
 

 
 
 

 
 
 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.333946.1573148555000.25117.1573244100083%40Atlassian.JIRA.


Jira (PUP-10122) Only collect checksum metadata for links pointing to files

2019-11-08 Thread Josh Cooper (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-10122  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Only collect checksum metadata for links pointing to files   
 

  
 
 
 
 

 
 It seems to hang on ruby MRI too... at least File.read:  
 
 
 
 
 require 'tempfile'  
 
 
    
 
 
 dir = '/tmp/dir'  
 
 
 link = '/tmp/link'  
 
 
    
 
 
 File.unlink(link) if File.exist?(link)  
 
 
 Dir.mkdir(dir) unless File.directory?(dir)  
 
 
 link = File.symlink(dir, link)  
 
 
    
 
 
 puts "Opening"  
 
 
 File.open(link, File::RDONLY) do |fh|  
 
 
   puts "Opened"  
 
 
   puts fh.read  
 
 
   puts "Done"  
 
  

Jira (PUP-10122) Only collect checksum metadata for links pointing to files

2019-11-07 Thread Josh Cooper (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-10122  
 
 
  Only collect checksum metadata for links pointing to files   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2019/11/07 9:42 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Josh Cooper  
 

  
 
 
 
 

 
 While researching PE-27428 we discovered that if a symlink refers to a directory, puppet will call Puppet::Util::Checksums.md5_file on the link, and silently rescue if it raises. See https://github.com/puppetlabs/puppet/blob/d579170b0583eed4e9050a8b798574c451f3c2ac/lib/puppet/file_serving/metadata.rb#L120. If the symlink refers to a directory, then Ruby is supposed to raise EISDIR, which it does in MRI ruby. However, there is a bug in JRuby 9.1.16 which causes File.open to get into an infinite loop.  Since puppet knows the file is a symlink, and reads the link to find what the link points to, then it should probably stat the destination/target to see whether it should checksum it. /cc Joshua Partlow, Maggie Dreyer  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment