Jira (PUP-7495) puppet lookup CLI ignores node level variables

13 views
Skip to first unread message

Vadym Chepkov (JIRA)

unread,
May 3, 2017, 8:12:04 PM5/3/17
to puppe...@googlegroups.com
Vadym Chepkov created an issue
 
Puppet / Bug PUP-7495
puppet lookup CLI ignores node level variables
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2017/05/03 5:11 PM
Priority: Normal Normal
Reporter: Vadym Chepkov

with a hierarchy variable assigned at node level

node 'test' {
  $role = 'test'
}

and variable used in hiera 5 'environment' level

---
version: 5
defaults:
  datadir: hieradata
  data_hash: yaml_data
hierarchy:
  - name: "Data"
    paths:
      - "%{role}.yaml"
      - "common.yaml"

and data in hieradata/test.yaml

---
key: value

puppet lookup fails with or without --compile flag with warning

Warning: Undefined variable 'role'; 
   (file & line not available)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
May 4, 2017, 6:42:02 AM5/4/17
to puppe...@googlegroups.com
Henrik Lindberg commented on Bug PUP-7495
 
Re: puppet lookup CLI ignores node level variables

In order for the lookup CLI to get that right, it would need to:

  • compile the code
  • perform the lookup as if it occurred from a scope nested under the node scope (i.e. not from top scope)
  • in order to do the correct lookup, the CLI would need to know the scope to use

To fix this we would need to add a flag to the CLI --class_scope=<name-of-class>, and that use of that flag implies --compile

Henrik Lindberg (JIRA)

unread,
May 4, 2017, 6:44:02 AM5/4/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
 
Change By: Henrik Lindberg
Team: Puppet Developer Experience
Sprint: PDE Triage

Lindsey Smith (JIRA)

unread,
May 4, 2017, 4:27:02 PM5/4/17
to puppe...@googlegroups.com
Lindsey Smith commented on Bug PUP-7495
 
Re: puppet lookup CLI ignores node level variables

I wonder if setting a variable in the PE NC has the same behavior?

Vadym Chepkov (JIRA)

unread,
May 4, 2017, 7:07:02 PM5/4/17
to puppe...@googlegroups.com
Vadym Chepkov commented on Bug PUP-7495

I tested, variable defined in PE works as expected

Lindsey Smith (JIRA)

unread,
May 4, 2017, 11:06:02 PM5/4/17
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
May 5, 2017, 7:47:02 AM5/5/17
to puppe...@googlegroups.com

ENC works because that does not take place inside of node scope.

Russell Mull (JIRA)

unread,
May 15, 2017, 6:24:04 PM5/15/17
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
May 31, 2017, 9:01:15 AM5/31/17
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
May 31, 2017, 9:01:20 AM5/31/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Sprint: Forge - To Accept

Henrik Lindberg (JIRA)

unread,
May 31, 2017, 9:09:04 AM5/31/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Sprint: Forge - To Accept Language Triage

Josh Cooper (JIRA)

unread,
Jul 20, 2017, 1:20:03 PM7/20/17
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Agent Platform Core

Josh Cooper (JIRA)

unread,
Jul 20, 2017, 1:20:03 PM7/20/17
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Language Triage Platform Core Grooming

Geoff Nichols (JIRA)

unread,
Jul 25, 2017, 12:18:04 AM7/25/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform OS Grooming

Geoff Nichols (JIRA)

unread,
Jul 25, 2017, 12:18:04 AM7/25/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform Core Grooming

Geoff Nichols (JIRA)

unread,
Jul 25, 2017, 12:20:02 AM7/25/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform  OS  Core  Grooming

Karen Van der Veer (JIRA)

unread,
Aug 7, 2017, 7:08:04 PM8/7/17
to puppe...@googlegroups.com
Karen Van der Veer updated an issue
Change By: Karen Van der Veer
Sprint: Platform Core Grooming Language Triage

Austin Boyd (JIRA)

unread,
Dec 12, 2019, 8:23:03 AM12/12/19
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket IDs: 35400
Zendesk Ticket Count: 1
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Maggie Dreyer (Jira)

unread,
Apr 28, 2021, 1:27:03 PM4/28/21
to puppe...@googlegroups.com
Maggie Dreyer commented on Bug PUP-7495
 
Re: puppet lookup CLI ignores node level variables

We're probably not going to get to this any time soon. If it's important or you have specific use cases for it, please reopen with that info.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages