[Puppet-dev] [PATCH/puppet-dashboard 8/9] (#7007) Stream node CSV download

2011-05-20 Thread Nick Lewis
Before, when attempting to download the CSV export of nodes and their resource statuses, the download wouldn't start until after all of the data had been collected, and converted to CSV. By passing render a proc, and using output.write, we can send each CSV line to the client as it is generated.

[Puppet-dev] [PATCH/puppet-dashboard 6/9] (#7007) Add support for CSV to nodes index

2011-05-20 Thread Nick Lewis
The nodes controller now has the ability to respond to requests for CSV data, by serializing its collection of nodes to CSV, similarly to YAML requests. This is a necessary step to make CSV output actually available to users. Paired-With: Ben Hengst Paired-With: Daniel Pittman Paired-With: Jacob

[Puppet-dev] [PATCH/puppet-dashboard 1/9] maint: Make 'compliant node' factory's resource not failed

2011-05-20 Thread Nick Lewis
A compliant node is one without any failed resources. However, because the failed column on resource_statuses is nullable, it defaults to null. Since we weren't specifying it in this factory, the resource status wasn't being considered successful. Paired-With: Ben Hengst Signed-off-by: Nick Lewis

[Puppet-dev] [PATCH/puppet-dashboard 4/9] (#7007) Use a custom property list for ResourceStatus.to_csv

2011-05-20 Thread Nick Lewis
When exporting ResourceStatus as CSV, we don't want to include id, report_id, and tags, so we override the default to_csv_properties. We exclude id and report_id because they are completely internal fields to Dashboard. Tags are excluded because, as an array, they don't export well to CSV. Paired

[Puppet-dev] [PATCH/puppet-dashboard 3/9] (#7007) Add support for CSV output

2011-05-20 Thread Nick Lewis
This adds a CsvSerializable module which is mixed into Array, ActiveRecord::NamedScope::Scope, and adds functionality to ActiveRecord::Base implementing the to_csv method. On Array, and ActiveRecord::NamedScope::Scope this method will call "to_csv_header" on the class of the first element of the a

[Puppet-dev] [PATCH/puppet-dashboard 5/9] (#7007) Add custom CSV output for nodes with resources

2011-05-20 Thread Nick Lewis
Node.to_csv now uses a custom set of properties for CSV: name, status, resources_count, pending_count, succeessful_count, failed_count Each resource status for the node will be included along with the node properties, which will cause multiple CSV lines to be generated per node (one for each ass

[Puppet-dev] [PATCH/puppet-dashboard 9/9] maint: Remove debugging puts from node summary row partial

2011-05-20 Thread Nick Lewis
Paired-with: Jacob Helwig Signed-off-by: Nick Lewis --- Local-branch: ticket/next/7007 app/views/pages/_node_summary_row.haml |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/app/views/pages/_node_summary_row.haml b/app/views/pages/_node_summary_row.haml index bf3fb96..3

[Puppet-dev] [PATCH/puppet-dashboard 2/9] maint: Add resource status scopes for pending/failed

2011-05-20 Thread Nick Lewis
These are similar to the corresponding scopes on node, in that they accept predicates for failed=true/false and pending=true/false. We do this with a scope for failed instead of using a finder (find_all_by_failed) so we can chain it with other scopes for lazy evaluation. These scopes are necessary

[Puppet-dev] [PATCH/puppet-dashboard 7/9] (#7007) Add a link to the home page to download nodes in CSV

2011-05-20 Thread Nick Lewis
This is a simple link to NodesController#index, which doesn't attempt to scale to support a large number of nodes, or resource statuses. It will always export the entire node list. Paired-With: Jacob Helwig Signed-off-by: Nick Lewis --- Local-branch: ticket/next/7007 app/views/pages/home.html.h

[Puppet-dev] [PATCH/puppet 1/1] add puppet master polling step for ticket 7117

2011-05-20 Thread Dominic Maraglia
From: Dominic Maraglia The test for ticket 7117 producedes spurious failures due to timing: a curl command is executed from an agent to a freshly started Puppet Master; if the Puppet Master is not ready to accept the connection the test will fail. Added an until loop that issues simple curl com

[Puppet-dev] [PATCH/puppet 1/1] Fixed #7591 - Removed deprecated support for 'plugins' directories in modules

2011-05-20 Thread James Turnbull
In ticket #1064 we made the use of 'plugins' directories in modules deprecated. This was released in 0.25.0 in 2009. This commit removes this deprecation warning and defaults the plugin directory to 'lib'. All tests also fixed. Signed-off-by: James Turnbull --- Local-branch: tickets/master/7591

Re: [Puppet-dev] failed prerun/postrun commands have never actually caused runs to fail

2011-05-20 Thread Luke Kanies
On May 20, 2011, at 12:08 PM, Nigel Kersten wrote: > > > On Fri, May 20, 2011 at 9:33 AM, Luke Kanies wrote: > On May 20, 2011, at 8:36 AM, Nigel Kersten wrote: > >> So it turns out that we've never actually had failed pre/post commands cause >> runs to fail, even though the tests appear to b

[Puppet-dev] [PATCH/puppet] (#7507) Add exclude filter for ruby 1.9 spec failures

2011-05-20 Thread Josh Cooper
Exclude spec test for multiple writer processes as this fails intermittently on ruby 1.9. Reviewed-by: Jacob Helwig --- Local-branch: ticket/2.7.x/7507 spec/integration/util/file_locking_spec.rb |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/util/f

Re: [Puppet-dev] failed prerun/postrun commands have never actually caused runs to fail

2011-05-20 Thread Nigel Kersten
On Fri, May 20, 2011 at 9:33 AM, Luke Kanies wrote: > On May 20, 2011, at 8:36 AM, Nigel Kersten wrote: > > So it turns out that we've never actually had failed pre/post commands > cause runs to fail, even though the tests appear to be testing the right > thing. > > it "should fail if the c

[Puppet-dev] ANNOUNCE: Facter 1.5.9 Final!

2011-05-20 Thread Jacob Helwig
Facter 1.5.9 is a maintenance release containing fixes and updates. This release contains several fixes, and updated facts, as well as adding some new facts. These include enhancements with Facter & EC2, additional memory facts for OS X, and better Ruby 1.9 support. As always, please let us know

[Puppet-dev] [PATCH/facter 1/1] (#7507) Fix 1.9.2 test failure

2011-05-20 Thread Matt Robinson
Dir.glob returns an array, but a test was stubbing it to return a string. In Ruby 1.8.7 if you call enumerable methods (each, collect, etc) on a string, the string is split on \n first. This meant the poor stubbing didn't affect 1.8.7, but 1.9.2 is more strict and won't automatically convert when

[Puppet-dev] [PATCH/puppet 2/2] (#7502) Fixed parser spec for ruby 1.8.5

2011-05-20 Thread Josh Cooper
The first method is not available on Enumerable in ruby 1.8.5, so when it is mixed into ASTArray, you can't call first. Reviewed-By: Matt Robinson Signed-off-by: Josh Cooper --- Local-branch: ticket/2.7.x/7507 spec/integration/parser/parser_spec.rb |4 ++-- 1 files changed, 2 insertions(+),

[Puppet-dev] [PATCH/puppet 1/2] (#7507) Add more 1.9 filters

2011-05-20 Thread Josh Cooper
Additionally we fixed a scoping issue with the File type. Paired-With: Matt Robinson Signed-off-by: Josh Cooper --- Local-branch: ticket/2.7.x/7507 lib/puppet/type/file.rb |2 +- spec/unit/indirector/facts/couch_spec.rb |4 ++-- spec/unit/parser/resource_spec.rb

[Puppet-dev] State, provider & type

2011-05-20 Thread Florent Paillot
Hi all, I try to code a Puppet type that act like this : class1 { mytype { "a name": command => "command = YY" } } class2 { mytype { "a name": command => "command = XX", } } On the client, it generate a file : myfile.cfg - command = YY command = XX I want t

Re: [Puppet-dev] failed prerun/postrun commands have never actually caused runs to fail

2011-05-20 Thread Luke Kanies
On May 20, 2011, at 8:36 AM, Nigel Kersten wrote: > So it turns out that we've never actually had failed pre/post commands cause > runs to fail, even though the tests appear to be testing the right thing. > > it "should fail if the command fails" do > Puppet.settings[:prerun_comman

[Puppet-dev] failed prerun/postrun commands have never actually caused runs to fail

2011-05-20 Thread Nigel Kersten
So it turns out that we've never actually had failed pre/post commands cause runs to fail, even though the tests appear to be testing the right thing. it "should fail if the command fails" do Puppet.settings[:prerun_command] = "/my/command" Puppet::Util.expects(:execute).rais

[Puppet-dev] [PATCH/mcollective 1/1] 7574 - Single app framework needs better error reporting for config file errors

2011-05-20 Thread R.I.Pienaar
In the past any error in loading config or parsing application list would simply result in an empty applicaiton list being returned. In cases of a configuration error this masked the real cause and made debugging really hard. We now print the exception received instead and exit with a exit code o