Jira (PUP-8502) Puppet lookup always includes classes from the ENC

8 views
Skip to first unread message

Jarret Lavallee (JIRA)

unread,
Feb 28, 2018, 3:39:03 PM2/28/18
to puppe...@googlegroups.com
Jarret Lavallee created an issue
 
Puppet / Bug PUP-8502
Puppet lookup always includes classes from the ENC
Issue Type: Bug Bug
Affects Versions: PUP 5.3.5, PUP 4.10.9
Assignee: Thomas Hallgren
Components: Hiera & Lookup
Created: 2018/02/28 12:38 PM
Priority: Normal Normal
Reporter: Jarret Lavallee

The puppet lookup command evaluates classes that are returned from the ENC when the --compile flag is not specified. This results in failures of the lookup command if the catalog cannot be compiled. 

 

Reproduction Steps 

  1. Install PE or Puppetserver
  2. Create a class like the one below.
  3. Classify a node with the class in the classifier
  4. Run puppet lookup anyhierakey --node <nodename>

A simple class to cause a failure in the lookup is below. 

 

class test (
  String $myparam,
) {
  file {$myparam:
    ensure => absent,
  }
}

Logs

Using the steps above, we see this output from a lookup.

# puppet lookup anything --node pe-201735-agent.puppetdebug.vlan --debug 
...
Debug: importing '/etc/puppetlabs/code/environments/production/modules/test/manifests/init.pp' in environment production
Debug: Automatically imported test from test into production
...
Error: Could not run: Evaluation Error: Error while evaluating a Resource Statement, Class[Test]: expects a value for parameter 'myparam'

Workaround

Add the --node_terminus plain to the command.

# puppet lookup anything --node pe-201735-agent.puppetdebug.vlan --node_terminus plain
--- "test"

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Mar 1, 2018, 5:17:03 PM3/1/18
to puppe...@googlegroups.com

Owen Rodabaugh (JIRA)

unread,
Mar 1, 2018, 7:13:03 PM3/1/18
to puppe...@googlegroups.com
Owen Rodabaugh updated an issue
Change By: Owen Rodabaugh
CS Priority: Needs Priority Major
CS Impact: Lookup is very helpful but this is one of a number of issues with it related to how it interacts with the PE Node Classifier or other ENCs. A workaround exists as mentioned in this ticket but it's not intuitive and so most customers are likely to put in a support ticket about this.

We should probably document a known issue around this which includes the workaround.
CS Severity: 3 - Serious
CS Business Value: 5 - $$$$$$
CS Frequency: 3 - 25-50% of Customers

Thomas Hallgren (JIRA)

unread,
Mar 2, 2018, 10:32:02 AM3/2/18
to puppe...@googlegroups.com
Thomas Hallgren updated an issue
Change By: Thomas Hallgren
Fix Version/s: PUP 4.10.11
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Thomas Hallgren (JIRA)

unread,
Mar 2, 2018, 10:33:01 AM3/2/18
to puppe...@googlegroups.com
Thomas Hallgren assigned an issue to Unassigned
Change By: Thomas Hallgren
Assignee: Thomas Hallgren

Thomas Hallgren (JIRA)

unread,
Mar 3, 2018, 9:22:03 AM3/3/18
to puppe...@googlegroups.com
Thomas Hallgren assigned an issue to Henrik Lindberg
Change By: Thomas Hallgren
Assignee: Thomas Hallgren Henrik Lindberg

Thomas Hallgren (JIRA)

unread,
Mar 3, 2018, 9:22:03 AM3/3/18
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Mar 5, 2018, 5:35:02 AM3/5/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Sprint: Platform Core Grooming KANBAN

Henrik Lindberg (JIRA)

unread,
Mar 5, 2018, 5:35:03 AM3/5/18
to puppe...@googlegroups.com
Henrik Lindberg assigned an issue to Unassigned
Change By: Henrik Lindberg
Assignee: Henrik Lindberg
Sub-team: Language
Release Notes Summary: The lookup CLI tool called the ENC (node terminus) even if {{\--compile}} was not in effect. This could cause errors as classes indicated by the ENC would get loaded without a full and proper setup (could also error if loaded code was had parse errors). Now the configured ENC is only used if {{\--compile}} is in effect.
Release Notes: Bug Fix

Henrik Lindberg (JIRA)

unread,
Mar 5, 2018, 9:21:02 AM3/5/18
to puppe...@googlegroups.com

Enis Inan (JIRA)

unread,
Apr 9, 2018, 3:37:07 PM4/9/18
to puppe...@googlegroups.com
Enis Inan updated an issue
 
Change By: Enis Inan
Fix Version/s: PUP 5.3.6

Josh Cooper (Jira)

unread,
Apr 15, 2020, 6:38:04 PM4/15/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8502
 
Re: Puppet lookup always includes classes from the ENC

Due to this change, the environment assigned by the ENC is lost, which caused PUP-8094

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

Josh Cooper (Jira)

unread,
Apr 22, 2020, 8:27:04 PM4/22/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages