Jira (PUP-8329) Functions not found when dependencies aren't listed.
Title: Message Title Craig Dunn created an issue Puppet / PUP-8329 Functions not found when dependencies aren't listed. Issue Type: Bug Assignee: Unassigned Created: 2018/01/08 6:55 AM Priority: Normal Reporter: Craig Dunn Puppet Version: 4.10.1 - 5.3.3 (tested) There is confusing behaviour around calling functions (new ruby API) from other modules depending of the existence and contents of the calling modules metadata.json file. If a module contains a globally namespaced function, eg: # /myfunc/lib/puppet/functions/foo.rb Puppet::Functions.create_function(:foo) do ... And
Jira (PUP-7507) puppet lookup --facts can't modify $facts hash
Title: Message Title Craig Dunn commented on PUP-7507 Re: puppet lookup --facts can't modify $facts hash I'm seeing this problem too. Configuration of Hiera [root@puppet /]# cat /etc/puppetlabs/code/environments/production/hiera.yaml --- version: 5 defaults: datadir: data data_hash: yaml_data hierarchy: - name: "env"
Jira (HI-582) Make hiera.yaml aware of key
Title: Message Title Craig Dunn commented on HI-582 Re: Make hiera.yaml aware of key Laura Macchi Thanks for bringing this up - yes the current 2.x hiera-mysql end is no longer compatible with Hiera 5, I don't think it's worth rolling a fix into the 2.x code because if people are on Hiera 5 they should be migrating to Hiera 5 configs, and since the issue doesn't affect anyone on Puppet < 4.9, I think the best way is to move forward with a Hiera 5 backend I've just released hiera-mysql 3.0.0 (https://forge.puppet.com/crayfishx/hiera_mysql/readme) - this will take a little more configuration on your side as you'll need to migrate your existing Hiera 3 config to Hiera 5 (https://docs.puppet.com/puppet/5.1/hiera_migrate.html). Using this version you will be able to interpolate keys into your query with "_KEY_". There are also some other features that weren't available before that you might find useful. Please read the README on the module with regards to behaviour of lookups as there may be some subtle differences to take into account. Note also that hiera-mysql 3.0.0 is shipped as a Puppet module, not a gem (although the gem dependencies are unchanged) I'm happy to help with any issues you have with this or any features you think this backend should have. Feel free to reach out to me. Regards Craig 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-7541) Explore removing export / collect / virtual / realize syntax
Title: Message Title Craig Dunn commented on PUP-7541 Re: Explore removing export / collect / virtual / realize syntax I think generally speaking the use of export/collect and virtualize/realize are in decline in the wild - there are certainly very few Forge modules that use the pattern and I think there are sufficient replacement patterns now that achieve the desired result, so I'm not against moving to deprecate that specific functionality - however, resource collectors also are used to set dependencies with chaining and this is something that would break a lot of stuff. I think PUP-6712 should be linked into this issue - as that would enable the retention of chaining functionality whilst also deprecating the collector syntax. 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-7641) Hiera 5 Global level is looked up even when not configured
Title: Message Title Craig Dunn commented on PUP-7641 Re: Hiera 5 Global level is looked up even when not configured Henrik Lindberg Thanks for the clarification. Whilst I agree this can be solved by documentation, I would suggest that this should also be behaviour that should be changed. As a user it would make more sense to me if Puppet did nothing if there was no global level hiera.yaml and Puppet initially shipped/installed with a default hiera.yaml that the user can remove if they do not want any global level lookup. The fix you suggest (touching an empty hiera.yaml file) doesn't feel like a clean way going forward to me. 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 (HI-573) Global level is looked up even when not configured
Title: Message Title Craig Dunn created an issue Hiera / HI-573 Global level is looked up even when not configured Issue Type: Bug Assignee: Unassigned Created: 2017/06/09 2:51 AM Priority: Major Reporter: Craig Dunn I recently got stumped doing a training course trying to demonstrate moving global data to the environment layer and came across this behaviour - If this is intended behaviour then it really needs to be documented well because (for me) this was seems really confusing. Summary Lookups will always prioritise data found in /etc/puppetlabs/puppet/data/ even if no global level lookup has been configured. Set up Version 4.10.1 [root@devagent puppetlabs]# puppet -V 4.10.1 One hiera.yaml file at the environment level - no global configuration file.
Jira (PUP-6922) Types that ruby require other types can cause failure
Title: Message Title Craig Dunn commented on PUP-6922 Re: Types that ruby require other types can cause failure Henrik Lindberg Thomas Hallgren thanks for the input, i've done some very preliminary testing using Puppet::Type.type(:foo) and it does appear to work for me, at least for my use case. 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-6922) Types that ruby require other types can cause failure
Title: Message Title Craig Dunn commented on PUP-6922 Re: Types that ruby require other types can cause failure Thanks Thomas Hallgren The (potential) problem with this is that under certain circumstances, I think when the puppet master is not pluginsynced or in certain puppet apply scenarios that Puppet can't find the type unless it's specifically references with it's fully qualified path, this was the reason for basing the require on _FILE_ in the first place after this was spotted in https://github.com/crayfishx/puppet-firewalld/issues/78 That issue is quite old and on Puppet 3 and i'll need to verify that we won't re-introduce that issue... I'll test your suggestion in a variety of scenarios and see if it does what we need. In the meantime, a quick work around for the above I came up with was: require File.join(File.dirname(__FILE__),'test_one') unless defined?(Puppet::Type::Test_one) That appears to pass without error. 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
Jira (PUP-6922) Types that ruby require other types can cause failure
Title: Message Title Craig Dunn commented on PUP-6922 Re: Types that ruby require other types can cause failure It might sound familiar because of PUP-6653 but this seems to be a different issue (but same error) 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-6922) Types that ruby require other types can cause failure
Title: Message Title Craig Dunn commented on PUP-6922 Re: Types that ruby require other types can cause failure Henrik Lindberg Tested on 4.8.0 and still behaves the same Craigs-MacBook-Pro:testmodule craigdunn$ puppet -V 4.8.0 Craigs-MacBook-Pro:testmodule craigdunn$ puppet apply --modulepath /tmp -e 'include testmodule::broken' Error: Could not autoload puppet/type/test_two: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/test_one'. Originally set at file:/tmp/testmodule/lib/puppet/type/test_one.rb?line=1. Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/test_two: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/test_one'. Originally set at file:/tmp/testmodule/lib/puppet/type/test_one.rb?line=1. at /tmp/testmodule/manifests/broken.pp:7:3 on node craigs-macbook-pro.local Craigs-MacBook-Pro:testmodule craigdunn$ puppet apply --modulepath /tmp -e 'include testmodule::working'
Jira (PUP-6922) Types that ruby require other types can cause failure
Title: Message Title Craig Dunn commented on PUP-6922 Re: Types that ruby require other types can cause failure Update, this issue appeared from Puppet 4.5.0 onwards, <= 4.4.2 this worked. 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-6922) Types that ruby require other types can cause failure
Title: Message Title Craig Dunn updated an issue Puppet / PUP-6922 Types that ruby require other types can cause failure Change By: Craig Dunn ### h2. BackgroundI first saw this issue reported in https://github.com/crayfishx/puppet-firewalld/issues/93 - some resource types need to be able to talk to providers of other resources, such a {{firewalld_direct_purge}} in this module. This requires making sure that the type is loaded when this code runs, historically I've always seen this done something like{code}require File.join(File.dirname(__FILE__),'other_type'){code}With the new resource types system, this seems to break, but only under some circumstances. When the resource type requiring the other type is evaluated first in the manifest, there is never a problem, but when the required resource type is evaluated before the one that requires it, it causes Puppet to throw an error such as:{code}Error: Could not autoload puppet/type/test_two: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/test_one'. Originally set at file:/etc/puppetlabs/code/environments/production/modules/testmodule/lib/puppet/type/test_one.rb?line=1.{code} ### h2. SimulatingThis was a bit complex to try and write up in a ticket, so I've created a tiny test module on github that isolates this problem, details in the READMEPlease see:https://github.com/crayfishx/testmodule_demo_codeIf I drop the require statements then the code passes, but that opens up the possibility that the required type has not been loaded when I need to access it's provider, and raises issues for puppet applyetc so I'm not sure how to solve this Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Jira (PUP-6922) Types that ruby require other types can cause failure
Title: Message Title Craig Dunn created an issue Puppet / PUP-6922 Types that ruby require other types can cause failure Issue Type: Bug Assignee: Unassigned Created: 2016/11/16 3:34 AM Priority: Major Reporter: Craig Dunn Background I first saw this issue reported in https://github.com/crayfishx/puppet-firewalld/issues/93 - some resource types need to be able to talk to providers of other resources, such a firewalld_direct_purge in this module. This requires making sure that the type is loaded when this code runs, historically I've always seen this done something like require File.join(File.dirname(__FILE__),'other_type')
Jira (PUP-5297) Identically named parameters on class
Title: Message Title Craig Dunn commented on PUP-5297 Re: Identically named parameters on class This was resolved in PUP-5590 (version 3.8.5 / 4.3.2) 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-6712) Arrays in resource chaining
Title: Message Title Craig Dunn commented on PUP-6712 Re: Arrays in resource chaining Totally agreed. <||> should imply collection, where as Resource implies reference. therefore Foo -> Bar implies referencing and setting relationships, but not collection. That way I can do: Yumrepo -> Package ... and not care if some modules are using virtualized package resources, since they won't get realized with the above syntax. I realise this is off topic from the original ticket, but this would be a really nice side effect 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-6712) Arrays in resource chaining
Title: Message Title Craig Dunn commented on PUP-6712 Re: Arrays in resource chaining But Foo -> Bar would presumably be a nice way to set resource dependancies without collecting virtual resources. It's always bothered me that the two are so intertwined. 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-6712) Arrays in resource chaining
Title: Message Title Craig Dunn commented on PUP-6712 Re: Arrays in resource chaining Out of interest, by definition, if the above syntax would work then could I also replace Yumrepo<||> -> Package <||> With simply; Yumrepo -> Package That would be a really nice side effect, since adding the <||> when there is no filter is tiresome. 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
Jira (PUP-6712) Arrays in resource chaining
Title: Message Title Craig Dunn commented on PUP-6712 Re: Arrays in resource chaining Henrik Lindberg That would probably solve 99% of the use cases that I've seen - so my above example would become $fw_resources = [ Firewalld_zone, Firewalld_rich_rule, Firewalld_service, Firewalld_port, Firewalld_direct_chain, Firewalld_direct_rule, Firewalld_direct_passthrough ] Service['firewalld'] -> $fw_resources ~>
Jira (PUP-6712) Arrays in resource chaining
Title: Message Title Craig Dunn commented on PUP-6712 Re: Arrays in resource chaining Nope It lets you declare the variable $foo = [ File, Service ] But when you try and use it in a chain $foo -> Notify<||> Error: Could not find resource 'File[]' for relationship on 'Notify[bar]' on node localhost.localdomain Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Jira (PUP-6712) Arrays in resource chaining
Title: Message Title Craig Dunn commented on PUP-6712 Re: Arrays in resource chaining Henrik Lindberg That might work for individual resource references (eg Foo['bar']) but for using collector syntax chaining this wouldn't work $foo = [ File<||> ] Error: Could not parse for environment production: Invalid use of _expression_. A Virtual Query does not produce a value at /root/foo.pp:1:10 on node localhost.localdomain So your pattern is nice, but it wouldn't help these particular use cases. 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,
Jira (PUP-6712) Arrays in resource chaining
Title: Message Title Craig Dunn created an issue Puppet / PUP-6712 Arrays in resource chaining Issue Type: New Feature Assignee: Unassigned Components: Language Created: 2016/09/19 7:05 AM Priority: Normal Reporter: Craig Dunn There are a number of use cases where lots of different resource types need to require and notify the same things... eg Foo <||> -> Resource_one<||> ~> Bar<||> Foo <||> -> Resource_two<||> ~> Bar<||> Foo <||> -> Resource_three<||> ~> Bar<||>
Jira (PUP-6576) What's the deal with data_binding_terminus? Deprecate?
Title: Message Title Craig Dunn commented on PUP-6576 Re: What's the deal with data_binding_terminus? Deprecate? Henrik Lindberg I think the number of people/projects using something external for data_binding_terminus is very low, maybe only the three that RI mentioned. Is the existing implementation of environment data providers (as I implemented above) going to go away? or it this still an unknown? 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-6576) What's the deal with data_binding_terminus? Deprecate?
Title: Message Title Craig Dunn commented on PUP-6576 Re: What's the deal with data_binding_terminus? Deprecate? Henrik Lindberg As for R.I.Pienaar's last example, it doesn't seem too hard (right now) to implement the same behaviour using environment data providers I have been playing around with this (rather crude and experimental) example to use the new environment data provider API instead of plugging directly into data_binding_terminus: https://github.com/crayfishx/puppet-jerakia/commit/fe67a4609915999ceff777fa5c586ddcdb6688a6 So far my smoke testing has been successful with that approach, I guess it depends on whatever is going to happen with "global level" 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-6608) variable scoping change in Puppet 4.6.0
Title: Message Title Craig Dunn commented on PUP-6608 Re: variable scoping change in Puppet 4.6.0 +1 on this being critical I also see the same behaviour without using strict_variables, it works with include, but a class declaration fails. Craigs-MacBook-Pro:modules craigdunn$ puppet config print strict_variables false include testmodule notify { "value ${testmodule::somevar}": } Notice: /Stage[main]/Main/Notify[value bar]/message: defined 'message' as 'value bar' class { 'testmodule': } notify { "value ${testmodule::somevar}": }
Jira (PUP-1591) isrequired not supported for newparam, newproperty (in types).
Title: Message Title Craig Dunn commented on PUP-1591 Re: isrequired not supported for newparam, newproperty (in types). Is there a more streamlined workaround for this yet or is Ben Ford's top level validate method (from the linked ticket) still the best way to define mandatory parameters? 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-5926) Service resource ignoring status override.
Title: Message Title Craig Dunn commented on PUP-5926 Re: Service resource ignoring status override. After some further digging, explicitly setting the provider to base overcomes my issue and the code behaves as I expect. I can't find any supporting documentation for the difference though - so either other providers are not working as they should or the docs should be updated to demonstrate that you need to call the base provider to use these parameters. 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-5926) Service resource ignoring status override.
Title: Message Title Craig Dunn created an issue Puppet / PUP-5926 Service resource ignoring status override. Issue Type: Bug Assignee: Kylo Ginsberg Components: Types and Providers Created: 2016/02/19 3:29 AM Priority: Major Reporter: Craig Dunn I'm seeing some odd behaviour when trying to override the status command of a service which seems to be being ignored. According to the docs, setting {{ hasstatus }} to {{ false }} and adding a custom command to the {{ status }} attribute should allow me to fine tune how Puppet tries to determine if my service is running... If a service’s init script does not support any kind of status command, you should set hasstatus to false and either provide a specific command using the status attribute or expect that Puppet will look for the service name in the process table. and for {{ status }}... Specify a status command manually. This command must return 0 if the service is running and a nonzero value otherwise. I've boiled my problem down to the following example code
Jira (HI-484) parse_string doesnt interpolate %{key} with Puppet 4.0
Title: Message Title Craig Dunn commented on HI-484 Re: parse_string doesnt interpolate %{key} with Puppet 4.0 Thomas Hallgren You appear to be correct here scope['key'] returns true Puppet 3 Debug: Runtime environment: puppet_version=3.8.4, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8 Debug: hiera(): Scope contains key? true Debug: hiera(): unparsed: foo bar % {key} to parsed: foo bar test::my_key Puppet 4 Debug: Runtime environment: puppet_version=4.0.0, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8 Debug: hiera(): Scope contains key? true Debug: hiera(): unparsed: foo bar %{key} to parsed: foo bar Hiera CLI DEBUG: 2015-12-04 08:37:30 +0100: Scope contains key? false DEBUG: 2015-12-04 08:37:30 +0100: unparsed: foo bar % {key} to parsed: foo bar my_key This supports your theory, assuming the scope['key'] has always returned true, but in Puppet 3.x this was considered an non-valid value and therefore ignored and the extra_data value used, but in Puppet 4.x because it's considered legal it's being interpolated into the hash This lead me to do a bit more digging - the problem is not related soley to interpolating %{key} . For some reason, `scope.include?('anything')` always returns true, therefore values from the extra_hash are never interpolated thus breaking this option entirely. scope.include?('askdjhajh') => true Hiera::Scope in puppet//lib/hiera/scope.rb has the following method def include?(key) if key == CALLING_CLASS or key == CALLING_MODULE true else @real.lookupvar(key) != "" end end If real.lookupvar returns nil then the method will return true since nil != "" - this is as far as I've got with it This has been reported by two different users of hiera-mysql and hiera-http so far, so it's clearly a behaviour that people need. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Jira (HI-484) parse_string doesnt interpolate %{key} with Puppet 4.0
Title: Message Title Craig Dunn commented on HI-484 Re: parse_string doesnt interpolate %{key} with Puppet 4.0 Yep - just tested with exist? and that appears to behave better - will submit a PR against it now. 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 (HI-484) parse_string doesnt interpolate %{key} with Puppet 4.0
Title: Message Title Craig Dunn commented on HI-484 Re: parse_string doesnt interpolate %{key} with Puppet 4.0 Thomas Hallgren I'm happy to do the PR - is it fair to say that a nil value in the scope should not be considered valid by hiera even though it's valid within Puppet 4.0. eg: Return true unless nil or ""? 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 (HI-484) parse_string doesnt interpolate %{key} with Puppet 4.0
Title: Message Title Craig Dunn commented on HI-484 Re: parse_string doesnt interpolate %{key} with Puppet 4.0 Thomas Hallgren submitted, https://github.com/puppetlabs/puppet/pull/4482 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 (HI-484) parse_string doesnt interpolate %{key} with Puppet 4.0
Title: Message Title Craig Dunn created an issue Hiera / HI-484 parse_string doesnt interpolate %{key} with Puppet 4.0 Issue Type: Bug Assignee: Unassigned Created: 2015/12/02 12:37 AM Priority: Major Reporter: Craig Dunn Several backends need to pass % {key} to `Backend.parse_string` in order for it to get interpolated, hiera-http and hiera-mysql are both examples of this. In Puppet 4.0 the %{key} does not get interpolated (regardless of the hiera version) but running hiera from the command line does work. So I'm unsure if this is a PUPPET or HIERA issue, but I'm filing it here to start with. Please see https://github.com/crayfishx/hiera-http/issues/38 for a detailed description Add Comment
Jira (HI-485) Lookup key is empty if it contains a dot in Puppet 4.0
Title: Message Title Craig Dunn created an issue Hiera / HI-485 Lookup key is empty if it contains a dot in Puppet 4.0 Issue Type: Bug Assignee: Unassigned Created: 2015/12/02 1:26 AM Priority: Major Reporter: Craig Dunn Summary Im not sure if this should be filed as HI or PUP... If you try and look up a key containing a dot (eg: `foo.bar`) the lookup key is sent to the lookup method of the backend as a blank string under Puppet 4.0. Testing To test this, take the following dummy backend. ```ruby class Hiera module Backend class Dummy_backend def lookup(key, scope, order_override, resolution_type, context={}) Hiera.debug("Key is # {key} of type # {key.class} ") return { } end end end end ``` And the following puppet manifest ```puppet class test { $foo=hiera('with.dot','aa') $bar=hiera('without_dot','bb') } include test Results On Puppet 3.8.4 with Hiera 1.3.4, 2.0.0 and 3.0.5 I I see the following: ``` Debug: hiera(): Key is with.dot of type String Debug: hiera(): Key is without_dot of type String ```
Jira (HI-485) Lookup key is empty if it contains a dot in Puppet 4.0
Title: Message Title Craig Dunn updated an issue Hiera / HI-485 Lookup key is empty if it contains a dot in Puppet 4.0 Change By: Craig Dunn h3. SummaryIm not sure if this should be filed as HI or PUP...If you try and look up a key containing a dot (eg: `foo.bar`) the lookup key is sent to the lookup method of the backend as a blank string under Puppet 4.0.h3. TestingTo test this, take the following dummy backend. ```ruby class Hiera module Backend class Dummy_backend def lookup(key, scope, order_override, resolution_type, context={}) Hiera.debug("Key is #{key} of type #{key.class}") return { } end end endend ``` And the following puppet manifest ```puppet class test { $foo=hiera('with.dot','aa') $bar=hiera('without_dot','bb')}include test## ResultsOn Puppet 3.8.4 with Hiera 1.3.4, 2.0.0 and 3.0.5 I I see the following: ``` Debug: hiera(): Key is with.dot of type StringDebug: hiera(): Key is without_dot of type String ``` However on Puppet 4.0 the key for "with.dot" is empty: ``` Debug: hiera(): Key is with of type StringDebug: hiera(): Key is without_dot of type String ``` 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
Jira (HI-485) Lookup key is truncated if it contains a dot in Puppet 4.0
Title: Message Title Craig Dunn updated an issue Hiera / HI-485 Lookup key is truncated if it contains a dot in Puppet 4.0 Change By: Craig Dunn Summary: Lookup key is empty truncated if it contains a dot in Puppet 4.0 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 (HI-485) Lookup key is empty if it contains a dot in Puppet 4.0
Title: Message Title Craig Dunn updated an issue Hiera / HI-485 Lookup key is empty if it contains a dot in Puppet 4.0 Change By: Craig Dunn h3. SummaryIm not sure if this should be filed as HI or PUP...If you try and look up a key containing a dot (eg: `foo.bar`) the lookup key is sent to the lookup method of the backend as a blank string under Puppet 4.0.h3. TestingTo test this, take the following dummy backend.{code:ruby}class Hiera module Backend class Dummy_backend def lookup(key, scope, order_override, resolution_type, context={})Hiera.debug("Key is #{key} of type #{key.class}") return { } end end endend{code}And the following puppet manifest{code}class test { $foo=hiera('with.dot','aa') $bar=hiera('without_dot','bb')}include test{code} ## h3. ResultsOn Puppet 3.8.4 with Hiera 1.3.4, 2.0.0 and 3.0.5 I I see the following:{noformat}Debug: hiera(): Key is with.dot of type StringDebug: hiera(): Key is without_dot of type String{noformat}However on Puppet 4.0 the key for "with.dot" is empty:{noformat}Debug: hiera(): Key is with of type StringDebug: hiera(): Key is without_dot of type String{noformat} 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 (HI-485) Lookup key is empty if it contains a dot in Puppet 4.0
Title: Message Title Craig Dunn updated an issue Hiera / HI-485 Lookup key is empty if it contains a dot in Puppet 4.0 Change By: Craig Dunn h3. SummaryIm not sure if this should be filed as HI or PUP...If you try and look up a key containing a dot (eg: `foo.bar`) the lookup key is sent to the lookup method of the backend as a blank string under Puppet 4.0.h3. TestingTo test this, take the following dummy backend. {code:ruby} class Hiera module Backend class Dummy_backend def lookup(key, scope, order_override, resolution_type, context={})Hiera.debug("Key is #{key} of type #{key.class}") return { } end end endend {code} And the following puppet manifest {code} class test { $foo=hiera('with.dot','aa') $bar=hiera('without_dot','bb')}include test {code} ## ResultsOn Puppet 3.8.4 with Hiera 1.3.4, 2.0.0 and 3.0.5 I I see the following: {noformat} Debug: hiera(): Key is with.dot of type StringDebug: hiera(): Key is without_dot of type String {noformat} However on Puppet 4.0 the key for "with.dot" is empty: {noformat} Debug: hiera(): Key is with of type StringDebug: hiera(): Key is without_dot of type String {noformat} 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 (HI-485) Lookup key is truncated if it contains a dot in Puppet 4.0
Title: Message Title Craig Dunn updated an issue Hiera / HI-485 Lookup key is truncated if it contains a dot in Puppet 4.0 Change By: Craig Dunn h3. SummaryIm not sure if this should be filed as HI or PUP...If you try and look up a key containing a dot (eg: `foo.bar`) the lookup key is sent to the lookup method of the backend as a blank string under is truncated after the first "." Puppet 4.0.h3. TestingTo test this, take the following dummy backend.{code:ruby}class Hiera module Backend class Dummy_backend def lookup(key, scope, order_override, resolution_type, context={})Hiera.debug("Key is #{key} of type #{key.class}") return { } end end endend{code}And the following puppet manifest{code}class test { $foo=hiera('with.dot','aa') $bar=hiera('without_dot','bb')}include test{code}h3. ResultsOn Puppet 3.8.4 with Hiera 1.3.4, 2.0.0 and 3.0.5 I I see the following:{noformat}Debug: hiera(): Key is with.dot of type StringDebug: hiera(): Key is without_dot of type String{noformat}However on Puppet 4.0 the key for "with.dot" is empty is just "with" :{noformat}Debug: hiera(): Key is with of type StringDebug: hiera(): Key is without_dot of type String{noformat} 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
Jira (PUP-4332) Resource properties frozen if copied from $title
Title: Message Title Craig Dunn updated an issue Puppet / PUP-4332 Resource properties frozen if copied from $title Change By: Craig Dunn Thereissomestrangebehaviourwhencreatinguserresourcesfromadefinedtypeviathecreate_resourcesfunction.Takethisexample;{code:title=manifests/accounts.pp}defineaccount($comment=$title,$uid,){user{$title:ensure=present,comment=$comment,}}{code}Notethatthe$commentvariabledefaultsto$title.Thefailurehappenswhenyoutryandusecreate_resourcestospinoffinstancesoftheaccountdefinedtypewithoutsupplyingcomment{code:title=Workingasexpected}account{'test1':uid='2022'}$accounts2={'test23'={'uid'='2024','comment'='foo'}}create_resources('account',$accounts2){code}However,ifweusecreate_resourceswithoutthecomment,IwouldexpectthesamebehaviourIgetwhendeclaringtheresourceusingthedefaultfor$comment(firstexampleabove),howeverthisfails...{code}$accounts={'test2'={'uid'='2023'}}create_resources('account',$accounts)Error:ParametercommentfailedonUser[ troot test2 ]:Mungingfailedforvalue troot test2 inclasscomment:can'tmodifyfrozenStringat...Wrappedexception:Mungingfailedforvalue troot test2 inclasscomment:can'tmodifyfrozenString{code}Itlookslikethe[Thischange|https://github.com/puppetlabs/puppet/commit/065c4f5b5c78ca8f16c189b55051681beb1c5052]aspartofPUP-1473highlightedtheissue.Itappearsthatinthelastscenario,thecommentparameterendsupafrozenstringbecauseitwascopiedfrom$titleandthiscausesforce_encodingtothrowanerror,butIonlyseemtoobservethisbehaviourusingcreate_resources.SoalthoughImseeingtheproblemintheuserstype,Isuspecttherootcausetobeelsewhere-thecommentpropertyshouldnotbefrozen,andwhydon'tIgetthesamebehaviourwhendeclaringtheresourcedirectly?Amodulelevelworkaroundistoquotetheparameterinthedefinedresourcetypeas:{code}$comment=${title},{code}Theabovepassesall3testsThesetestswererunonpuppet3.7.3ruby2.0.0p353 Add Comment This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)
Jira (PUP-4332) Resource properties frozen if copied from $title
Title: Message Title Craig Dunn created an issue Puppet / PUP-4332 Resource properties frozen if copied from $title Issue Type: Bug Affects Versions: PUP 3.7.3 Assignee: Unassigned Created: 2015/03/27 2:40 AM Priority: Normal Reporter: Craig Dunn There is some strange behaviour when creating user resources from a defined type via the create_resources function. Take this example; manifests/accounts.pp define account ( $comment = $title,
Jira (HI-46) Hiera should support alternate environments
Title: Message Title Craig Dunn commented on an issue Re: Hiera should support alternate environments I dont understand the reluctance to do this - it doesn't seem to be a major architectural change and the level of interest in this ticket suggests there is enough demand. My take on it is, puppet directory environments are a great way to do several things, including; Have the master serve different versions/releases of Puppet code Have the master serve different traditional environments (dev, QA, staging) Allow for multiple users to share the same Puppet infrastructure by autonomising the modulepath and manifest Allow for puppet code of varying levels of maturity to be tested before production release In all of these examples, and more, I see valid use cases for wanting or needing to change the hierarchy search order or hiera backends. I am currently working on a cloud solution that leverages r10k and puppet environments to enable projects to have the maximum flexibility with their requirements but maintain some level of centralization and code sharing - this issue is the only thing I'm having to come up with work arounds for. Allowing environments to self contain their modules and their site.pp but not hiera.yaml just seems like another example of environments nearly being a great feature (lets not forget about resource types and environments). Now 40 votes and 50 watchers now... Add Comment Hiera / HI-46 Hiera should support alternate environments