| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |/ / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Without this change native resource types declared using the
create_resources() function are not contained within the class scope of
the function call. As a result, resources were "floating off" in the
graph, disconnected from the rest of the relationship edges.
With this change, the scope is preserved and native resources are
contained by the class the function call is executed from.
Reviewed-by: Dan Bode <dan@puppetlabs.com>
|
| | |\ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Edit test to accomodate the default URL change made in commit
f6882d6d5779883e931a6f558c06f631098011c5.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
|
| | |/ / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Puppet's default reporturl setting was http://localhost:3000/reports, which has
been deprecated in Puppet Dashboard in favor of
http://localhost:3000/reports/upload. As Dashboard is the first-class
destination for the http report processor, this commit changes Puppet's default
to match what current versions of Dashboard expect.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Keep alive has been disabled since 2008, and seems to have caused problems when
it was enabled before then. Since there doesn't seem to be any push to get it
working again, just remove it to simplify this code.
This also allows us to entirely remove the usage of Puppet::Util::Cacher from
HttpPool.
Paired-With: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
* feature/master/8268-puppet-agent-windows:
Fix spec test failure on 1.9.2
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The previous set of windows patches accidentally changed %w{/one}
to make_absolute("/one"). This commit changes it back to
[make_absolute("/one")].
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* feature/master/8268-puppet-agent-windows:
Maint: Fix miscellaneous tests
Maint: Don't test for extended signals on Windows
Maint: Tagged spec tests that are known to fail on Windows
Fix tests with "relative" paths on Windows
(#8268) Require windows drive letters in absolute file paths
(#8489) Consistently use File::PATH_SEPARATOR
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Several tests were broken due to pecularities of Windows
and Ruby on Windows:
* Ruby on windows does not differentiate between group and
other file permissions.
* All open file handles must be closed before the file can
be deleted
* Sometimes the current working directory (Dir.getwd) is
reported as C:/foo and other times as C:\\foo, which
confuses the spec tests.
* Ruby's sprintf formats floating point values differently
on Windows vs Unix. The Windows exponent has an extra
leading zero.
* Needed to stub execution of security command with the
SMF service provider.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The signals HUP, USR1, and USR2 are not supported on Windows. The
Puppet::Daemon code already skipped trapping these on Windows,
but the spec test was expecting them to be trapped. This commit
just updates the spec test to match the existing daemon code.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Many spec tests fail on Windows because there are no default
providers implemented for Windows yet. Several others are
failing due to Puppet::Util::Cacher not working correctly,
so for now the tests that are known to fail are marked with
:fails_on_windows => true. To skip these tests, you can run:
rspec --tag ~fails_on_windows spec
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Absolute paths on Unix, e.g. /foo/bar, are not absolute on Windows,
which breaks many test cases. This commit adds a method to
PuppetSpec::Files.make_absolute that makes the path absolute in
test cases.
On Unix (Puppet.features.posix?) it is a no-op. On Windows,
(Puppet.features.microsoft_windows?) the drive from the current
working directory is prepended.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When testing whether a file path is absolute, the regexp was only
handling POSIX style file paths. This commit requires Windows
style file paths to start with a drive letter. A future commit
will refacter the various places we do path validation to
support both Windows drive letters and UNC paths.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Puppet uses both colon and File::PATH_SEPARATOR in various places, which
does not work on Windows, where File::PATH_SEPARATOR is a semi-colon. This
commit changes the code and tests to consistently use File::PATH_SEPARATOR.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Given that we have the 'include?' method, this feature
is unnecessary, and it makes sense to convert to more
ruby-like behavior.
Any code that previously checked whether lookupvar
(or the new []) returned :undefined should now check
whether 'scope.include?(var)'. Thus, you can have
the same behavior, but it takes a bit different code
to get it.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We were previously storing the module name with
the environment instances as the key, which meant
if the environment instances were removed, we could
never get those modules again. Given that the
functions weren't reloaded, this meant the functions
were gone if we ever reloaded the environment.
This makes the Functions environment module resilient across
environment reloads, and it also makes the method work correctly
when handed either an environment or a string.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The method for adding class resources to the
catalog was only working in cases where the default
values weren't AST objects. This commit fixes
this, along with the tests that were failing
and drew out the problem.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The capability was already there via to_hash, and
Enumerable was already included, but this method was
missing. Given the kind of hacking RI is doing,
this seemed appropriate.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This is primarily for Hiera/DataLibrary support,
but is a decent idea regardless.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This is again done to make support for hiera easier.
The way we were handling lookup of resource defaults
was over-complicated.
This does a decent bit of cleanup overall, but primarily
focused on resource type defaults and how they get
set during compilation.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We were previously not defaulting to an environment,
which is silly given that there's always a default. It
just made setup code harder. We now default to the default
environment.
This makes further testing involving scopes much easier.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The interface to scope is much clearer this way anyway,
but this is needed to integrate Puppet with Hiera[1].
It just provides hash-like behavior to Scope, which Hiera
and others can now easily rely on.
I also went through all of the code that used Scope#lookupvar
and Scope#setvar and changed it if possible, and at the same
time cleaned up a lot of tests that were unnecessarily stubbing
(and thus making it difficult to tell if I had actually broken
anything).
1 - https://github.com/ripienaar/hiera
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| |\ \ \ \ \ \
| | |_|_|_|/ /
| |/| | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We were originally using the actual constant for both Indirector
Requests and Nodes, and this registers their document types
as symbolic names.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is only in the Node and Indirection::Request code.
It makes the tests much simpler.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We were failing if any values were nil, and values
were often nil, at least in testing.
We now only include non-nil values, and we handle nil
values just fine.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We'll be using this to do RPC over mcollective.
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* ticket/master/8356-color-setting-on-windows:
(#8356) Specify setting type for color
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Because we default the color setting to "false" on Microsoft Windows,
the heuristics used to detect which type of setting we're using were
getting confused, and mis-detected color as being a BooleanSetting
rather than just a Setting.
By specifying that color is a "Setting", we can skip the
auto-detection, and avoid this problem entirely.
Reviewed-by: Josh Cooper <josh@puppetlabs.com>
|
| |\ \ \ \ \ \
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
* feature/master/8268-puppet-agent-windows:
(#8268) Fix resource harness spec tests
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The windows file type requires that the path start with either a drive
letter or UNC style path. Also Ruby's File implementation on windows
only supports 0644 and 0444 permission bits (it doesn't differentiate
between group and other, and it doesn't know about the execute bit).
This commit maps the path and permissions used in the test to sensible
values when running on windows.
Paired-with: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* ticket/master/8356-default-color-should-be-false-on-windows:
(#8356) Color defaults to false on Windows
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Windows consoles do not support ansi escape sequences for colorizing
output. This commit changes the default setting of 'color' to false when
the "microsoft_windows" feature is present.
Paired-with: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
jeffmccune/ticket/master/8032_create_resources_containment
(#8032) Add containment to create_resources
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Without this change native resource types declared using the
create_resources() function are not contained within the class scope of
the function call. As a result, resources were "floating off" in the
graph, disconnected from the rest of the relationship edges.
With this change, the scope is preserved and native resources are
contained by the class the function call is executed from.
Reviewed-by: Dan Bode <dan@puppetlabs.com>
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* disable-master-on-windows:
Disable the master on Windows instead of blowing up with failed resources
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Running the Puppet master on Windows is not supported, so instead of
failing with what can be cryptic error messages about failed resources
we fail with an explicit error message about the master on Windows not
being supported. This way a user isn't mistakenly given the
impression that running a master on Windows will work, and they just
have something mis-configured.
Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
Reviewed-by: Max Martin <max@puppetlabs.com>
|
| |\ \ \ \ \ \
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | | |
* ticket/master/7581-windows-feature-detection-error-message:
(#7581) Provide more detailed error message when missing gems on Windows
|
| | |/ / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Running Puppet on Windows requires the sys-admin, win32-process &
win32-dir gems. If any of these gems were missing, Puppet would fail
with the message "Cannot determine basic system flavour".
When trying to determine if we are on Windows, we now warn with the
message "Cannot run on Microsoft Windows without the sys-admin,
win32-process & win32-dir gems: #{err}", where err is the normal ruby
load error message stating which gem could not be loaded.
We also only warn if the POSIX feature is not present.
Signed-off-by: James Turnbull <james@puppetlabs.com>
Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
Reviewed-by: Cameron Thomas <cameron@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
|
| |\ \ \ \ \
| | |_|/ / /
| |/| | | | |
|
| | |\ \ \ \
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | | |
* 2.7.x:
Update configurer_spec.rb to work with Ruby 1.8.5
|