Jira (PUP-7466) Error while evaluating a Virtual Query

4 views
Skip to first unread message

Robert Heinzmann (JIRA)

unread,
Apr 25, 2017, 5:26:02 AM4/25/17
to puppe...@googlegroups.com
Robert Heinzmann updated an issue
 
Puppet / Bug PUP-7466
Error while evaluating a Virtual Query
Change By: Robert Heinzmann
When running puppet for the first time in an environment, after the  *  environment cache has been cleared *  (e.g. r10k webhook run) and after *puppet generate types* has been run the following error pops up once:

{noformat}
Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/file_line: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/file_line'. Set at unknown location at 
/etc/puppetlabs/code/environments/ENV/modules/MODULE/manifests/master/MANIFEST.pp:364:5 on node 
SERVER
{noformat}

After running the agent once more, the error is gone. This only happens after the Puppet 4.10.0 update.

Howto reproduce

- run r10k
- run puppet generate types on all environments
- clean environment cache (curl -X DELETE https://localhost:8140/puppet-admin-api/v1/environment-cache)

Code causing the issue / reported by error message: 

{noformat}
    File_line <| tag == 'thisismytag' |> ~> Service['puppetserver']
{noformat}
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Robert Heinzmann (JIRA)

unread,
Apr 25, 2017, 5:26:02 AM4/25/17
to puppe...@googlegroups.com
Robert Heinzmann created an issue
Issue Type: Bug Bug
Affects Versions: PUP 4.10.0
Assignee: Unassigned
Components: AIO
Created: 2017/04/25 2:25 AM
Environment:

Centos7, Puppet 4.10.0, Puppetserver 2.7.2

Priority: Normal Normal
Reporter: Robert Heinzmann

When running puppet for the first time in an environment, after the environment cache has been cleared (e.g. r10k webhook run) and after puppet generate types has been run the following error pops up once:

Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/file_line: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/file_line'. Set at unknown location at 
/etc/puppetlabs/code/environments/ENV/modules/MODULE/manifests/master/MANIFEST.pp:364:5 on node 
SERVER

After running the agent once more, the error is gone. This only happens after the Puppet 4.10.0 update.

Howto reproduce

  • run r10k
  • run puppet generate types on all environments

Code causing the issue / reported by error message:

    File_line <| tag == 'thisismytag' |> ~> Service['puppetserver']

Ethan Brown (JIRA)

unread,
May 17, 2017, 5:03:02 PM5/17/17
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Labels: triaged

Ethan Brown (JIRA)

unread,
May 17, 2017, 5:03:04 PM5/17/17
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Component/s: AIO

Ethan Brown (JIRA)

unread,
May 17, 2017, 5:05:02 PM5/17/17
to puppe...@googlegroups.com
Ethan Brown commented on Bug PUP-7466
 
Re: Error while evaluating a Virtual Query

In a future version of Puppet the intent is to deprecate some of this functionality - please see PUP-7541.

Thomas Hallgren / Henrik Lindberg any comments?

Ethan Brown (JIRA)

unread,
May 17, 2017, 5:05:04 PM5/17/17
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
May 18, 2017, 8:36:02 AM5/18/17
to puppe...@googlegroups.com
Henrik Lindberg commented on Bug PUP-7466
 
Re: Error while evaluating a Virtual Query

The problem is related to ending up with a recursion in the loader - we have had similar problems like that in the past. The underlying problem does not really have anything to do with Virtual Query as such - it simply runs over the resources and there happens to be a file_line type - it could have been some other type that triggered this problem.

OTOH, if there was no virtual query this problem would not surface

Needs to be looked into.

William Yardley (JIRA)

unread,
Sep 15, 2017, 12:53:02 PM9/15/17
to puppe...@googlegroups.com

BTW, a bit more detail about at least one case that seems to cause this is here:
https://github.com/voxpupuli/puppet-rabbitmq/issues/605
possibly related to this bit?
Class['rabbitmq::install'] -> Rabbitmq_plugin<| |>

Halim Wijaya (JIRA)

unread,
Jun 14, 2018, 2:07:03 AM6/14/18
to puppe...@googlegroups.com
Halim Wijaya updated an issue
 
Change By: Halim Wijaya
CS Priority: Needs Priority
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Jun 14, 2018, 4:36:03 AM6/14/18
to puppe...@googlegroups.com
Henrik Lindberg commented on Bug PUP-7466
 
Re: Error while evaluating a Virtual Query

In order to act on this it would be great to have a reproducer. The issue is probably triggered by a combination of expressions that trigger autoloading and where the expressions involved gets autoloaded from.

Second best is to get a stack trace that shows what puppet was doing when it encountered an error. While that tells us where the (believed) recursion in type loading occurs, it does not tell us why, so a reproducer is much appreciated.

Adam Bottchen (JIRA)

unread,
Jun 21, 2018, 7:52:02 PM6/21/18
to puppe...@googlegroups.com
Adam Bottchen updated an issue
 
Change By: Adam Bottchen
CS Priority: Needs Priority Reviewed

Henning Block (JIRA)

unread,
Aug 28, 2018, 5:16:03 AM8/28/18
to puppe...@googlegroups.com
Henning Block commented on Bug PUP-7466
 
Re: Error while evaluating a Virtual Query

Henrik Lindberg We're having a similar issue. What information would you need from a reproducer?

Henrik Lindberg (JIRA)

unread,
Aug 28, 2018, 6:04:03 AM8/28/18
to puppe...@googlegroups.com

A complete self contained simple example would be great - preferably all in one .pp file if possible.

Henning Andersen (JIRA)

unread,
Jan 18, 2019, 3:21:02 AM1/18/19
to puppe...@googlegroups.com

Henrik Lindberg, I never got to do this and just saw that Puppet 6 contains a fix for https://tickets.puppetlabs.com/browse/PUP-8002. Should this be fixed aswell? Thanks Henning

Henrik Lindberg (JIRA)

unread,
Jan 18, 2019, 5:12:03 AM1/18/19
to puppe...@googlegroups.com

Henning Andersen and Jarret Lavallee - as pointed out PUP-8002 fix may fix this as it fixes one such problem. Not known to me if this is a different manifestation of the same kind of problem. Easiest is to test with Puppet 6 to verify.

Josh Cooper (Jira)

unread,
Apr 24, 2020, 8:28:03 PM4/24/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Epic Link: PUP-7541
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 24, 2020, 8:33:03 PM4/24/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-7466
 
Re: Error while evaluating a Virtual Query

There is another issue "Attempt to redefine entity" error when using generated types (PUP-9602), but that error occurs when using puppet apply, and was introduced in 6.0 due to deferred functions support. Not sure if this is another case of a loader being active when it shouldn't be.

Reply all
Reply to author
Forward
0 new messages