Jira (FACT-3133) Facter 4 Does Not Support Built-In Windows Commands

40 views
Skip to first unread message

Selvakumar Azhagarsami (Jira)

unread,
Jun 30, 2022, 2:17:02 AM6/30/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami created an issue
 
Facter / Bug FACT-3133
Facter 4 Does Not Support Built-In Windows Commands
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2022/06/29 11:16 PM
Priority: Normal Normal
Reporter: Selvakumar Azhagarsami

When executing the custom fact, Facter version 4.2.x fails with the "command not found" error.

 

Created custom facts to test the scenario as shown below.

Facter.add(:factertestingwindows) do
  confine :kernel => 'windows'
  setcode do
    Facter::Core::Execution.execute('echo Hello', :timeout => 10)
  end
end 

 

It is working as expected in Facter version 3.14.x

{{}}

PS C:\Users\Administrator> facter --version
3.14.22 (commit 4d4afa91b226dfa8d2f92c495b7070377134386f) 

{{}}

PS C:\Users\Administrator> facter -p factertestingwindows
Hello
PS C:\Users\Administrator> 

and }}{{Not working }} {{in }}{{Facter version 4.2.x

{{}}

PS C:\Users\Administrator> facter --version
4.2.2 

{{}}

PS C:\Users\Administrator> puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: Error while resolving custom fact fact='factertestingwindows', resolution='<anonymous>': Could not execute 'echo Hello': command not found
Info: Caching catalog for baroque-fort.delivery.puppetlabs.net
Info: Applying configuration version 'pe-202130-master-production-67440e89804'
Notice: Applied catalog in 0.42 seconds 

{{}}

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Selvakumar Azhagarsami (Jira)

unread,
Jun 30, 2022, 2:18:01 AM6/30/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami updated an issue
Change By: Selvakumar Azhagarsami
When executing the custom fact, Facter version 4.2.x fails with the "{*}command not found{*}" error.

 

Created *custom facts* to test the scenario as shown below.
{code:java}

Facter.add(:factertestingwindows) do
  confine :kernel => 'windows'
  setcode do
    Facter::Core::Execution.execute('echo Hello', :timeout => 10)
  end
end {code}
 

It is *working* as expected in _{{Facter version 3.14.x}}_

_
{ {}}_
{
code:java}
PS C:\Users\Administrator> facter --version
3.14.22 (commit 4d4afa91b226dfa8d2f92c495b7070377134386f) {code}
_ { {}}_
{
code:java}
PS C:\Users\Administrator> facter -p factertestingwindows
Hello
PS C:\Users\Administrator> {code}
{{and
}}{{ *Not working*}}  _ {{ }}_ {{ in}}   _{{ }}{{ Facter version 4.2.x}}_

_
{ {}}_
{
code:java}
PS C:\Users\Administrator> facter --version
4.2.2 {code}
_ { {}}_
{
code:java}
PS C:\Users\Administrator> puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: Error while resolving custom fact fact='factertestingwindows', resolution='<anonymous>': Could not execute 'echo Hello': command not found
Info: Caching catalog for baroque-fort.delivery.puppetlabs.net
Info: Applying configuration version 'pe-202130-master-production-67440e89804'
Notice: Applied catalog in 0.42 seconds {code}
_{{}}_

Alvin Rodis (Jira)

unread,
Jun 30, 2022, 2:19:01 AM6/30/22
to puppe...@googlegroups.com
Alvin Rodis updated an issue
Change By: Alvin Rodis
Labels: jira_escalated

Alvin Rodis (Jira)

unread,
Jun 30, 2022, 2:19:02 AM6/30/22
to puppe...@googlegroups.com
Alvin Rodis updated an issue
Change By: Alvin Rodis
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 48852

Selvakumar Azhagarsami (Jira)

unread,
Jun 30, 2022, 2:20:01 AM6/30/22
to puppe...@googlegroups.com

Selvakumar Azhagarsami (Jira)

unread,
Jun 30, 2022, 2:20:02 AM6/30/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Jul 5, 2022, 4:32:01 PM7/5/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Team: Night's Watch Phoenix

Nirupama Mantha (Jira)

unread,
Jul 5, 2022, 4:35:01 PM7/5/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Sprint: Phoenix 2022-08-03

Lisa Ross (Jira)

unread,
Jul 14, 2022, 11:06:02 AM7/14/22
to puppe...@googlegroups.com
Lisa Ross updated an issue
Change By: Lisa Ross
Sprint: Phoenix 2022-08-03

Josh Cooper (Jira)

unread,
Jul 22, 2022, 12:14:03 PM7/22/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Component/s: Facter 4
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Josh Cooper (Jira)

unread,
Jul 25, 2022, 11:22:03 AM7/25/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Phoenix 2022-08-17

Nirupama Mantha (Jira)

unread,
Jul 28, 2022, 11:13:03 AM7/28/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Jul 28, 2022, 11:14:04 AM7/28/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Acceptance Criteria: Custom fact works as expected

Lisa Ross (Jira)

unread,
Aug 3, 2022, 8:39:03 AM8/3/22
to puppe...@googlegroups.com
Lisa Ross updated an issue
Change By: Lisa Ross
Epic Link: FACT-3139

Tony Vu (Jira)

unread,
Aug 16, 2022, 12:04:01 PM8/16/22
to puppe...@googlegroups.com
Tony Vu assigned an issue to Tony Vu
Change By: Tony Vu
Assignee: Tony Vu

Christopher Thorn (Jira)

unread,
Aug 17, 2022, 12:13:02 PM8/17/22
to puppe...@googlegroups.com
Christopher Thorn updated an issue
Change By: Christopher Thorn
Sprint: Phoenix 2022-08-17 , Phoenix 2022-08-31

Tony Vu (Jira)

unread,
Aug 31, 2022, 12:01:01 PM8/31/22
to puppe...@googlegroups.com
Tony Vu commented on Bug FACT-3133
 
Re: Facter 4 Does Not Support Built-In Windows Commands

Hi Selvakumar Azhagarsami , just looking for a bit of clarification; are you asking for all "built-in" Windows commands support, or just specifically echo? Facter 3 had support for specifically echo, but other commands like dir would not work.

Morgan Rhodes (Jira)

unread,
Aug 31, 2022, 1:35:03 PM8/31/22
to puppe...@googlegroups.com
Morgan Rhodes updated an issue
 
Change By: Morgan Rhodes
Sprint: Phoenix 2022-08-17, Phoenix 2022-08-31 , Phoenix 2022-09-14

Selvakumar Azhagarsami (Jira)

unread,
Sep 1, 2022, 8:20:03 PM9/1/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami commented on Bug FACT-3133
 
Re: Facter 4 Does Not Support Built-In Windows Commands

Tony Vu for the benefit of this ticket, please fix it specifically the echo command but if you think fixing other windows command is feasible please proceed I will leave it up to you.

Michael Hashizume (Jira)

unread,
Sep 7, 2022, 4:49:01 PM9/7/22
to puppe...@googlegroups.com

Tony Vu (Jira)

unread,
Sep 8, 2022, 11:14:01 AM9/8/22
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Release Notes: Bug Fix
Release Notes Summary: Facter 3.x special-cased `echo` for windows to allow it to run using the built-in for a Windows shell; Facter 4 upgrade neglected to include this special case. This fix adds that special case back in.

Parker Leach (Jira)

unread,
Sep 12, 2022, 12:48:02 PM9/12/22
to puppe...@googlegroups.com
Parker Leach updated an issue
Change By: Parker Leach
Labels: docs_reviewed jira_escalated support

Josh Cooper (Jira)

unread,
Feb 24, 2023, 2:32:03 PM2/24/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: docs_reviewed jira_escalated regression support
Reply all
Reply to author
Forward
0 new messages