Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title David McTavish updated an issue Puppet / PUP-9560 master compile errors on upper case class ref with unknown class where apply works Change By: David McTavish Priority: Normal Low Add Comment This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d) -- 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.300184.1552566093000.31828.1646770800299%40Atlassian.JIRA.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Henrik Lindberg commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works I agree with Josh Cooper, the correct way to reference the class is by using the lower class name in this case. The upper cased name is actually a reference to the data type - so when writing Class[A] that should really mean the meta type of the class named "a". With classes, since their instances are singletons it does not make a difference if statements are made about the specific "a" instance or all instances since there can be only one. In the puppet language the _expression_ Class[A] gives an error since it does not accept a type reference to the type A. Ideally the same kind of reference in string form "Class[A]" should be an error. The puppet language accepts Class["A"] since it is specified that class names are case independant (and lower case in normal form), and now the class name is a string so it downcases it. There are a bunch of other problems with the parser that parses resource references (the classic being resources with square brackets in their name). If that is ever sanitized it would be worth to clean up this case mismatch as well. OTOH, puppet db could do a case insensitive compare. Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- 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
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Josh Cooper commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works So this looks like a catalog normalization issue only when processing class references and using "Class[name]". Note the difference in before parameters for the bad and good notify resources below: class a {} include a notify { 'bad': before => 'Class[a]' } notify { 'good': before => Class['a'] } In the generated catalog, Notify[good] references Class[A], but Notify[bad] references Class[a]. However, only Class[A] exists in the catalog: {"type"=>"Class", "title"=>"A", "tags"=>["class", "a"], "exported"=>false}, {"type"=>"Notify", "title"=>"bad",
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Josh Cooper commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works This is pretty easy to reproduce when puppetdb is installed: # mkdir -p /etc/puppetlabs/code/environments/test/manifests # cat > /etc/puppetlabs/code/environments/test/manifests/site.pp < notify { 'in site.pp': before => 'Class[test]', } include test END # mkdir -p /etc/puppetlabs/code/environments/test/modules/test/manifests/ # cat /etc/puppetlabs/code/environments/test/modules/test/manifests/init.pp < class test {} END # chown -R puppet:puppet /etc/puppetlabs/code/environments/test # puppet agent -t --environment test
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Josh Cooper updated an issue Puppet / PUP-9560 master compile errors on upper case class ref with unknown class where apply works Change By: Josh Cooper Attachment: stacktrace.txt Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- 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.300184.1552566093000.126569.1611779280288%40Atlassian.JIRA.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Josh Cooper commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works The error is triggered by the puppetdb terminus which explains why it doesn't happen when using apply (since you'd have to explicitly configure the apply application to use the puppetdb terminus via routes.yaml) 2019-05-22T11:25:54.959+01:00 ERROR [qtp1510301445-5198] [puppetserver] Puppet Invalid relationship: Notify[goes first] { before => Class[test] }, because Class[test] doesn't seem to be in the catalog /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/puppetdb.rb:407:in `block in synthesize_edges' org/jruby/RubyArray.java:1801:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/puppetdb.rb:362:in `block in synthesize_edges' org/jruby/RubyHash.java:1396:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/puppetdb.rb:360:in `block in synthesize_edges' org/jruby/RubyArray.java:1801:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/puppetdb.rb:343:in `block in synthesize_edges' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Henrik Lindberg commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works Charlie Sharpsteen thanks, I find it really strange that we haven't seen reports about this earlier since using an uppercase reference is not what people tend to use. 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 post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.300184.1552566093000.17377.1558555260448%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Charlie Sharpsteen commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works Nope, this is a new one to me. 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 post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.300184.1552566093000.17296.1558551780271%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Henrik Lindberg commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works Charlie Sharpsteen Have you seen this problem before? 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 post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.300184.1552566093000.16838.1558544880184%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Stephen Kenny commented on PUP-9560 Re: master compile errors on upper case class ref with unknown class where apply works Re case, yes it's exactly as you mention - the test class is defined in the file "test/manifests/init.pp" (where "test" is a subdirectory in our local modules directory), and everything is in lower case. (Just in case it's relevant, our modules live in two separate directories. We put local (home-grown) ones in /etc/puppetlabs/code/modules, while Forge modules live in /etc/puppetlabs/code/environments/production/modules.) I've attached some stack trace information from the Puppet server's /var/log/puppetlabs/puppetserver.log file: stacktrace.txt 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 post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.300184.1552566093000.16265.1558521300685%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Stephen Kenny updated an issue Puppet / PUP-9560 master compile errors on upper case class ref with unknown class where apply works Change By: Stephen Kenny Attachment: stacktrace.txt 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 post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.300184.1552566093000.16262.1558521300613%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Stephen Kenny updated an issue Puppet / PUP-9560 master compile errors on upper case class ref with unknown class where apply works Change By: Stephen Kenny Attachment: stacktrace.txt 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 post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.300184.1552566093000.16259.1558521300547%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-9560 master compile errors on upper case class ref with unknown class where apply works Change By: Henrik Lindberg Summary: Class references in Hiera data: parsing error? master compile errors on upper case class ref with unknown class where apply works Component/s: Hiera & Lookup Component/s: Compiler This was initially reported as related to hiera and lookup, but when problem was reproduced it was triggered without hiera/lookup being involved. In essence a {{Class\[test]}} reference works when using apply, but not when compiling via the master - changing the {{test}} to {{Test}} makes it work on the master.ORIGINAL- *Puppet Version: 6.0.5-1stretch* *Puppet Server Version: 6.2.0-1stretch* *OS Name/Version: Debian 9*I'm using the lookup function to create a file resource from Hiera data:'/primary': ensure: 'directory' mode: '0755' owner: 'root' group: 'root' before: 'Class[nfs]'This results in the following error when the agent runs on the node:"Server Error: Invalid relationship: File[/primary] \{ before => Class[nfs] }, because Class[nfs] doesn't seem to be in the catalog".But here's the thing: if the first letter of the class _name_ is capitalized - to be clear, as in Class[Nfs] - the agent run proceeds smoothly. This is at odds with what happens if I create the file resource explicitly in a manifest. In that case, it is _not_ necessary to capitalize the class name in the "before =>" attribute.So on the face of it, it seems something is amiss in the Hiera lookup, or parsing, or ... something ...(Incidentally, this happens no matter which class I'm referencing - it's not restricted to the "nfs" (derdanne-nfs module) class.)Stephen Kenny
Jira (PUP-9560) master compile errors on upper case class ref with unknown class where apply works
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-9560 master compile errors on upper case class ref with unknown class where apply works Change By: Henrik Lindberg Attachment: agent-run.debug 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 post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.300184.1552566093000.16250.1558520520924%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.