Jira (PUP-8940) an apply with given file should not issue warnings for unacceptable location of file

6 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Jun 13, 2018, 3:42:02 AM6/13/18
to puppe...@googlegroups.com
Henrik Lindberg created an issue
 
Puppet / Bug PUP-8940
an apply with given file should not issue warnings for unacceptable location of file
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2018/06/13 12:41 AM
Priority: Normal Normal
Reporter: Henrik Lindberg

Given the following:

> puppet apply -e 'function foo() { notice "hello" }; foo()'
Notice: Scope(Class[main]): hello

It works as expected, but when the same is done with a file:

> cat test.pp
function foo() { notice hello}; foo()
> puppet apply test.pp
Warning: Unacceptable location. The name 'foo' is unacceptable in file '/Users/henrik/git/puppet/test2.pp' (file: /Users/henrik/git/puppet/test2.pp, line: 1, column: 1)
Notice: Scope(Class[main]): hello

You get a warning.
There should be no warning for this as the file is given on the command line.
This is very annoying as puppet apply is used a lot for examples and small tests.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Mar 29, 2019, 1:18:03 PM3/29/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8940
 
Re: an apply with given file should not issue warnings for unacceptable location of file

This isn't reproducible using 6.4.0

$ bx puppet apply test.pp
Notice: Scope(Class[main]): hello
Notice: Compiled catalog for localhost in environment production in 0.02 seconds
Notice: Applied catalog in 0.01 seconds

Poyyamozhi Perumal (Jira)

unread,
Jul 4, 2020, 12:27:03 AM7/4/20
to puppe...@googlegroups.com

Hi Team,

When I ran the puppet parser its through error below. same manifest success in environments modules

puppet parser validate test.pp

Warning: Unacceptable location. The name 'fw' is unacceptable in file '/etc/puppetlabs/code/environments/production/modules/fw/manifests/test.pp' (file: /etc/puppetlabs/code/environments/production/modules/fw/manifests/test.pp, line: 38, column: 1)

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Jul 13, 2020, 11:02:03 AM7/13/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8940

Poyyamozhi Perumal could you provide an example site.pp and module manifest(s) that shows the problem?

Josh Cooper (Jira)

unread,
Jan 27, 2021, 9:15:04 PM1/27/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8940

This isn't reproducible so I'm going to close. I suspect the issue was resolved in either PUP-9020, PUP-9190, PUP-9211 the warning/error we initially added was overly restrictive. Please reopen if this is still an issue.

Reply all
Reply to author
Forward
0 new messages