Jira (PUP-9191) Provide a mode for puppet lookup where it only returns information on what was found

3 views
Skip to first unread message

Joel Weierman (JIRA)

unread,
Oct 1, 2018, 3:12:04 PM10/1/18
to puppe...@googlegroups.com
Joel Weierman created an issue
 
Puppet / Improvement PUP-9191
Provide a mode for puppet lookup where it only returns information on what was found
Issue Type: Improvement Improvement
Affects Versions: PUP 5.5.2
Assignee: Thomas Hallgren
Components: Hiera & Lookup
Created: 2018/10/01 12:11 PM
Fix Versions: PUP 5.5.z
Priority: Normal Normal
Reporter: Joel Weierman

As a user of Puppet, I would like to ability for puppet lookup to return information about where a particular key was found. As I would like to know the path of where the key was found, I used the --explain flag, however, the bulk of the output is where things aren't found. As I have a large Puppet implementation, this can often mean scrolling through many lines of "not found" data to find the information about where the key was found and what it's path was.

It would be nice if there was a flag (.e.g --explain-brief?) that only reported information about where the key was found and suppressed any information about where it was not found. As a user of puppet lookup, I generally only care about where a key is found and the associated path / location information for that particular key.

Please see an example of the puppet lookup result reporting multiple instances of "not found" below:

Path: "/etc/puppetlabs/code/environments/common_nonprod/hieradata/app_id/ibok.yaml"
Original path: "common_%{::pce_environment}/hieradata/app_id/%{::app_id}.yaml"
Path not found
Path: "/etc/puppetlabs/code/environments/common_nonprod/hieradata/pce_environment/nonprod.yaml"
Original path: "common_%{::pce_environment}/hieradata/pce_environment/%{::pce_environment}.yaml"
Path not found
...
(This type of output continues for many lines / screens of text as --explain iterates through the hierarchy)

Example desired command line interaction:

puppet lookup myinfo::to_lookup --node mynodename.org --environment myenvironment --explain-brief

Found key: myinfo::to_lookup value: "Thisisthevalue::IFound"

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

Joel Weierman (JIRA)

unread,
Oct 1, 2018, 3:24:03 PM10/1/18
to puppe...@googlegroups.com
Joel Weierman updated an issue
Change By: Joel Weierman
As a user of Puppet using a complex set of Hiera data and associated Puppet code , I would like to ability for puppet lookup to return information _only_ about where a particular key was found. As I would like to know the path of where the key was found, I used use the --explain flag, however, the bulk of the output is consists of reporting back where things aren _aren ' t t_ found. While this can be useful for debugging purposes, it does not help me when I just want to know where a particular key is found. As I have a large Puppet implementation, this can often mean scrolling through many lines of "not found" data to find the information about where the key was found and what it's path was.
It takes time to scroll through this extraneous information each time I run the command.

It would be nice if there was a flag (.e.g --explain-brief?) that only reported information about where the key was found and suppressed any information about where it was _not_ found. As a user of puppet lookup, I generally only care about where a key is found and the associated path / location information for that particular key.

Please see an example of the puppet lookup result reporting multiple instances of "
Path not found" below:


Path: "/etc/puppetlabs/code/environments/common_nonprod/hieradata/app_id/ibok.yaml"
  Original path: "common_%{::pce_environment}/hieradata/app_id/%{::app_id}.yaml"
  Path not found
Path: "/etc/puppetlabs/code/environments/common_nonprod/hieradata/pce_environment/nonprod.yaml"
  Original path: "common_%{::pce_environment}/hieradata/pce_environment/%{::pce_environment}.yaml"
  Path not found
...
(This type of output continues for many lines / screens of text as --explain iterates through the hierarchy)

Example desired command line interaction:

puppet lookup myinfo::to_lookup --node mynodename.org --environment myenvironment --explain-brief

Found key: myinfo::to_lookup value: "Thisisthevalue::IFound"

Joel Weierman (JIRA)

unread,
Oct 1, 2018, 3:29:04 PM10/1/18
to puppe...@googlegroups.com
Joel Weierman updated an issue
As a user of Puppet using a complex set of Hiera data and associated Puppet code, I would like to ability for puppet lookup to return information _only_ about where a particular key was found. As I would like to know the path of where the key was found, I use the --explain flag, however, the bulk of the output consists of reporting back where things _aren't_ found. While this can be useful for debugging purposes, it does not help me when I just want to know where a particular key is found. As I have a large Puppet implementation, this can often mean scrolling through many lines of "not found" data to find the information about where the key was found and what it's path was. It takes time to scroll through this extraneous information each time I run the command.


It would be nice if there was a flag (.e.g --explain-brief?) that only reported information about where the key was found and suppressed any information about where it was _not_ found. As a user of puppet lookup, I generally only care about where a key is found and the associated path / location information for that particular key.

Please see an example of the puppet lookup result reporting multiple instances of "Path not found" below:

Path: "/etc/puppetlabs/code/environments/common_nonprod/hieradata/app_id/ibok.yaml"
  Original path: "common_%{::pce_environment}/hieradata/app_id/%{::app_id}.yaml"
  Path not found
Path: "/etc/puppetlabs/code/environments/common_nonprod/hieradata/pce_environment/nonprod.yaml"
  Original path: "common_%{::pce_environment}/hieradata/pce_environment/%{::pce_environment}.yaml"
  Path not found
...
(This type of output continues for many lines / screens of text as --explain iterates through the hierarchy)

Example desired command line interaction:

puppet lookup myinfo::to_lookup --node mynodename.org --environment myenvironment --explain-brief

Path: "/etc/puppetlabs/code/environments/common/hieradata/common.yaml"
Original path: "common_%{{::myenvironment}/hieradata/common.yaml"
Found key: myinfo::to_lookup value: "Thisisthevalue::IFound"

Henrik Lindberg (JIRA)

unread,
Oct 1, 2018, 3:30:04 PM10/1/18
to puppe...@googlegroups.com
Henrik Lindberg commented on Improvement PUP-9191
 
Re: Provide a mode for puppet lookup where it only returns information on what was found

That sounds reasonable - ping Thomas Hallgren, how hard would that be to implement? Are there any gotchas when trying to achieve this?

Henrik Lindberg (JIRA)

unread,
Oct 1, 2018, 3:30:04 PM10/1/18
to puppe...@googlegroups.com

Rob Braden (JIRA)

unread,
Oct 1, 2018, 4:57:04 PM10/1/18
to puppe...@googlegroups.com

Rob Braden (JIRA)

unread,
Oct 1, 2018, 4:57:04 PM10/1/18
to puppe...@googlegroups.com

Thomas Hallgren (JIRA)

unread,
Oct 1, 2018, 5:02:06 PM10/1/18
to puppe...@googlegroups.com
Thomas Hallgren commented on Improvement PUP-9191
 
Re: Provide a mode for puppet lookup where it only returns information on what was found

I don't think there are any gotchas. It should be a matter of adding an additional flag to the explain support and simply filter out all "not found" info.

Josh Cooper (Jira)

unread,
Feb 8, 2022, 2:02:02 AM2/8/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Froyo
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages