[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08

Peter Meier peter.meier at immerda.ch
Fri Jan 15 09:07:25 UTC 2010


The following commit has been merged in the upstream branch:
commit 57632a0497183b2ec205b83eea939c3159e44925
Author: Peter Meier <peter.meier at immerda.ch>
Date:   Tue Nov 24 21:22:11 2009 +0100

    fix #2854 - parse timestamps
    
    Since 0.25.0 node's timestamps have to be parsed before processing.

diff --git a/ext/puppetlast b/ext/puppetlast
index e52529d..e949676 100755
--- a/ext/puppetlast
+++ b/ext/puppetlast
@@ -4,6 +4,7 @@
 # AJ "Fujin" Christensen <aj at junglist.gen.nz>
 #
 require 'puppet'
+require 'time'
 
 Puppet[:config] = "/etc/puppet/puppet.conf"
 Puppet.parse_config
@@ -11,5 +12,5 @@ Puppet[:name] = "puppetmasterd"
 Puppet::Node::Facts.terminus_class = :yaml
 
 Puppet::Node::Facts.search("*").sort { |a,b| a.name <=> b.name }.each do |node|
-  puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}checked in #{((Time.now - node.values[:_timestamp]) / 60).floor} minutes ago"
+  puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}checked in #{((Time.now - Time.parse(node.values[:_timestamp])) / 60).floor} minutes ago"
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list