Permalink
Switch branches/tags
Commits on Jun 28, 2013
  1. Merge pull request #1685 from adrienthebo/maint-constant_lookup

    adrienthebo committed Jun 28, 2013
    (maint) Don't try to invoke a constant as a method
  2. (#20607) Fix mode test on windows

    joshcooper committed Jun 28, 2013
    File.stat on MRI ruby on windows can only distinguish between readable and
    readonly files (0644 vs 0444), causing the test to fail, since it's
    expecting 0664.
    
    This commit updates the test to use Puppet's Security.get_mode method on
    Windows, which preserves the file mode fidelity.
    
    It also removes the expect { .. }.to_not raise_error, since we can just
    execute the statement. Also made sure we actually fail due to an invalid
    file mode, and not some other error.
  3. Merge pull request #1736 from thallgren/master

    hlindberg committed Jun 28, 2013
    Fix faulty test for Puppet::Pops::Parser::Parser
  4. Fix faulty test for Puppet::Pops::Parser::Parser

    thallgren committed Jun 28, 2013
    The reference to Model was unqualified which caused an "uninitalized
    constant Model" failure when running rspec explicitly on the
    spec/unit/pops/parser package. This commit adds the needed
    qualification.
Commits on Jun 27, 2013
  1. Merge pull request #1734 from zaphod42/deprecate-yaml

    pcarlisle committed Jun 27, 2013
    (#21427) Deprecate YAML and stop sending it from the agent
  2. (#21427) Do not send arrays as YAML in query params

    zaphod42 committed Jun 27, 2013
    Previously, when the REST requests were constructed and one of the
    parameters was an Array, the Array was encoded as YAML and then
    identified on the master and parsed as YAML. This was used specifically
    to send the list of "ignores" when making file metadata requests.
    
    This changes the system to now use multi-valued query parameters instead
    of YAML. Both the agent and master have been updated to support this,
    however existing masters will not be able to understand the new requests
    correctly since they will either:
    
      * in webrick only choose the first value as the value of the parameter
      * in rack fail because the decode_params method does not understand
        arrays as values
  3. (Maint) Test that the query string is parsable

    zaphod42 committed Jun 27, 2013
    Rather than relying on all sorts of string checks, it is better to check
    that a parameter parsing library is able to parse the generated string
    back into the expected data. This changes the tests to use CGI::parse to
    parse the query_string and then can check that the resulting hash has
    the data that is expected.
  4. (Maint) Remove stubbing from query_string tests

    zaphod42 committed Jun 27, 2013
    The tests for the Puppet::Indirector::Request#query_string method were
    relying on stubbing methods on the class under test. There is no need
    for that since the required data is trivially passed in via the
    constructor. This replaces the stubbing with simply constructing the
    correct object to test.
  5. Merge pull request #1727 from jpartlow/maint/added-missing-spec-helper

    adrienthebo committed Jun 27, 2013
    (maint) Includes missing spec_helper in three specs.
  6. Merge pull request #1722 from masterzen/tickets/master/20607

    adrienthebo committed Jun 27, 2013
    (#20607) - do not fail saving lastrunfile when mode is specified
  7. (#21427) Submit reports in PSON format

    zaphod42 committed Jun 27, 2013
    This changes the agent to submit reports in PSON. An effect of this
    change is that reports will not be able to submit to masters that do not
    have the changes for CVE-2013-3567 which allow the master to parse
    PSON formatted reports.
Commits on Jun 26, 2013
  1. (#21427) Deprecate YAML over the network

    zaphod42 committed Jun 26, 2013
    Issue a deprecation warning whenever YAML is encoded or decoded in the
    http handler.
  2. (#21427) Remove duplicate handling of accept headers

    zaphod42 committed Jun 26, 2013
    When the save and destroy actions started respecting the accept header
    we duplicated how accept headers were handled for selecting the response
    format. This removes that duplication and in putting specific tests in
    place, cleans up the tests to work mainly through the public interfaces
    as well as putting in place an HTTP error handling mechanism that allows
    the request handlers to more specifically control the HTTP responses.
    Invalid Accept headers will now cause a 406 response instead of the
    previous 400.
    
    Since all of this is tested with the memory terminus, it needed to be
    expanded to also handle search and head actions.
  3. (#21427) Respect Accept header for destroy

    zaphod42 committed Jun 26, 2013
    The REST destroy action will now respect the formats that are requested in
    the Accept header. In order to retain backwards compatibility for
    clients that have never been required to specify an Accept before this
    it will also default to :yaml when no Accept is provided. If an Accept
    is provided but none of the wanted formats are suitable an error is
    raised, just like find and search.
Commits on Jun 25, 2013
  1. (#21427) Respect Accept header for save

    zaphod42 committed Jun 25, 2013
    The REST save action will now respect the formats that are requested in
    the Accept header. In order to retain backwards compatibility for
    clients that have never been required to specify an Accept before this
    it will also default to :yaml when no Accept is provided. If an Accept
    is provided but none of the wanted formats are suitable an error is
    raised, just like find and search.
    
    In order to report the status of an unkown Accept header correctly this
    also adds the capability of raising web related exceptions that contain
    the HTTP response code that needs to be used.
  2. (maint) Includes missing spec_helper in three specs.

    jpartlow committed Jun 25, 2013
    spec/spec_helper was missing from three of the specs. This showed up
    because spec/unit/pops/containment_spec.rb just happened to come first
    in the order of specs to be executed on our Solaris build, and began
    causing failures because puppet/pops was being loaded prior to
    spec_helper and puppet.  It was also causing rspec/mocha setup and
    teardown failures, presumably because of rspec configuration being
    called after this initial spec was loaded.
    
    This commit ensures that each of these specs requires spec_helper first
    so that spec and the puppet environment initialize properly regardless
    of whether these specs run first or come later in the spec ordering.
  3. (Maint) Cleanup do_save specs

    zaphod42 committed Jun 25, 2013
    This replaces the excessive mocking in the do_save specs with using
    actual implementations and removes mocking on the class under test. By
    doing so there are many fewer tests required and the remaining tests are
    more directly related to externally observable behavior. This has only
    been done for the do_save method.
  4. (#20607) support symbolic file mode in Puppet::Util#replace_file

    masterzen committed Jun 23, 2013
    In order to fix #20607 (where incorrect 'settings specified' file
    permissions were crashing P::U#replace_file), this patch enhance
    P::U#replace_file default_mode behavior.
    
    Now P::U#replace_file supports symbolic file mode, along with
    octal numerical string, and pure octal integers. It also now fails
    if the given mode is incorrect.
    
    Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
  5. (#21427) Improve deprecation warning for yaml params

    zaphod42 committed Jun 25, 2013
    Previously we were not informed what parameter and value was being
    transmitted as YAML, which made debugging and correcting the problem
    nearly impossible. This outputs the offending request parameter and
    value as a debug message to aid in fixing the issue.
  6. Merge branch 'stable'

    pcarlisle committed Jun 25, 2013
    * stable:
      (#21043) Use ruby.exe instead of rubyw.exe
      (#21264) Update rgen dependency to 0.6.5
      (Maint) Cleanup specs
      (#21320) Use sleep in the daemon loop instead of select
  7. Merge pull request #1724 from zaphod42/issue/stable/21264-implicit-ar…

    pcarlisle committed Jun 25, 2013
    …ray-conversions-break-because-of-rgen
    
    (#21264) Update rgen dependency to 0.6.5
  8. (#21427) Send facts to master as pson

    zaphod42 committed Jun 25, 2013
    This changes the format of facts being sent to the master from
    b64_zlib_yaml (base 64 encoded compressed yaml) to pson, in preparation
    for deprecating all YAML sent over the network. This should be backwards
    compatible as facts are tagged with the format and the master already
    supports pson.
Commits on Jun 24, 2013
  1. Merge pull request #1725 from joshcooper/ticket/stable/21043-runinter…

    jpartlow committed Jun 24, 2013
    …val-broken
    
    (#21043) Use ruby.exe instead of rubyw.exe
  2. (#21043) Use ruby.exe instead of rubyw.exe

    joshcooper committed Jun 24, 2013
    Previously, if you set a custom runinterval setting in puppet.conf, puppet
    running on ruby 1.9 would ignore it, whereas it would work in ruby 1.8.
    
    The root cause is due to http://bugs.ruby-lang.org/issues/7239. In ruby 1.9,
    rubyw.exe is unable to read the stdout of any child process using ruby's
    built-in process methods, e.g. %x. This affects us, because the windows
    service, running as rubyw.exe, executes:
    
        `%x{ puppet agent --configprint runinterval}`
    
    to obtain the current runinterval setting.
    
    The bug is fixed in ruby 2.0, so for now, we just switch to using
    `ruby.exe` instead of `rubyw.exe`.
  3. Deprecate sending YAML over the network

    pcarlisle committed Jun 13, 2013
    I'm not sure if this covers all the corners. I didn't want to do it in the
    Format itself because that can be used in other places.
  4. (#21264) Update rgen dependency to 0.6.5

    zaphod42 committed Jun 24, 2013
    There is an error in rgen < 0.6.5 that causes it to incorrectly handle
    Array#to_str via its monkey patching of Array#method_missing. This adds
    a check for this incorrect behavior and updated our Gemfile dependency
    on rgen. The package dependencies are already specified in a manner that
    will pick up 0.6.5 once it is packaged.
  5. (Maint) Cleanup specs

    zaphod42 committed Jun 24, 2013
    This cleans up the specs to make them a little more expressive of the
    behavior of the fqdn_rand function's real functionality. One surprising
    result that came out of this was that the tests tried to assert that the
    fqdn_rand function was callable without any arguments. However the test
    for this passed simply because it asserted that a particular error was
    *not* raised, when in fact a different exception that expressed what it
    was trying to catch (ArgumentError vs. Puppet::ParserError). The docs
    indicate that calling with no arguments is not actually supported and so
    that test has been removed.
  6. (#21320) Use sleep in the daemon loop instead of select

    pcarlisle committed Jun 24, 2013
    This fixes a bug on Ruby < 2.0 where the daemon might sleep for a very long
    period after being interrupted with a signal. The implementation of select on
    these ruby versions has an improper cast which resulted in a corrupted value
    given to select on 64 bit systems. It is patched in Ruby 2.0 in
    ruby/ruby@b10c313 .
    
    Sleep does not attempt to restart after being interrupted and does not have this bug.
Commits on Jun 21, 2013
  1. Merge pull request #1720 from joshcooper/maint/master/testing-against…

    zaphod42 committed Jun 21, 2013
    …-packages
    
    (Maint) Run tests from installed packages
  2. (Maint) Run tests from installed packages

    zaphod42 authored and joshcooper committed Jun 14, 2013
    This creates the basic structure for running tests from packages. It
    includes a Rakefile for fetching the appropriate artifacts and executing
    systest, the setup steps for installing the repos and packages, and a
    basic test that makes sure that puppet is installed.
    
      bundle install
      bundle exec rake test SHA=COMMITISH
    
    where COMMITISH corresponds to the SHA of a package built via the
    puppetlabs-packaging job.
  3. Merge branch 'stable'

    zaphod42 committed Jun 21, 2013
    * stable:
      (#21376) Sequence BlockExpressions without nesting
  4. Merge pull request #1717 from pcarlisle/ticket/21376-stack-overflow

    zaphod42 committed Jun 21, 2013
    (#21376) Sequence BlockExpressions without nesting
  5. (#21376) Sequence BlockExpressions without nesting

    pcarlisle committed Jun 21, 2013
    When merging Puppet::Resource::Type instances the code attribute was merged in
    a way that caused a deep tree of BlockExpressions. This could cause stack
    overflows when evaluating this tree, since evaluation is recursive. This
    changes the merge method so that they are sequenced as a flat array.
Commits on Jun 20, 2013
  1. Merge pull request #1715 from loe/21324-pip-should-be-case-insensitive

    adrienthebo committed Jun 20, 2013
    Pip provider query should be case insensitive.