Jira (PUP-11204) puppet lookup --facts {filename} fails if filename does not contain a dot
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-11204 puppet lookup --facts {filename} fails if filename does not contain a dot Issue Type: Bug Affects Versions: PUP 6.23.0 Assignee: Unassigned Created: 2021/08/09 7:41 AM Priority: Normal Reporter: Reinhard Vicinus Calling: puppet lookup --facts dummy keyX Error: Could not parse application options: undefined method `[]' for nil:NilClass Fails because the code that verifies the filename expects, that the filename contains a dot: option('--facts FACT_FILE') do |arg| if %w{.yaml .yml .json}.include?(arg.match(/\.[^.]*$/)[0])
Jira (PUP-10726) hiera lookup removes duplicate array elements during deep merge
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-10726 hiera lookup removes duplicate array elements during deep merge Issue Type: Bug Affects Versions: PUP 6.19.0 Assignee: Unassigned Components: Hiera & Lookup Created: 2020/10/22 6:45 AM Priority: Normal Reporter: Reinhard Vicinus Puppet Version: 6.19.0 Puppet Server Version: not installed OS Name/Version: Ubuntu 20.04 hiera lookup removes duplicate array elements during deep merge. hiera.yaml: version: 5 defaults: data_hash: yaml_data datadir: data hierarchy:
Jira (PUP-10383) File resource unable to download external https source
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-10383 File resource unable to download external https source Issue Type: Bug Affects Versions: PUP 6.14.0 Assignee: Unassigned Created: 2020/03/24 8:28 AM Priority: Normal Reporter: Reinhard Vicinus Puppet Version: 6.14.0 Puppet Server Version: - OS Name/Version: Ubuntu With puppet agents version prior to 6.14.0 the following was possible: > puppet apply -e 'file { "/tmp/download": source => "https://getcomposer.org/download/1.5.2/composer.phar" }' Notice: Compiled catalog for test.example.com in environment production in 0.01 seconds Error: certificate verify failed [unable to get local issuer certificate for CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US] Error: /Stage[main]/Main/File[/tmp/download]/ensure: change from 'absent' to 'file' failed: certificate verify failed [unable to get local issuer certificate for CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US]
Jira (PDB-4641) resource_events partitioning migration failure
Title: Message Title Reinhard Vicinus created an issue PuppetDB / PDB-4641 resource_events partitioning migration failure Issue Type: Bug Affects Versions: PDB 6.8.1 Assignee: Unassigned Created: 2020/02/03 11:55 AM Priority: Normal Reporter: Reinhard Vicinus Trying to upgrade from puppetdb 6.7.3 to puppetdb 6.8.1 and as far as I can tell I still get the same error as described in PDB-4626: ERROR [p.p.s.migrate] Caught SQLException during migration java.sql.BatchUpdateException: Batch entry 0 INSERT INTO resource_events_20200124Z ( event_hash, report_id, certname_id, status, timestamp, resource_type, resource_title, property, new_value, old_value, message, file, line, containment_path, containing_class, corrective_change, name ) VALUES (...) was aborted: ERROR: relation "resource_events_20200124z" does not exist Add Comment
Jira (PUP-10098) String.new without formater does not convert ruby binary string to puppet string
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-10098 String.new without formater does not convert ruby binary string to puppet string Issue Type: Bug Assignee: Unassigned Created: 2019/10/10 8:38 AM Priority: Minor Reporter: Reinhard Vicinus Puppet Version: 6.10 Puppet Server Version: 6.10 OS Name/Version: Ubuntu 18.04 I would expect that both String.new($binary_string) and String.new($binary_string, '%s') convert the binary string to a puppet string. But the first one does not. Here is an example: $x = { 'y' => 'test'} # This is a really ugly hack to create ASCII-8BIT encoded data: inline_template('<% @x["y"] = "test".force_encoding("ASCII-8BIT") %>') $v = $x['y'] $converts_string = String.new($v, '%s')
Jira (PDB-4548) Exporting and importing resources with binary data in parameters encodes the data base64
Title: Message Title Reinhard Vicinus created an issue PuppetDB / PDB-4548 Exporting and importing resources with binary data in parameters encodes the data base64 Issue Type: Bug Affects Versions: PDB 6.7.0 Assignee: Unassigned Created: 2019/10/10 8:24 AM Priority: Normal Reporter: Reinhard Vicinus With puppet 6 the agent can now store binary data in the catalog, but the puppetdb can not. Because the catalog needs to be UTF-8 encoded, binary data gets base64 encoded in the catalog. The value gets stored base64 encoded in the puppetdb database but the information that it is base64 encoded is not stored. That results in that binary values of exported resources are base64 encoded on importing. Here is an example: $x = { 'y' => 'test'} # This is a really ugly hack to create ASCII-8BIT encoded data: inline_template('<% @x["y"] = "test".force_encoding("ASCII-8BIT") %>') $v = $x['y']
Jira (PUP-10096) Parameters of resources are base64 encoded in puppetdb if created as raw byte strings by ruby functions
Title: Message Title Reinhard Vicinus commented on PUP-10096 Re: Parameters of resources are base64 encoded in puppetdb if created as raw byte strings by ruby functions Henrik Lindberg Ok, the reason why the value was not binary encoded in the catalog on the node is that there is still a puppet 5 agent running. With a puppet 6 agent the value is binary encoded. This is a case were afterwards I am asking myself why I spend hours debugging the puppetserver/puppetdb part and did not try what happened if I updated the puppet agent on the node... I'll change the ruby function as suggested by Josh Cooper: Thanks for looking up the correct way to encode DNS domain names. But I tested some things and I found a further problem: The puppetdb does not store, that the value was binary encoded. So if you export a resource with a binary string value and import it on another node the value is base64 encoded, because in the puppetdb postgresql database is no information stored, that the value was binary in the catalog and only the base64 value is stored: $v = rdnslookup('8.8.8.8') case $::fqdn { 'node1': { @@file { $v: path => '/tmp/test.txt', content => $v, } } 'node2': {
Jira (PUP-10096) Parameters of resources are base64 encoded in puppetdb if created as raw byte strings by ruby functions
Title: Message Title Reinhard Vicinus commented on PUP-10096 Re: Parameters of resources are base64 encoded in puppetdb if created as raw byte strings by ruby functions I don't know if the return value should be auto converted. But in my opinion whatever is done should be done consistently and at the moment, the parameter value gets base64 encoded but the title does not even if it is the same value. Also I would expect that there is no difference between the catalog submitted to the puppetdb and the catalog stored under /opt/puppetlabs/puppet/cache/client_data/catalog/${fqdn}.json but at the moment there are no base64 encoded values in the node catalog, only in the puppetdb catalog. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.328499.1570559378000.135178.1570571940153%40Atlassian.JIRA.
Jira (PUP-10096) Parameters of resources are base64 encoded in puppetdb if created as raw byte strings by ruby functions
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-10096 Parameters of resources are base64 encoded in puppetdb if created as raw byte strings by ruby functions Issue Type: Bug Affects Versions: PUP 6.9.0 Assignee: Unassigned Created: 2019/10/08 11:29 AM Priority: Normal Reporter: Reinhard Vicinus Puppet Version: 6.10.0 Puppet Server Version: 6.7.0 PuppetDB Version: 6.7.0 OS Name/Version: Ubuntu 18.04. If a ruby function returns a raw byte string, the puppet server handles it without problems, but if the returned value is used as the value of a parameter of a resource the parameter is stored base64 encoded in the puppetdb even if it only contains utf-8 conform characters. This issue only appears with puppet 6, puppet 5 is not affected. To reproduce this issue you need a puppetserver with a puppetdb. Then you need to place the ruby function were the puppetserver can find it: require 'resolv' module Puppet::Parser::Functions newfunction(:rdnslookup, :type => :rvalue) do |args|
Jira (PUP-9968) Parser does not allow comma after last element in nested Variant Types
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-9968 Parser does not allow comma after last element in nested Variant Types Issue Type: Bug Affects Versions: PUP 6.7.2 Assignee: Unassigned Components: Compiler Created: 2019/08/20 4:45 AM Priority: Minor Reporter: Reinhard Vicinus Puppet Version: 6.7.2 Puppet Server Version: 6.5.0 OS Name/Version: Ubuntu 18.04.3 LTS The following code does not parse: type A = Variant[Pattern[/a/]] type B = Variant[ A, ]
Jira (PUP-8067) Selector expression ignored in some scenarios
Title: Message Title Reinhard Vicinus commented on PUP-8067 Re: Selector _expression_ ignored in some scenarios Sorry, if my comment sounded a little bit harsh, but i got somewhat scared after stumbling over the "silent" breakage. But as far as I can tell this was the only case (the code calculates a nagios threshold value, x is the fact processorcount, the formular works good for processor counts bigger then 4, smaller numbers need some tweeking). The other cases were all in the form: $config_hash + $config_hash_value ? { undef => {}, default => { config_hash_key => $config_hash_value } } And produced an error and were therefore easily fixed. The reason that there were so many cases was that the code got copied and pasted a lot. All occurrences was in our roles and profiles code which isn't on forge. Regarding the change itself, in my opinion there is no more correct way to precedence ordering. But it makes sense to adhere to standards even if they are only informal. So if other languages have established an informal standard to another precedence ordering, it makes sense to comply. Add Comment This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-8067) Selector expression ignored in some scenarios
Title: Message Title Reinhard Vicinus commented on PUP-8067 Re: Selector _expression_ ignored in some scenarios Is there a reason why this change wasn't listed in the breaking changes section of the puppet 5.4 release notes? Because it breaks our code left and right and sometimes in subtle ways, like this: $x = 3 $y = 10 + $x ? { default => $x/2, 1 => 4} Now this quietly returns 1 were prior puppet versions returned 11. The breakages can be easily fixed by adding parenthesis but finding all occurrences is a bitch... Add Comment This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to
Jira (PUP-7941) Autogenerated custom types never get all properties set
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7941 Autogenerated custom types never get all properties set Issue Type: Bug Affects Versions: PUP 4.10.7 Assignee: Unassigned Created: 2017/09/12 12:57 AM Priority: Minor Reporter: Reinhard Vicinus Don't know if I missed something, but as far as I can tell via prefetch autogenerated resources of custom types never get all properties set. Here is a simple example: test/lib/puppet/type/touchfile.rb Puppet::Type.newtype(:touchfile) do
Jira (PUP-7935) Prefetching custom types not possible if namevar is not "name"
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7935 Prefetching custom types not possible if namevar is not "name" Issue Type: Bug Affects Versions: PUP 4.10.7 Assignee: Unassigned Created: 2017/09/11 1:21 PM Priority: Minor Reporter: Reinhard Vicinus Is it a bug or a feature that it is not possible to prefetch custom types if the namevar parameter is not named "name", because in puppet/provider.rb: @property_hash[:name] is hardcoded. Here an simple example for clarification of the issue: test/lib/puppet/type/touchfile.rb Puppet::Type.newtype(:touchfile) do
Jira (PUP-7929) No ensure property default value for types without any other property set
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7929 No ensure property default value for types without any other property set Issue Type: Bug Affects Versions: PUP 4.10.7 Assignee: Unassigned Created: 2017/09/10 9:02 AM Priority: Minor Reporter: Reinhard Vicinus Don't know if this behavior is a bug or not, but as it took me a long time to figure it out I thought I report it so that at least the documentation can be improved. On custom types the default value of the ensure property is only set to present if the type has any other property set. Simple example: test/lib/puppet/type/touchfile.rb Puppet::Type.newtype(:touchfile) do
Jira (PUP-7800) alias parameter fails with package resources
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7800 alias parameter fails with package resources Issue Type: Bug Affects Versions: PUP 5.0.1 Assignee: Unassigned Created: 2017/07/22 2:24 AM Priority: Minor Reporter: Reinhard Vicinus package { 'a': ensure => 'absent', alias => 'b', }
Jira (PUP-7436) regression: lookup of fact values for epp parameters
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7436 regression: lookup of fact values for epp parameters Issue Type: Bug Affects Versions: PUP 4.10.0, PUP 4.9.4 Assignee: Unassigned Created: 2017/04/07 8:34 AM Priority: Normal Reporter: Reinhard Vicinus with puppet 4.8.3 and older versions the following code generated an empty notice: notice(inline_epp('<%- | Optional[String] $path = undef, | -%><%= $path %>', {})) with 4.10.0 and at least 4.9.4 the value of the fact 'path' is returned.
Jira (PUP-7291) no hiera class parameter lookup debug information
Title: Message Title Reinhard Vicinus commented on PUP-7291 Re: no hiera class parameter lookup debug information What i'm missing with puppet 4.9.x is the following output for every class parameter, which is available with puppet 4.8.3. The example shows a lookup of the class parameter postgresql::globals::postgis_version which is not found: Debug: Performing a hiera indirector lookup of postgresql::globals::postgis_version with options {:variables=>Scope(Class[Postgresql::Globals]), :merge=>#>, @value_type=#]>>>]>, @options={}>} Debug: hiera(): Using Hiera 1.x backend API to access instance of class Hiera::Backend::Eyaml_backend. Lookup recursion will not be detected Debug: hiera(): [eyaml_backend]: Set option: datadir = /data/user-environments/rv4/modules/hieradata Debug: hiera(): [eyaml_backend]: Set option: extension = yaml Debug: hiera(): [eyaml_backend]: Set option: pkcs7_private_key = /etc/puppetlabs/eyaml/private_key.pkcs7.pem Debug: hiera(): [eyaml_backend]: Set option: pkcs7_public_key = /etc/puppetlabs/eyaml/public_key.pkcs7.pem Debug: hiera(): [eyaml_backend]: Looking up postgresql::globals::postgis_version in eYAML backend Debug: hiera(): [eyaml_backend]: Looking for data source nodes/dash
Jira (PUP-7284) hiera-eyaml option 'extension' is ignored
Title: Message Title Reinhard Vicinus commented on PUP-7284 Re: hiera-eyaml option 'extension' is ignored I added your commit https://github.com/puppetlabs/puppet/commit/239c2e9f31b3ba20eafbf902f6ff45413df506fc to my puppet 4.9.3 test server and now have the problem, that lookups inside hiera data structures now longer work in all cases. Presumably because the eyaml backend is to greedy looking up data values. Here is an small example: hiera.yaml --- :backends: - eyaml - yaml :hierarchy: - common :yaml: :datadir: "."
Jira (PUP-7291) no hiera class parameter lookup debug information
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-7291 no hiera class parameter lookup debug information Change By: Reinhard Vicinus Summary: no hiera class paramater parameter lookup debug information Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-7291) no hiera class paramater lookup debug information
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7291 no hiera class paramater lookup debug information Issue Type: Bug Affects Versions: PUP 4.9.3 Assignee: Unassigned Created: 2017/03/02 2:16 AM Priority: Normal Reporter: Reinhard Vicinus With puppet 4.9.x hiera class parameter lookups are no longer explained when debug is enabled. Explicit lookup calls are explained still. Add Comment
Jira (PUP-7286) hiera array merge behaviour changed
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7286 hiera array merge behaviour changed Issue Type: Bug Affects Versions: PUP 4.9.3 Assignee: Unassigned Created: 2017/03/01 8:03 AM Priority: Normal Reporter: Reinhard Vicinus We still use the hiera version 3 (i.e. unversioned/classic) hiera.yaml format. With puppet 4.8.x and older versions class parameter lookups in hiera had the default merge behavior 'first', even if the option 'merge_behavior' 'deep' was active. With puppet 4.9.x class parameters of type array are now merged if the option 'merge_behavior' 'deep' is active. A simple reproducer: hiera.yaml ---
Jira (PUP-7284) hiera-eyaml option 'extension' is ignored
Title: Message Title Reinhard Vicinus commented on PUP-7284 Re: hiera-eyaml option 'extension' is ignored We still use the hiera version 3 (i.e. unversioned/classic) hiera.yaml format. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-7284) hiera-eyaml option 'extension' is ignored
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7284 hiera-eyaml option 'extension' is ignored Issue Type: Bug Affects Versions: PUP 4.9.3 Assignee: Unassigned Created: 2017/02/28 1:32 PM Priority: Normal Reporter: Reinhard Vicinus The option :extension: 'yaml' from the hiera eyaml backend is ignored with puppet 4.9.x and files with the extension 'eyaml' are searched during key lookups. Worked without problems with puppet 4.8.x Add Comment
Jira (PUP-7209) puppet 4.9.1 still breaks hiera-eyaml
Title: Message Title Reinhard Vicinus commented on PUP-7209 Re: puppet 4.9.1 still breaks hiera-eyaml Sorry, if I should have rather reopened PUP-7169 . I was not sure which was the correct way to address this issue. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-7209) puppet 4.9.1 still breaks hiera-eyaml
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-7209 puppet 4.9.1 still breaks hiera-eyaml Issue Type: Bug Affects Versions: PUP 4.9.1 Assignee: Unassigned Created: 2017/02/12 1:45 AM Priority: Normal Reporter: Reinhard Vicinus hiera-eyaml is still broken with puppet 4.9.1. PUP-7169 only fixed the first part of the bug introduced with puppet 4.9.0. The second problem now is that if you configure a merge_behavior like deep or deeper then this is used for all lookups as default and forces a hash lookup in old v1 backends, which fails for non hash values. Here is a simple reproducer: hiera.yaml ---
Jira (PUP-6861) [regression] Mount options not idempotent
Title: Message Title Reinhard Vicinus commented on PUP-6861 Re: [regression] Mount options not idempotent Linux systems with upstart instead of systemd are also affected by this bug (like Ubuntu 14.04.). Also on this systems /etc/mtab is a regular file and not a link, so option two will not work there. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6422) puppet changed undef handling on resources
Title: Message Title Reinhard Vicinus commented on PUP-6422 Re: puppet changed undef handling on resources I reduced the code as much as possible to only show the problem. If you add the parameter ensure => file or something similar then /tmp/a gets created as expected, with puppet version 4.5.0: puppet apply -e 'ensure_resource("file", "/tmp/a", { ensure => file, owner => undef }) ensure_resource("file", "/tmp/a", { ensure => file, owner => undef })' Notice: Compiled catalog for test in environment production in 0.21 seconds Notice: /Stage[main]/Main/File[/tmp/a]/ensure: created Notice: Applied catalog in 0.20 seconds But defined_with_params only works in puppet version 4.5.0 with resources created with create_resources and not via standard puppet code declaration. with create_resources: puppet apply -e 'create_resources("file", { "/tmp/a" => { ensure => file, owner => undef }}) if defined_with_params(File["/tmp/a"], { ensure => file, owner => undef }) { notice("fine") } else { notice("not fine") }' Notice: Scope(Class[main]): fine Notice: Compiled catalog for test in environment production in 0.18 seconds
Jira (PUP-6422) ensure_resource not longer working with undef parameters
Title: Message Title Reinhard Vicinus commented on PUP-6422 Re: ensure_resource not longer working with undef parameters Sorry to bother but is any information still needed? Also does the change of the scrum team to modules mean, that stdlib module needs to be updated? If so the defined_with_params function works this way: ret = false if resource = findresource(reference.to_s) matches = params.collect do |key, value| resource[key] == value end ret = params.empty? || !matches.include?(false) end ret The problem is, that :undef is compared to nil. So I changed defined_with_params to work again as expected this way:
Jira (PUP-6422) ensure_resource not longer working with undef parameters
Title: Message Title Reinhard Vicinus commented on PUP-6422 Re: ensure_resource not longer working with undef parameters The code in questions extends the file resource and has the same parameters as the file resource with default value undef which are passed to the file resource. To work perfectly, my code would need that puppet could magically determine the intention of a value undef. I know that this is not possible. At the moment with puppet 4.5.0 and older versions, default values set with File { owner => 'root' } do not work, so the parameter is explicitly set to undef with puppet 4.5.0 and older versions. That is the expected behavior which seems to have changed between puppet 4.5.0 and 4.5.2. For a deeper understanding for what I do look at the create parent directories example. Add Comment This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6422) ensure_resource not longer working with undef parameters
Title: Message Title Reinhard Vicinus commented on PUP-6422 Re: ensure_resource not longer working with undef parameters Internally ensure_resource works like this: if !function_defined_with_params(["#{type}[#{item}]", params]) function_create_resources([type.capitalize, { item => params }]) end The documentation of create_resources doesn't say anything how it handles undef. I would expect, that it means that the attribute is set to undef, but I'm not sure. Add Comment This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to
Jira (PUP-6422) ensure_resource not longer working with undef parameters
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-6422 ensure_resource not longer working with undef parameters Issue Type: Bug Affects Versions: PUP 4.5.2 Assignee: Unassigned Created: 2016/06/21 7:32 AM Priority: Normal Reporter: Reinhard Vicinus With 4.5.2 the using ensure_resource not longer works with parameters which have the value undef: puppet apply -e 'ensure_resource("file", "/tmp/a", { owner => undef }) ensure_resource("file", "/tmp/a", { owner => undef })' Error: Evaluation Error: Error while evaluating a Function Call, Duplicate declaration: File[/tmp/a] is already declared; cannot redeclare at line 1:55 on node test
Jira (PUP-6328) Parsing of strings changes with puppet 4.5.0
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-6328 Parsing of strings changes with puppet 4.5.0 Issue Type: Bug Affects Versions: PUP 4.5.0 Assignee: Unassigned Components: Language Created: 2016/05/19 2:15 PM Priority: Normal Reporter: Reinhard Vicinus With Puppet 4.4.2 the following two code snippets work both: puppet apply -e 'notice(ubuntu)' Notice: Scope(Class[main]): ubuntu
Jira (PUP-6048) error running puppet with non existing and non default environment
Title: Message Title Reinhard Vicinus commented on PUP-6048 Re: error running puppet with non existing and non default environment I would at least also update the following section of the documentation: Assigning Environments Via the Agent’s Config File In puppet.conf on each agent node, you can set the environment setting in either the agent or main config section. And make it clear, that if the agent has no directory based environments, because it is no master node and uses only remote environments from the master nodes, then the environment should be set in the agent section of puppet.conf. Conversely if there are directory based environments, then setting the environment via the main section is the correct approach. I'm not sure if there are exceptions to this rule, at the moment I can't think of any. I closed the pull request and removed the link to it. Please let me know if that was a mistake, that I won't repeat it the next time. Add Comment
Jira (PUP-6078) The command line parameter --test has precendence over --no-show_diff
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-6078 The command line parameter --test has precendence over --no-show_diff Issue Type: Bug Affects Versions: PUP 4.3.2 Assignee: Kylo Ginsberg Components: Client Created: 2016/03/21 4:19 PM Priority: Minor Reporter: Reinhard Vicinus It's possible to disable show diff on the command line with --show_diff --no-show_diff. But --test --no-show_diff will not disable show diff. The later case would be useful, because sometimes you just don't want diffs but all other options included in the --test options. Add Comment
Jira (PUP-6048) error running puppet with non existing and non default environment
Title: Message Title Reinhard Vicinus commented on PUP-6048 Re: error running puppet with non existing and non default environment The environment does exist, but only on the puppet master nodes, on non puppet master nodes there is no need for environments at all (other then the configuration which environment on the puppet master should be used). Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6048) error running puppet with non existing and non default environment
Title: Message Title Reinhard Vicinus commented on PUP-6048 Re: error running puppet with non existing and non default environment My problem is, that as far as i can tell, it is a supported approach to configure on all puppet nodes, via the main section in the puppet.conf file, the environment to something other then production. If that is the case then, in my opinion, there should not be the need to setup the configured environment to use puppet help etc. on non puppet master nodes. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6048) error running puppet with non existing and non default environment
Title: Message Title Reinhard Vicinus commented on PUP-6048 Re: error running puppet with non existing and non default environment It's easily testable: install puppet agent on a new vm/computer test that puppet help works append non existing environment to configuration: echo "[main]" >> /etc/puppetlabs/puppet/puppet.conf echo "environment=test" >> /etc/puppetlabs/puppet/puppet.conf test that puppet help no longer works Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Jira (PUP-6048) error running puppet with non existing and non default environment
Title: Message Title Reinhard Vicinus commented on PUP-6048 Re: error running puppet with non existing and non default environment Here is a part of your environment documentation: Assigning Environments Via the Agent’s Config File In puppet.conf on each agent node, you can set the environment setting in either the agent or main config section. I would expect that if I assign a environment via the main config section, that then puppet help etc. will still work. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to
Jira (PUP-6048) error running puppet facts with non existing and non default environment
Title: Message Title Reinhard Vicinus commented on PUP-6048 Re: error running puppet facts with non existing and non default environment Only background information to this problem: We sometimes do a little consulting and a customer, for historical reasons, has no environment named production and therefore to be sure that production is never tried to use, all puppet nodes are setup with the following configuration: [main] environment = master That's were I found this problem, because running puppet facts on a node other then the puppet masters (where the environment master is present) throws this error. Running instead puppet facts --environment=production works even if there is no environment production present. Which is in my opinion not a sane behavior. But I have no problem if a other solution is preferred as long as the problem get fixed. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to
Jira (PUP-6048) error running puppet facts with non existing and non default environment
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-6048 error running puppet facts with non existing and non default environment Change By: Reinhard Vicinus Running:{noformat}puppet facts --environment=test{noformat}throws the following error if the environment directory don't exists:{noformat}/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'test' anywhere in the path: /etc/puppetlabs/code/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound){noformat}But if you remove /etc/puppetlabs/code/environments/production it still works for production because in puppet.rb a basic default environment is only created if the environment is named production: {code:java} # in case the configured environment (used for the default sometimes) # doesn't exist default_environment = Puppet[:environment].to_sym if default_environment == :productionloaders << Puppet::Environments::StaticPrivate.new( Puppet::Node::Environment.create(default_environment, basemodulepath, Puppet::Node::Environment::NO_MANIFEST)) end{code}I'm no expert on the puppet code, so I could miss something, but in my opinion a basic default environment should be created in every case. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe
Jira (PUP-6048) error running puppet facts with non existing and non default environment
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-6048 error running puppet facts with non existing and non default environment Change By: Reinhard Vicinus Running: {noformat} puppet facts --environment=test {noformat} throws the following error if the environment directory don't exists: {noformat} /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'test' anywhere in the path: /etc/puppetlabs/code/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound) {noformat} But if you remove /etc/puppetlabs/code/environments/production it still works for production because in puppet.rb a basic default environment is only created if the environment is named production: {code:java} # in case the configured environment (used for the default sometimes) # doesn't exist default_environment = Puppet[:environment].to_sym if default_environment == :productionloaders << Puppet::Environments::StaticPrivate.new( Puppet::Node::Environment.create(default_environment, basemodulepath, Puppet::Node::Environment::NO_MANIFEST)) end {code} I'm no expert on the puppet code, so I could miss something, but in my opinion a basic default environment should be created in every case. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs"
Jira (PUP-6048) error running puppet facts with non existing and non default environment
Title: Message Title Reinhard Vicinus assigned an issue to Reinhard Vicinus Puppet / PUP-6048 error running puppet facts with non existing and non default environment Change By: Reinhard Vicinus Assignee: Reinhard Vicinus Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6048) error running puppet facts with non existing and non default environment
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-6048 error running puppet facts with non existing and non default environment Issue Type: Bug Affects Versions: PUP 4.3.2 Assignee: Unassigned Created: 2016/03/13 3:26 AM Priority: Normal Reporter: Reinhard Vicinus Running: puppet facts --environment=test throws the following error if the environment directory don't exists: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:38:in `get!': Could not find a directory environment named 'test' anywhere in the path: /etc/puppetlabs/code/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound) But if you remove /etc/puppetlabs/code/environments/production it still works for production because in puppet.rb a basic default environment is only created if the environment is named production: in case the configured environment (used for the default sometimes) doesn't exist default_environment = Puppet[:environment].to_sym if default_environment == :production loaders << Puppet::Environments::StaticPrivate.new( Puppet::Node::Environment.create(default_environment, basemodulepath, Puppet::Node::Environment::NO_MANIFEST)) end
Jira (PUP-5979) function regsubst: allow a hash as replacement parameter
Title: Message Title Reinhard Vicinus assigned an issue to Reinhard Vicinus Puppet / PUP-5979 function regsubst: allow a hash as replacement parameter Change By: Reinhard Vicinus Assignee: Reinhard Vicinus Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5979) function regsubst: allow a hash as replacement parameter
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-5979 function regsubst: allow a hash as replacement parameter Change By: Reinhard Vicinus With puppet 3.x and a ruby version newer then 1.8 it was possible to give a hash as the replacement parameter to the function _regsubst_. As puppet 4.x ships with ruby 2.1 it would work now generally, but the parameter validation only accepts a String as replacement parameter.For example the following worked with puppet 3.x and will throw an error with puppet 4.x: {code:java} puppet apply -e 'notice(regsubst("tuto", "[uo]", { "u" => "o", "o" => "u" }, "G"))' {code} Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5979) function regsubst: allow a hash as replacement parameter
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5979 function regsubst: allow a hash as replacement parameter Issue Type: Bug Affects Versions: PUP 4.0.0 Assignee: Unassigned Components: Language Created: 2016/02/25 1:33 PM Priority: Normal Reporter: Reinhard Vicinus With puppet 3.x and a ruby version newer then 1.8 it was possible to give a hash as the replacement parameter to the function regsubst. As puppet 4.x ships with ruby 2.1 it would work now generally, but the parameter validation only accepts a String as replacement parameter. For example the following worked with puppet 3.x and will throw an error with puppet 4.x: puppet apply -e 'notice(regsubst("tuto", "[uo]", { "u" => "o", "o" => "u" } , "G"))'
Jira (PUP-4911) Parameters on exported resources consiting of an array with a single element are "de-arrayified"
Title: Message Title Reinhard Vicinus commented on PUP-4911 Re: Parameters on exported resources consiting of an array with a single element are "de-arrayified" From my site, this can be closed. I switched to puppet 4.x and there it works. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-4911) Parameters on exported resources consiting of an array with a single element are "de-arrayified"
Title: Message Title Reinhard Vicinus commented on PUP-4911 Re: Parameters on exported resources consiting of an array with a single element are "de-arrayified" Spontaneously I would say I run it with future parser off, because I'm pretty sure I would have mentioned if the future parser was active. But it's quite some time in the past and I don't have a puppet 3.x setup anymore for testing it. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5898) Data types seems to be messed up on hash parameters
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5898 Data types seems to be messed up on hash parameters Issue Type: Bug Affects Versions: PUP 4.3.2 Assignee: Unassigned Components: Language Created: 2016/02/13 3:48 AM Priority: Normal Reporter: Reinhard Vicinus The following code: define test ($b) { $a = { key => undef } notice("a: $a")
Jira (PUP-5898) Data types seems to be messed up on hash parameters
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-5898 Data types seems to be messed up on hash parameters Change By: Reinhard Vicinus The following code:{code :java }define test ($b) { $a = { key => undef } notice("a: $a") notice("b: $b") $a.each |Array $values| {notice("a values: $values") } $b.each |Array $values| {notice("b values: $values") }}$a = { key => undef }test { "test": b => $a,}{code}generates the following output if run with puppet apply:{code :java }puppet apply test.ppNotice: Scope(Test[test]): a: {key => }Notice: Scope(Test[test]): b: {key => }Notice: Scope(Test[test]): a values: [key, ]Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Method call, block parameter 'values' expects an Array value, got Tuple at /home/rvicinus/test.pp:8:5 at /home/rvicinus/test.pp:14 on node puppetmaster{code}I would expect that the second each statement would run like the first, because the supplied hash is absolutely equally created like the one provided to the first each statement. I think somehow assigning the hash to a parameter messes up the data types, because the code works as expected if the Array keyword in the second each statement is removed. This is also the workaround that I use. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to
Jira (PUP-5898) Data types seems to be messed up on hash parameters
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-5898 Data types seems to be messed up on hash parameters Change By: Reinhard Vicinus The following code:{code :java }define test ($b) { $a = { key => undef } notice("a: $a") notice("b: $b") $a.each |Array $values| {notice("a values: $values") } $b.each |Array $values| {notice("b values: $values") }}$a = { key => undef }test { "test": b => $a,}{code}generates the following output if run with puppet apply:{code}puppet apply test.ppNotice: Scope(Test[test]): a: {key => }Notice: Scope(Test[test]): b: {key => }Notice: Scope(Test[test]): a values: [key, ]Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Method call, block parameter 'values' expects an Array value, got Tuple at /home/rvicinus/test.pp:8:5 at /home/rvicinus/test.pp:14 on node puppetmaster{code}I would expect that the second each statement would run like the first, because the supplied hash is absolutely equally created like the one provided to the first each statement. I think somehow assigning the hash to a parameter messes up the data types, because the code works as expected if the Array keyword in the second each statement is removed. This is also the workaround that I use. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to
Jira (PUP-5734) Value of the key dependencies in the metadata.json of modules isn't checked
Title: Message Title Reinhard Vicinus assigned an issue to Reinhard Vicinus Puppet / PUP-5734 Value of the key dependencies in the metadata.json of modules isn't checked Change By: Reinhard Vicinus Assignee: Reinhard Vicinus Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5734) Value of the key dependencies in the metadata.json of modules isn't checked
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5734 Value of the key dependencies in the metadata.json of modules isn't checked Issue Type: Bug Affects Versions: PUP 4.3.1 Assignee: Unassigned Components: Language Created: 2016/01/21 8:29 AM Priority: Normal Reporter: Reinhard Vicinus With the following metadata.json in a module: { "name": "",
Jira (PUP-5635) accessing facts via another scope
Title: Message Title Reinhard Vicinus commented on PUP-5635 Re: accessing facts via another scope tested with puppet version 4.2.3. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5639) "free" parameter $name not useable for resource collection
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5639 "free" parameter $name not useable for resource collection Issue Type: Bug Affects Versions: PUP 4.2.3 Assignee: Unassigned Created: 2015/12/28 11:58 AM Priority: Normal Reporter: Reinhard Vicinus The "free" parameter $name that every resource along with $title gets and that defaults to $title if nothing is set can't be used for resource collection (if the default value is used). Here an example: when using "name" during resource collection, the parameter p doesn't get updated: puppet apply -e 'define test ($p) { notice("$name $p") } test { "a": p => "a" } Test <| name == "a" |> { p => "aa" }' Notice: Scope(Test[a]): a a
Jira (PUP-5635) accessing facts via another scope
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-5635 accessing facts via another scope Change By: Reinhard Vicinus Affects Version/s: PUP 4.2.3 Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5635) accessing facts via another scope
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5635 accessing facts via another scope Issue Type: Bug Assignee: Unassigned Created: 2015/12/22 1:36 PM Priority: Minor Reporter: Reinhard Vicinus It's possible to access a fact via another scope other then the currently active or top scope: class test::params {} class test ( timezone = $test::params::timezone, ) inherits params {
Jira (PUP-5592) hiera lookup regression in resource like class definitions with undef parameter
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-5592 hiera lookup regression in resource like class definitions with undef parameter Change By: Reinhard Vicinus Another regression with hiera lookups if classes are defined resource like and a parameter is configured undef. With prior versions a hiera lookup happened for this parameter. With 4.3.x no lookup occurs. Short reproducer:* hiera.yaml:{code:java}---:backends: - yaml:hierarchy: - global:yaml: :datadir: "/etc/puppetlabs/code/hiera"{code}* /etc/puppetlabs/code/hiera/global.yaml:{code:java}test::p: 'hiera value'{code}* test module: /etc/puppetlabs/code/modules/test/manifests/init.pp:{code:java}class test ( $p = 'default module value',) { notice($p)}{code}with puppet 4.3.1:{code:java}puppet apply --hiera_config [..]/hiera.yaml --modulepath=/etc/puppetlabs/code/modules -e 'class { "test": p => undef }'Notice: Scope(Class[Test]): default module valueNotice: Compiled catalog for puppet4.3.1 in environment production in 0.10 seconds{code}with puppet 4.2.3:{code:java}puppet apply --hiera_config [..]/hiera.yaml --modulepath=/etc/puppetlabs/code/modules -e 'class { "test": p => undef }'Notice: Scope(Class[Test]): hiera valueNotice: Compiled catalog for puppet4.2.3 in environment production in 0.65 seconds{code}And an example were this happens in the wild is the module jfryman-nginx with the parameter migration from parameters like server_tokens from init.pp to config.pp (an example parameter is server_tokens among others) . Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Jira (PUP-5592) hiera lookup regression in resource like class definitions with undef parameter
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5592 hiera lookup regression in resource like class definitions with undef parameter Issue Type: Bug Affects Versions: PUP 4.3.1, PUP 4.3.0 Assignee: Unassigned Created: 2015/12/10 2:45 AM Priority: Normal Reporter: Reinhard Vicinus Another regression with hiera lookups if classes are defined resource like and a parameter is configured undef. With prior versions a hiera lookup happened for this parameter. With 4.3.x no lookup occurs. Short reproducer: hiera.yaml: --- :backends:
Jira (PUP-5590) No error on duplicate parameters on classes and resources
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5590 No error on duplicate parameters on classes and resources Issue Type: Bug Affects Versions: PUP 4.3.0, PUP 3.8.2 Assignee: Unassigned Components: Language Created: 2015/12/09 7:38 AM Priority: Normal Reporter: Reinhard Vicinus I think that the following is a bug: class test ( $a = 'first',
Jira (PUP-5525) Hiera special pseudo-variables breaking with puppet 4.3
Title: Message Title Reinhard Vicinus updated an issue Puppet / PUP-5525 Hiera special pseudo-variables breaking with puppet 4.3 Change By: Reinhard Vicinus Summary: hiera Hiera special pseudo-variables breaking with puppet 4.3 Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5525) hiera
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-5525 hiera Issue Type: Bug Affects Versions: PUP 4.3.0 Assignee: Unassigned Created: 2015/11/20 5:00 AM Priority: Normal Reporter: Reinhard Vicinus puppet 4.3.0 breaks hiera Special Pseudo-Variables like calling_module. reproduce: hiera.yaml: — :backends: yaml :hierarchy: modules/% {calling_module} global :yaml: :datadir: "/etc/puppetlabs/code/hiera" /etc/puppetlabs/code/hiera/modules/test.yaml: test::p1: 'hiera value' test module: /etc/puppetlabs/code/modules/test/manifests/init.pp: class test ( $p1 = "default module value" ) { notice($p1) } with puppet 4.3.0: puppet apply --hiera_config [...]/hiera.yaml --modulepath=/etc/puppetlabs/code/hiera/modules -e
Jira (PUP-4911) Parameters on exported resources consiting of an array with a single element are de-arrayified
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-4911 Parameters on exported resources consiting of an array with a single element are de-arrayified Issue Type: Bug Affects Versions: PUP 3.8.1 Assignee: Unassigned Created: 2015/07/21 8:59 AM Priority: Normal Reporter: Reinhard Vicinus If a exported resource with a parameter consisting of an array with a single value is defined on one puppet node and then collected on another puppet node the array with the single value is de-arrayified. Example: define profiles::vres ( $dummy, ) { if is_array($dummy) { notify { array_$title: message = join($dummy, '_'), } } else { notify { nonarray_$title: message = NOT AN ARRAY: $dummy, } } } on one server: @@profiles::vres { arraywithonevalue: dummy = [ a, ], } on another server: Profiles::Vres | | result of collecting the resource: Notice: NOT AN ARRAY: a Notice: /Stage[main]/Roles::Collectvres/Profiles::Vres[arraywithonevalue]/Notify[nonarray_arraywithonevalue]/message: defined 'message' as 'NOT AN ARRAY: a' This is probably related to PUP-1299
Jira (PUP-4806) Add a variable with the chosen environmentpath
Title: Message Title Reinhard Vicinus commented on PUP-4806 Re: Add a variable with the chosen environmentpath I think you misunderstood my intention or I wasn't clear enough. So let me explain further what I do and how I think this feature would improve puppet. I have different hierdata for every environment. To do this I had configured in the hiera.yaml: :datadir: /etc/puppet/environments/%{::environment}/hieradata Now for some reasons I'm forced to use different environment locations with the environmentpath configuration value in puppet.conf and the above isn't working anymore. But I'm able to do it with some not so clean configuration still: In the manifests of every environment i define (exists is a ruby function which checks if a file exists on the puppet master): if exists(/etc/puppet/environmentpath1/$environment) { $environmentpath = /etc/puppet/environmentpath1 } elsif exists(/etc/puppet/environmentpath2/$environment) { $environmentpath = /etc/puppet/environmentpath2 } else { $environmentpath = /etc/puppet/environments } and in the hiera.yaml: :datadir: %{::environmentpath}/%{::environment}/hieradata It certainly works but it's a pain in the ass and it would be a lot cleaner if a puppet run knew which environment path was used instead to have to determine it. Also it would be needed in the environment.conf, because in the past I was able to use: config_version = /usr/bin/git --git-dir /etc/puppet/environments/$environment/.git describe --long --all now I'm forced to use a shell script to replicate the same environment path determination as is done in the manifests file. Add Comment This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Jira (PUP-4806) Add a variable with the chosen environmentpath
Title: Message Title Reinhard Vicinus created an issue Puppet / PUP-4806 Add a variable with the chosen environmentpath Issue Type: New Feature Affects Versions: PUP 3.8.1 Assignee: Unassigned Created: 2015/07/01 1:55 AM Priority: Normal Reporter: Reinhard Vicinus It's possible to define multiple paths in the environmentpath configuration value, where puppet looks for environments. But afterwards during a puppet run, it isn't possible to determine easily which path was chosen. But there are at least two occurrences where the absolute path to a environment is needed: 1.) Configure hiera datadir per environment 2.) Configure config_version per environment I would suggest, that a variable is added to the top scope which contains the chosen path to the environment from the environmentpath configuration value and is also useable in the per environment environment.conf. Add Comment
Jira (HI-120) Allow wildcards in hierarchy
Title: Message Title Reinhard Vicinus commented on an issue Re: Allow wildcards in hierarchy I'm only another puppet/hiera user who stumbled upon your feature request and have no standing with puppetlabs whatsoever. But there are some problems I see with your request: 1.) Puppet multi master setups can generate different catalogs for the same node, because Dir.glob returns the files in an order dependent on the system it is run on. As far as i can tell, the result of Dir.glob isn't sorted in any way in your pull request, so on different masters the order can be different and therefore the hierachy. 2.) This change breaks all other hiera backends (yaml, etc) as far as I can tell. 3.) I can see only one valid use case for this behavior: To realize two or more independent projects on one node. I concede that this isn't possible at the moment, as far as I know, because it isn't possible to redeclare variables in puppet (with the exception, if all projects are configured in independent puppet modules the special variable %calling_module can be used in the hierarchy). I wrote my own puppet hiera connector to solve (among others) this problem. I considered your approach also, but discarded it because as the count of projects increase the performance will get terrible (for every hiera lookup up every time all projects have to be questioned). Also there is no hierarchy between independent projects, why create one? Add Comment Hiera / HI-120 Allow wildcards in hierarchy It would be great to allow wildcards when defining the hierarchy in hiera.yaml. Example: In want to have a directory tree like this: hiera/project-name/common.json hiera/project-name/webservers.json But the number of projects is variable. So I want to define a hiera.yaml like: :backends: - json :json: :datadir: /tmp/pruebas-hiera/hie...