Jira (FACT-2939) Restore facter --puppet functionality to Facter 4

11 views
Skip to first unread message

Charlie Sharpsteen (Jira)

unread,
Feb 4, 2021, 6:22:02 PM2/4/21
to puppe...@googlegroups.com
Charlie Sharpsteen created an issue
 
Facter / Improvement FACT-2939
Restore facter --puppet functionality to Facter 4
Issue Type: Improvement Improvement
Affects Versions: FACT 4.0.50
Assignee: Unassigned
Created: 2021/02/04 3:21 PM
Priority: Major Major
Reporter: Charlie Sharpsteen

Historically, the -puppet and -p flags were offered by the Facter CLI to enable loading and reporting custom facts that had been downloaded from a Puppet Server by the Puppet Agent. But, the output of facter --puppet does not include values added by the puppet agent to facts submitted with catalog requests and can produce incorrect output when fact resolution is sensitive to the Puppet Environment as a compiler scope is not initialized. These issues led to the -puppet flag being deprecated in favor of the puppet facts show CLI in Puppet 7 and Facter 4.

However, the --puppet flag has a very long history in Facter, having been added in 2008. This history has created a large diaspora of facter --puppet usage in scripts that are not sensitive to the issues fixed by puppet facts show because they are invoked on agent systems that don't host multiple environments or request fact values that are by the context of a puppet agent run.

In order to smooth upgrades to Puppet 7 by avoiding a search-and-replace operation to locate existing uses of facter --puppet, this ticket is a request to restore the functionality of the flag in Facter 4.

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

Charlie Sharpsteen (Jira)

unread,
Feb 4, 2021, 6:32:03 PM2/4/21
to puppe...@googlegroups.com
Charlie Sharpsteen updated an issue
Change By: Charlie Sharpsteen
Historically, the {{--puppet}} and {{-p}} flags were offered by the Facter CLI to enable loading and reporting custom facts that had been downloaded from a Puppet Server by the Puppet Agent. But, the output of {{facter --puppet}} does not include values added by the {{puppet agent}} to facts submitted with catalog requests and can produce incorrect output when fact resolution is sensitive to the Puppet Environment as a compiler scope is not initialized. These issues led to the {{--puppet}} flag being deprecated in favor of the {{puppet facts show}} CLI in Puppet 7 and Facter 4.

However, the {{--puppet}} flag has a very long history in Facter, having been added in 2008. This history has created a large diaspora of {{facter --puppet}} usage in scripts that are not sensitive to the issues fixed by {{puppet facts show}} because they are invoked on agent systems that don't host multiple environments or request fact values that are
created by the context of a {{puppet agent}} run.

In order to smooth upgrades to Puppet 7 by avoiding a search-and-replace operation to locate existing uses of {{facter --puppet}}, this ticket is a request to restore the functionality of the flag in Facter 4.

Josh Cooper (Jira)

unread,
Feb 4, 2021, 9:07:04 PM2/4/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Historically, the {{ \ - \ -puppet}} and {{-p}} flags were offered by the Facter CLI to enable loading and reporting custom facts that had been downloaded from a Puppet Server by the Puppet Agent. But, the output of {{facter \ --puppet}} does not include values added by the {{puppet agent}} to facts submitted with catalog requests and can produce incorrect output when fact resolution is sensitive to the Puppet Environment as a compiler scope is not initialized. These issues led to the {{ \ --puppet}} flag being deprecated in favor of the {{puppet facts show}} CLI in Puppet 7 and Facter 4.

However, the {{
\ --puppet}} flag has a very long history in Facter, having been added in 2008. This history has created a large diaspora of {{facter \ --puppet}} usage in scripts that are not sensitive to the issues fixed by {{puppet facts show}} because they are invoked on agent systems that don't host multiple environments or request fact values that are created by the context of a {{puppet agent}} run.


In order to smooth upgrades to Puppet 7 by avoiding a search-and-replace operation to locate existing uses of {{facter
\ --puppet}}, this ticket is a request to restore the functionality of the flag in Facter 4.

Mihai Buzgau (Jira)

unread,
Feb 5, 2021, 6:46:04 AM2/5/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 5, 2021, 1:02:04 PM2/5/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: FACT 4.0.51

Josh Cooper (Jira)

unread,
Feb 5, 2021, 1:05:04 PM2/5/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 5, 2021, 1:07:03 PM2/5/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Enhancement
Release Notes Summary: facter -p now returns the same results it did it facter 3.x
Reply all
Reply to author
Forward
0 new messages