is this a bug at puppet/lib/puppet/reports/store.rb file?

29 views
Skip to first unread message

Richard

unread,
Oct 28, 2014, 11:05:15 PM10/28/14
to puppet...@googlegroups.com
#this is a snippet of store.rb file, you can get it at https://github.com/puppetlabs/puppet/blob/master/lib/puppet/reports/store.rb
now = Time.now.gmtime
    name = %w{year month day hour min}.collect do |method|
      # Make sure we're at least two digits everywhere
      "%02d" % now.send(method).to_s
end.join("") + ".yaml"

     when my master run 'puppet kick -- host **' command twice quickly. this statement will get the same result. if the agent 
 run two command quickly, i will get the same 'name' to both command. 
for example the time of this two command are Wed Oct 29 10:17:28 +0800 2014 and Wed Oct 29 10:17:10 +0800 2014, 
the result always is 201410290217.yaml. but in my context,i want to know if my master get a report from agent, so when the report file name is same for both comand
i will think i don't get a report.the next command's report will replace the report before it using the same name, this will result losing some report
is this a bug ?

Felix Frank

unread,
Nov 5, 2014, 4:07:13 PM11/5/14
to puppet...@googlegroups.com
I guess it could be regarded a bug. At the very least, making this format optional would possibly be a sensible feature request.

I'm not certain about the future of the store handler for reports, though. Improvements on such facilities should likely be targeted at puppetserver only. It would make sense to first check that puppetserver retains this option at all.

In any case, you will be most likely be better of switching to PuppetDB as soon as possible.

Cheers,
Felix
--

Reply all
Reply to author
Forward
0 new messages