Permalink
Commits on Oct 24, 2011
  1. Updated puppetral to return resources it creates

    Previously, the create_resource method returned a human readable
    string indicating success or failure of the create operation. The
    create_resource method now also returns the actual resource that was
    created, if any.
    committed Oct 24, 2011
Commits on Oct 22, 2011
  1. Removing broken backward compat code has exposed code paths that was

    never used and so never worked.
    
    Fix the variables used to store stdout etc
    ripienaar committed Oct 22, 2011
  2. 10230 - Support 1.2.0 and newer only in plugins

    Update versions of changed plugins to indicate a big change
    ripienaar committed Oct 22, 2011
  3. 10230 - Support 1.2.0 and newer only in plugins

    - fix whitespace problems after move to 2 tabs
    - remove old mc- scripts for agents that now have applications
    - restructure some agents to be same as the current standard layout
    ripienaar committed Oct 22, 2011
Commits on Oct 21, 2011
  1. Merge branch 'feature/master/9923-puppetd-support-for-puppet-as-daemon'

    * feature/master/9923-puppetd-support-for-puppet-as-daemon:
      Making cleaner status logic
      Increment puppetd agent version number
      Adding spec test for dead process
      Check the running PID, else start --onetime
      Handle cases for Puppet running vs idling
      (#9923) Support puppet agent as a daemon from puppetd
      Use 2-space indenting everywhere in the plugins.
      Fix bad input stub => failing test for puppetd agent.
    
    Conflicts:
    	agent/puppetral/agent/puppetral.rb
    Matt Robinson committed Oct 21, 2011
  2. Making cleaner status logic

    - The status logic is easier to verify than branching conditionals
    - Stubbed command calls to not get extra output
    hunner committed Oct 21, 2011
  3. Adding spec test for dead process

    hunner committed Oct 21, 2011
  4. Check the running PID, else start --onetime

    The pid file wasn't quite being read correctly, so that's fixed.
    
    The process wasn't being checked if it was alive, so that should be
    fixed too
    hunner committed Oct 21, 2011
Commits on Oct 17, 2011
  1. Merge pull request #15 from MaxMartin/master

    Package provider special-casing
    ripienaar committed Oct 17, 2011
  2. Retain provider when searching packages

    Recent changes to the agent caused all non-property parameters to be
    trimmed from resources when finding & searching; this is desirable in
    all cases except for when dealing with packages, where it is necessary
    to know the provider. This commit adds a method for parameter pruning
    (which was previously being duplicated between the find and search
    action) and also special-cases package providers to retain them.
    
    Reviewed-by: Joshua Lifton <lifton@puppetlabs.com>
    MaxMartin committed Oct 17, 2011
Commits on Oct 16, 2011
  1. Merge pull request #14 from MaxMartin/master

    Change how the status of #create is checked
    ripienaar committed Oct 16, 2011
Commits on Oct 15, 2011
  1. maint: Check that the created resource is in the proper form

    Previously, to check whether a resource creation succeeded, we only
    checked the :ensure value of the resource returned by the
    Puppet::Resource indirection#save; however, there are some cases where
    resource creation will fail, but this :ensure value will still not be
    :absent. Instead, we now check the status of the report returned by
    Puppet (only in Puppet 2.7.6 or greater) to see what the status of the
    catalog application was; this will also give us any error information we
    might want to return to the client.
    
    Also, the avoid_conflict key must be changed to a symbol when accessing
    the value from the resources found on the system because
    Puppet::Resource#to_pson_hash is indexed by symbol.
    
    Paired-with: Matt Robinson <matt@puppetlabs.com>
    MaxMartin committed Oct 14, 2011
Commits on Oct 12, 2011
  1. Handle cases for Puppet running vs idling

    If the lock file exists, it can be handled as two cases depending on the
    pid file's existance.
    
    Remember to reference `::Process.kill()` from top scope as to not
    conflict with `MCollective::Agent::Process`.
    hunner committed Oct 12, 2011
Commits on Oct 6, 2011
  1. (#9923) Support puppet agent as a daemon from puppetd

    The `puppetd` MCollective agent didn't play nicely with a daemonized Puppet
    agent; it would notice the lockfile and refuse to run.  Now, instead, it will
    send SIGUSR1 to the daemon.
    
    That will trigger an immediate run of Puppet, unless we are still in the
    middle of the first (and only) splay interval.  During that window the agent
    will just pick a new splay and wait that out; this is a limitation of the
    agent and there is nothing else we can do.
    
    Signed-off-by: Daniel Pittman <daniel@rimspace.net>
    daniel-pittman committed Oct 5, 2011
  2. Use 2-space indenting everywhere in the plugins.

    This brings the code into line with Puppet Labs coding standards.  There are
    no functional changes as part of this, just whitespace at the start of lines.
    
    Signed-off-by: Daniel Pittman <daniel@rimspace.net>
    daniel-pittman committed Oct 5, 2011
Commits on Oct 5, 2011
  1. Fix bad input stub => failing test for puppetd agent.

    In Ruby you can use an array deference on a Fixnum and get the bits at that
    position; when you use a non-integer key you get zero, which is valid.
    
    The test stubbed 0, a Fixnum, as a return value to stimulate an error return,
    but it actually worked.  Replacing that with a more invalid value lets us get
    the failure expected, and so exercise the right code path.
    
    Signed-off-by: Daniel Pittman <daniel@rimspace.net>
    daniel-pittman committed Oct 5, 2011
Commits on Oct 4, 2011
  1. Merge pull request #12 from MaxMartin/master

    Revise for changes to puppet core
    ripienaar committed Oct 4, 2011
  2. Update puppetral testing & resolve conflicting attributes

    This commit adds tests for lots of recently added functionality. In the
    process of adding these tests, I uncovered some bugs in our conflict
    resolution features (which allow potentially conflicting parameters to
    be removed before resource creation). These have been fixed, with tests
    to confirm the fixes.
    
    Reviewed-by: Matt Robinson <matt@puppetlabs.com>
    MaxMartin committed Oct 4, 2011
Commits on Oct 3, 2011
  1. Merge remote-tracking branch 'lifton/master'

    * lifton/master:
      Fixed how puppetral#create_resource handles the avoid_conflict argument.
      Added avoid_conflict option to create_resource method of puppetral agent.
    
    Conflicts (resolved manually):
    	agent/puppetral/agent/puppetral.rb
    MaxMartin committed Oct 3, 2011
  2. Added avoid_conflict option to create_resource method of puppetral ag…

    …ent.
    
    Reviewed by Max Martin <max@puppetlabs.com>.
    committed Oct 3, 2011
Commits on Sep 30, 2011
  1. Take advantage of puppet resource refactors

    Thanks to some refactors to the `puppet resource` application and the
    Puppet::Resource class, we can eliminate some code duplication and give
    better error messages. Instead of stripping extra parameters and absent
    values in the puppetral agent, we can now just call the prune_parameters
    method directly on the resource. Also, when resource creation fails, now
    instead of just replying with "resource was not created," we can used
    the returned report to give better error information. These changes rely
    on a specific version of Puppet, so they first test that the methods
    they're calling exist, and fall back to simpler functionality.
    
    Paired-with: Matt Robinson <matt@puppetlabs.com>
    MaxMartin committed Sep 30, 2011
  2. Merge pull request #11 from MaxMartin/master

    Match output of `puppet resource`
    ripienaar committed Sep 30, 2011
  3. Remove parameters & absent values from puppetral#find

    In order to match the behavior of `puppet resource` this commit removes
    all non-property parameters and 'absent' values from puppetral#find
    results. The only exception is when ensure is set to absent.
    
    Reviewed-by: Joshua Lifton <lifton@puppetlabs.com>
    MaxMartin committed Sep 30, 2011
Commits on Sep 27, 2011
  1. Handle timeouts and other failures better than simply getting an exce…

    …ption
    
    and bailing out
    ripienaar committed Sep 27, 2011
Commits on Sep 20, 2011
  1. Update for mcollective 1.2.x

    ripienaar committed Sep 20, 2011
Commits on Aug 31, 2011
  1. Merge pull request #9 from MaxMartin/master

    Resourcefile reading + general cleanup
    ripienaar committed Aug 31, 2011
Commits on Aug 29, 2011
  1. Merge branch 'master' of github.com:puppetlabs/mcollective-plugins

    * 'master' of github.com:puppetlabs/mcollective-plugins:
      maint: Updated puppetral DDL to match agent syntax
    MaxMartin committed Aug 29, 2011
Commits on Aug 25, 2011
  1. Merge pull request #6 from lifton/master

    maintenance: updated puppetral.ddl to more closely match puppetral.rb
    ripienaar committed Aug 25, 2011
  2. Merge branch 'ticket/master/8549'

    Joshua Harlan Lifton committed Aug 25, 2011
  3. maint: Updated puppetral DDL to match agent syntax

    Paired with Max Martin <max@puppetlabs.com>
    Joshua Harlan Lifton committed Aug 25, 2011