summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-10-10Merge branch 'pr/3146' into stableAndrew Parker10-12/+116
* pr/3146: (maint) Modify other uses of get() to get!() (PUP-3244) Add Puppet::Environment::Directories#get! method (PUP-3244) Validate Environment Before Setting (PUP-3244) Acceptance Tests for Nonexistent Environments (PUP-3244) ENC ignores missing directory environments Closes GH-3146
2014-10-10(maint) Modify other uses of get() to get!()Andrew Parker7-11/+7
There were several uses of get() that either immediately checked for nil and raised the UnknownEnvironmentError or assumed non-nil and continued. This changes all of those cases to use the new get!() method and so be explicit that they require an environment. There are a couple uses that still don't require the environment to exist.
2014-10-10(maint) Update puppet_for_the_win for foss-3.7.x.yamlJosh Cooper1-1/+1
Update puppet_for_the_win dependency so dev builds use facter 2.2.0
2014-10-10Merge pull request #3177 from ↵Josh Cooper3-1/+18
kylog/issue/stable/pup-643/pkg-skip-certificate-expiration-warnings Issue/stable/pup 643/pkg skip certificate expiration warnings
2014-10-10(PUP-643) Report a puppet warning when pkg warnsKylo Ginsberg1-3/+12
2014-10-10(PUP-643) Ignore pkg's certificate expiration warning messagesKylo Ginsberg3-1/+9
When a pkg certificate is in it's last 30 days before expiration, the pkg tools emit a warning message so you can get a new certificate for some operations. The 'latest' method issues a 'pkg -Hn <package>' which trips this warning message, but the message was unexpected and 'latest' would raise, failing the catalog application. This commit simply ignores such certificate expiration warnings. While I was in there, I split a very compact line of code across a couple lines and added some spaces, in the name of readability.
2014-10-09Merge pull request #3134 from hlindberg/PUP-3366_string-enum-type-calculationAndrew Parker2-7/+39
PUP-3366 Fix issues with string/enum type assignable calculations
2014-10-09Merge pull request #3074 from melissaanne/stableKylo Ginsberg1-0/+2
(PUP-3227) Address man page ownship conflicts
2014-10-09Merge branch 'ticket/stable/PUP-3203-cant-update-trigger' into stableRob Reynolds2-3/+11
* ticket/stable/PUP-3203-cant-update-trigger: (PUP-3203) Don't mutate trigger when checking for equality
2014-10-09(PUP-3203) Don't mutate trigger when checking for equalityJosh Cooper2-3/+11
Previously, when checking if the `current` and `desired` triggers were equivalent, we were silently deleting the `index` and `enabled` values from the `current` trigger. If we later needed to delete the `current` trigger, we would have lost its `index`, resulting in a call to `Win32::TaskScheduler.delete_trigger(nil)` causing the error: no implicit conversion from nil to integer This commit ensure that we don't mutate the `current` or `desired` trigger.
2014-10-09Merge pull request #3158 from joshcooper/ticket/stable/PUP-1165-task-schedulerRob Reynolds2-27/+51
(PUP-1165) Provide a default value for windows scheduled task trigger
2014-10-08(PUP-3244) Add Puppet::Environment::Directories#get! methodBritt Gresham3-7/+67
This new function will return the directory environment or raise an error if a directory environment does not exist. This gets rid of the need to check if environments exist across the codebase before continuing for the areas where we need.
2014-10-07(maint) Remove magic behaviorJosh Cooper2-15/+14
Previously, the `#triggers` method on the scheduled task provider would magically return single element or an array of multiple elements. This commit changes the provider to always return an array, of possibly a single element.
2014-10-07(PUP-1165) Ignore scheduled_task trigger start_date when unspecifiedJosh Cooper2-3/+10
Previously, if a scheduled_task resource was created in the past, and the desired value of the resource's trigger did not specify a `start_date`, then puppet would think the resource was out of sync, and attempt to delete the old trigger, and add the new one. This process would repeat once per day, leading to spurious 'triggered changed' messages, and reports. This commit modifies the scheduled_task provider so that if the desired value does not specify a `start_date`, then it will effectively be ignored when comparing the current and desired triggers.
2014-10-07(PUP-1165) Perform validation on desired triggers not currentJosh Cooper2-9/+27
The `enabled` and `index` trigger parameters are read-only, so they will be set in the `current` trigger, but are not allowed in the `desired` trigger. Previously, the `translate_hash_to_trigger` method performed validation based on whether it was passed a `current` or `desired` trigger. This commit moves the validation logic to the `validate_trigger` method, which is only ever called with `desired` trigger values. It also allows the `index` and `enabled` keys to be present in a trigger. This isn't an issue because they are ignored for the purposes of determining if two triggers are the same. The reason for this change, is because ultimately we don't want the `translate_hash_to_trigger` method to mutate the `current` trigger, and this commit makes it so that the `index` and `enabled` keys can be in the `puppet_trigger` but will be ignored.
2014-10-06Merge branch 'pr/3136' into stableAndrew Parker3-16/+9
* pr/3136: (PUP-3364) Improve the error message for numeric resource titles
2014-10-06(PUP-3364) Improve the error message for numeric resource titlesHenrik Lindberg3-16/+9
This improves the error message when a numeric resource title is used in a resource reference, or when a numeric attribute name is referenced. The message used to be too generic, and used internal Ruby types instead of puppet types in the message string.
2014-10-03Merge pull request #3142 from ↵Andrew Parker2-2/+53
hlindberg/PUP-3365_remove-deep-undef-mapping-in-3x-func-api (PUP-3365) Change 3x deep map of undef to only do surface map
2014-10-03Merge pull request #3154 from hlindberg/PUP-3363_trailing-comma-assignAndrew Parker5-9/+57
(PUP-3363) Make transformation of unparenthesized calls handle errors
2014-10-03Merge branch 'pr/3126' into stableAndrew Parker2-3/+20
* pr/3126: (PUP-3351) Test using example of problematic behavior (PUP-3351) Evaluate ENC classes in the correct order Closes GH-3126
2014-10-03(PUP-3351) Test using example of problematic behaviorAndrew Parker2-33/+19
After talking with Reid Vandewiele, it turns out that the problematic behavior isn't directly the order of the classes themselves. Previous assertions that there are possible conflicts from the classes when they were done in one order or another are incorrect. The classes, when any have parameters, are kept by the node in a hash keyed off of the class name, which means that there is no possibility of them creating a duplicate resource error. The actual usecase comes down to *how* parameterized classes vs unparameterized classes are often used. A parameterized class can often be simply a set of shared data that the unparameterized classes depend on (or inherit from) parameterized classes. This modifies the test case for the reordering change to provide an example of the use case here.
2014-10-03(PUP-3351) Evaluate ENC classes in the correct orderJeff McCune2-2/+33
Without this patch classes declared from an ENC are evaluated in the wrong order. This is a problem because classes declared without parameters are evaluated prior to classes with parameters which causes an Error: Duplicate declaration when the classes with parameters are evaluated. According to the code comments for the `evaluate_node_classes` method, the expected behavior is that classes with an empty set of parameters will not conflict with classes that have declared parameters.
2014-10-03(PUP-3366) Correct comparisson of Enum > Enum[a]Henrik Lindberg2-1/+8
Comparissons involving an unparentesized Enum were not correct because an iteration with all? returns true if the set being enumerated is empty. This modifies the logic, and adds missing tests.
2014-10-03(PUP-3363) Make transformation of unparenthesized calls handle errorsHenrik Lindberg5-9/+57
This fixes problems when a user enters commas where they are not supposed to be. As a result, an expression will be parsed as being an argument list for an unparenthesized function call. The transformation logic for such calls did not take one case into account; a non call followed by an argument list. e.g: $a = 1,10 Which resulted in a strange AST model (a literal list with an assignment and a 10). This commit adds error checking and raising of an exception in the transformation which is caught by parser_support and formatted into an error - either about an illegal comma (when the LHS cannot possibly be a call at all (as in the above exampel), or a more elaborate message about that what could be a function call requires parentheses. In order to enable positioning of the error message on the first comma in the argumet list, the comma tokens were required in the expression list fed to the transformer. Subsequently these tokens must be filtered out by the transformation, and passed on in the raised exception (since the receiver would otherwise not know which token that caused the problem (it is nested inside the stucture it passes on to be transformed). Unparenthesized function calls are a very bad idea...
2014-10-02Merge branch 'pr/3144' into stableAndrew Parker3-24/+31
* pr/3144: (maint) Remove duplicate file handling code (maint) reduce repitition in Application::Apply integration spec (PUP-3258) node exec indirector: default to environment, not its name Closes GH-3144
2014-10-02(maint) Remove duplicate file handling codeAndrew Parker2-31/+13
The tests had their own way of creating files and directories for testing. All of these different ways of creating files and directories already existed in PuppetSpec::Files. This unifies them.
2014-10-01(PUP-3244) Validate Environment Before SettingBritt Gresham2-9/+6
Before this commit the environment validation was happening for the Exec terminus instead of on the node object itself. This fix should help all node objects from having invalid environments when its environment is set using `Puppet::Node#environment=`.
2014-10-01(PUP-3315) Update build_defaults for MSI builderRob Reynolds1-1/+1
This moves the sha1 to include the recent changes to the MSI that add more clarification on FQDN of Puppet master.
2014-10-01Merge branch ↵Josh Partlow2-11/+31
'issue/stable/pup-3277-fix-acceptance-for-default-directory-env-configuration' into stable * issue/stable/pup-3277-fix-acceptance-for-default-directory-env-configuration: (PUP-3277) Change ticket_7117 env/auth.conf test to use environmentpath (maint) Fix cve-2013-4761 acceptance test
2014-10-01(PUP-3277) Change ticket_7117 env/auth.conf test to use environmentpathJosh Partlow1-8/+24
This test has been removed from master, but remains in stable and is being updated to use environmentpath as part of the general work preparing acceptance for puppet configurations with environmentpath set by default.
2014-10-01(maint) Fix cve-2013-4761 acceptance testJosh Partlow1-3/+7
The acceptance test was removing the file that would have been executed by the exploit, and was therefore passing regardless of the state of the bug. Fixed so that the exploit file creates a separate exploited marker file, and the test removes and checks only the marker file.
2014-10-01(PUP-3244) Acceptance Tests for Nonexistent EnvironmentsBritt Gresham1-0/+43
Added acceptance tests to test if an error is raised if an ENC specifies a nonexistent environment for a node.
2014-10-01(maint) reduce repitition in Application::Apply integration specFelix Frank1-25/+12
2014-10-01(PUP-3258) node exec indirector: default to environment, not its nameFelix Frank2-1/+39
Nodes can be classified through a local executable that prints YAML with a node specification. This is enabled through the node_terminus=exec option. Since PUP-2519, this setting would break `puppet apply`. Trying to apply any manifest would lead to Puppet applying the default environment's site manifest instead. The reason for this is that the node terminus will include the current environment's name in the node lookup result. This in turn makes Puppet look up the environment per name. This is not the desired behavior, because Application::Apply performs the lookup and further operations with a localized environment that overrides the site manifest. Solved by including the current environment object in the returned node object instead of its name.
2014-09-30(PUP-3365) Change 3x deep map of undef to only do surface mapHenrik Lindberg2-2/+53
This changes the mapping of arguments to 3x function calls to not map undef to empty strings except at the surface level. Other mappings are still done as they are required for frozen strings, and values having a type that is not supported by the 3x functions.
2014-09-30(PUP-3126) Bump vendored gem dependenciesJosh Cooper1-2/+2
Include win32-service 0.8.6 when building MSIs.
2014-09-30Merge pull request #3128 from ↵Josh Cooper1-2/+2
ferventcoder/ticket/stable/PUP-3126-upgrade-win32-service (PUP-3126) upgrade win32-service to 0.8.6
2014-09-30(PUP-3244) ENC ignores missing directory environmentsBritt Gresham1-0/+8
When using an ENC, if an environment that didn't exist was defined for a node puppet would place the node into the production environment instead of raising an error to alert the user that the environment that had been requested did not exist. This commit changes the behaviour when an environment is defined in an ENC but does not actually exist. Instead of placing the node into the production environment a Puppet::Environments::EnvironmentNotFound error is raised.
2014-09-29PUP-3366 Fix issues with string/enum type assignable calculationsHenrik Lindberg2-6/+31
There were errors in the calculation of string/enum calculation. Basically Enum == String, if String is size constrained then Enum < String. This fixes this calculation. There were no tests for this, they are now added.
2014-09-29(PUP-3126) upgrade win32-service to 0.8.6Rob Reynolds1-2/+2
This upgrades the win32-service gem to at least 0.8.6 to take advantage of the fixes to the service gem. This change includes only the fixes that we have already applied patches to in puppet-win32-ruby.
2014-09-25Merge pull request #3122 from ↵Josh Partlow1-0/+2
hkenney/issue/stable/pup-3339_confine_failed_test_off_of_fedora_19 (PUP-3339) Confine failed test off of Fedora 19
2014-09-25(PUP-3339) Confine failed test off of Fedora 19Hailee Kenney1-0/+2
There seems to be a bug in `usermod` on Fedora 19 which is causing this acceptance test to fail. The bug does not appear to be present in Fedora 20. Since Fedora 19 will likely each end of life soon, just confine the acceptance test off the platform rather than try to find a work around in puppet.
2014-09-24(maint) Include fedora as a platform to test with service packages.Josh Partlow1-1/+1
Fedora had been left out, through no fault of its own, and was being tested without starting and stopping via service scripts.
2014-09-19Merge pull request #3109 from johnduarte/pmt_directory_env_supportJosh Partlow33-228/+290
(PUP-3248) Fix PMT tests for directory environment
2014-09-19(PUP-3248) Use tmpdir for generating environmentsJohn Duarte5-34/+29
This commit changes calls to the generate_base_legacy_and_directory_environments helper to use a tmpdir rather than master['puppetpath'] to isolate the test environments and prevent collisions. The generate_base_legacy_and_directory_environments has also been altered to remove the `environmentpath` setting in the generated configuration file.
2014-09-19Merge pull request #3106 from jpartlow/maint/stable/ec2-centos6-acceptance-fixesJosh Partlow2-18/+5
Maint/stable/ec2 centos6 acceptance fixes
2014-09-18(PUP-3248) Fix PMT tests for directory environmentJohn Duarte33-206/+273
The beaker host['distmoduledir'] variable is not meaningful if the host is using directory environments (e.g. 'production'). This commit updates the helper methods for validating that a module is (or is not) installed on the host by iterating over the modulepath if a specific modulepath is not provided. The calls to these helper methods have been updated for the change in parameter ordering in the helper methods.
2014-09-16(maint) Remove the resource/host/should_query testJosh Partlow1-17/+0
This test was attempting to verify that the host provider will show an entry as present in a target host file. But in fact, because Puppet has just the single resource representing a host entry of the given name, what this test is doing is ensuring that the 'localhost' host entry is found in the given target file. On vms with two localhost entries (say 127.0.0.1 and ::1) this ends up moving the ::1 entry to the target file, and the system continues to work. But on a system with a single localhost entry in its /etc/hosts, this ends up moving that to the target tmp file and crippling localhost name resolution for subsequent tests. See PUP-1479 for more info.
2014-09-16releasing package puppet version 3.7.1-1debian/3.7.1-1Stig Sandbeck Mathisen1-2/+2
2014-09-16Imported upstream release 3.7.1Stig Sandbeck Mathisen1-0/+6