Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Nov 1, 2011
  1. Fix another order dependent failure

    Matt Robinson authored
    The service agent was also redeclaring Puppet::Type, so the package and
    puppetral agents' specs failed when run after.
  2. @ripienaar
  3. Fix order dependent test failures

    Matt Robinson authored
    running the package spec before the puppetral spec got the following
    problem:
    
        Failure/Error: @agent = MCollective::Test::LocalAgentTest.new("puppetral", :agent_file => agent_file).plugin
        RuntimeError:
          Plugin connector_plugin already loaded
        # /home/vagrant/work/marionette-collective/lib/mcollective/pluginmanager.rb:37:in `<<'
        # /home/vagrant/work/mcollective-test/lib/mcollective/test/util.rb:60:in `create_connector_mock'
        # /home/vagrant/work/mcollective-test/lib/mcollective/test/local_agent_test.rb:15:in `initialize'
        # ./agent/puppetral/spec/puppetral_spec.rb:7:in `new'
        # ./agent/puppetral/spec/puppetral_spec.rb:7
    
    For some reason the PluginManager isn't clearing properly in the package specs
    with the spec_helper.  After manually clearing the PluginManager there was
    still the issue of the package test reopening the Puppet::Type, which then also
    caused problems for puppetral.
    
    Now all the specs pass with the rake task.
  4. Fix broken specs

    Matt Robinson authored
    Recent grammar and style updates to error messages weren't accompanied
    by corresponding test changes.
    
    This commit also includes a bit of refactoring of poorly indented and
    hard to read test data in the puppetral agent spec.
  5. Convert specs to use rspec in the shebang

    Matt Robinson authored
    The rake task to run all the specs was having issues with the fact that
    requiring the spec_helper with different paths does multiple requires
    and leads to issues with declaring the mock framework:
    
        >RUBYLIB=~/work/marionette-collective/lib:$RUBYLIB rake test
        (in /home/vagrant/work/mcollective-plugins)
        /usr/bin/ruby1.8 -S rspec --format s --colour --backtrace agent/package/spec/package_application_spec.rb agent/package/spec/package_agent_spec.rb agent/puppetral/spec/puppetral_spec.rb agent/puppetd/spec/puppetd_application_spec.rb agent/puppetd/spec/puppetd_agent_spec.rb agent/puppetca/spec/puppetca_agent_spec.rb agent/nrpe/spec/nrpe_agent_spec.rb agent/service/spec/service_application_spec.rb agent/service/spec/service_agent_spec.rb
        /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:470:in `assert_no_example_groups_defined': RSpec's mock_framework configuration option must be configured before any example groups are defined, but you have already defined a group. (RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError)
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:168:in `mock_framework='
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:142:in `mock_with'
                from /home/vagrant/work/mcollective-plugins/agent/puppetral/spec/../../../spec/spec_helper.rb:12
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core.rb:71:in `configure'
                from /home/vagrant/work/mcollective-plugins/agent/puppetral/spec/../../../spec/spec_helper.rb:11
                from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
                from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
                from /home/vagrant/work/mcollective-plugins/agent/puppetral/spec/puppetral_spec.rb:3
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load'
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load_spec_files'
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `map'
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load_spec_files'
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb:18:in `run'
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:80:in `run_in_process'
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:69:in `run'
                from /usr/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:10:in `autorun'
                from /usr/bin/rspec:19
        rake aborted!
    
    One option is to wrap all the requires of spec_helper in expand path, but I
    prefer the more succinct syntax available when rspec is in the shebang.
Commits on Oct 31, 2011
  1. @lifton

    Merge pull request #21 from MaxMartin/master

    lifton authored
    puppetral#create resource info
  2. @MaxMartin

    Change puppetral#create to return more resource info

    MaxMartin authored
    Instead of returning the result of the Puppet::Resource.indirection.save
    under the :resource key, we now instead do a find. This has the effect
    of returning more information about the created resource, since the
    return value of indirection.save only contains info about the parameters
    that changed, and not about all properties of the resource.
    
    Reviewed-by: Joshua Lifton <lifton@puppetlabs.com>
Commits on Oct 30, 2011
  1. @ripienaar

    Merge pull request #20 from nfagerlund/maint/docs_edits_for_pe

    ripienaar authored
    Maint/docs edits for pe
  2. Change package and service agents to Apache 2 license

    Nick Fagerlund authored
    This commit changes the service and package agents (and DDL files) to the Apache
    2.0 license, in order to match the current licensing of Puppet.
Commits on Oct 29, 2011
  1. Docs: Edits to comments and user-facing text in PE-included plugins

    nfagerlund authored
    This commit edits the comments and user-facing prompts in the puppetral,
    puppetd, service, package, sshkey, meta, and actionpolicy plugins, in
    preparation for PE 2.0.
Commits on Oct 28, 2011
  1. Docs: Replace all remaining code.google.com URLs

    nfagerlund authored
    This commit replaces old repo links with current GitHub links, and old wiki
    links with current Redmine wiki links.
  2. @lifton

    Merge pull request #19 from MaxMartin/master

    lifton authored
    Fixes
  3. @MaxMartin

    Fix some errors

    MaxMartin authored
    Some erroneous code ended up in the agent due to a merge mixup, and also
    we weren't pruning the parameters from resource hashes returned by the
    create method. This commit resolves these issues and updates the specs.
    
    Reviewed-by: Joshua Lifton <lifton@puppetlabs.com>
Commits on Oct 27, 2011
  1. @ripienaar

    Merge pull request #18 from glarizza/bug/master/service_osx_fix

    ripienaar authored
    Correct validation for OS X Services
  2. Correct validation for OS X Services

    System Administrator authored
    OS X service names use a format of 'com.openssh.sshd' and can get
    quite long.  This commit adds periods (.) into the validation check
    and sets the length to be 90 characters.
Commits on Oct 25, 2011
  1. @MaxMartin

    Merge pull request #17 from lifton/master

    MaxMartin authored
    Updated puppetral's create_resource method to return the created resource, if any.
Commits on Oct 24, 2011
  1. @lifton

    Updated puppetral to return resources it creates

    lifton authored
    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.
Commits on Oct 22, 2011
  1. @ripienaar

    Removing broken backward compat code has exposed code paths that was

    ripienaar authored
    never used and so never worked.
    
    Fix the variables used to store stdout etc
  2. @ripienaar

    10230 - Support 1.2.0 and newer only in plugins

    ripienaar authored
    Update versions of changed plugins to indicate a big change
  3. @ripienaar

    10230 - Support 1.2.0 and newer only in plugins

    ripienaar authored
    - 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
Commits on Oct 21, 2011
  1. Merge branch 'feature/master/9923-puppetd-support-for-puppet-as-daemon'

    Matt Robinson authored
    * 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
  2. @hunner

    Making cleaner status logic

    hunner authored
    - The status logic is easier to verify than branching conditionals
    - Stubbed command calls to not get extra output
  3. @hunner
  4. @hunner
  5. @hunner

    Check the running PID, else start --onetime

    hunner authored
    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
Commits on Oct 17, 2011
  1. @ripienaar

    Merge pull request #15 from MaxMartin/master

    ripienaar authored
    Package provider special-casing
  2. @MaxMartin

    Retain provider when searching packages

    MaxMartin authored
    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>
Commits on Oct 16, 2011
  1. @ripienaar

    Merge pull request #14 from MaxMartin/master

    ripienaar authored
    Change how the status of #create is checked
Commits on Oct 15, 2011
  1. @MaxMartin

    maint: Check that the created resource is in the proper form

    MaxMartin authored
    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>
Commits on Oct 12, 2011
  1. @hunner

    Handle cases for Puppet running vs idling

    hunner authored
    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`.
Commits on Oct 6, 2011
  1. @daniel-pittman

    (#9923) Support puppet agent as a daemon from puppetd

    daniel-pittman authored
    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>
  2. @daniel-pittman

    Use 2-space indenting everywhere in the plugins.

    daniel-pittman authored
    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>
Commits on Oct 5, 2011
  1. @daniel-pittman

    Fix bad input stub => failing test for puppetd agent.

    daniel-pittman authored
    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>
Commits on Oct 4, 2011
  1. @ripienaar

    Merge pull request #12 from MaxMartin/master

    ripienaar authored
    Revise for changes to puppet core
  2. @MaxMartin

    Update puppetral testing & resolve conflicting attributes

    MaxMartin authored
    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>
Something went wrong with that request. Please try again.