Jira (PUP-10884) 'puppet facts show' gives conversion error on 6.x agent

23 views
Skip to first unread message

Nick Burgan (Jira)

unread,
Feb 1, 2021, 12:32:04 PM2/1/21
to puppe...@googlegroups.com
Nick Burgan updated an issue
 
Puppet / Bug PUP-10884
'puppet facts show' gives conversion error on 6.x agent
Change By: Nick Burgan
Summary: 'puppet facts show' always gives conversion error on 6.x agent
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Nick Burgan (Jira)

unread,
Feb 1, 2021, 12:53:05 PM2/1/21
to puppe...@googlegroups.com
Nick Burgan commented on Bug PUP-10884
 
Re: 'puppet facts show' gives conversion error on 6.x agent

It appears to be this: https://github.com/puppetlabs/puppet/blob/6.x/lib/puppet/indirector/face.rb#L78-L84

[8] pry(#<Puppet::Indirector::Face>)> whereami
 
From: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/face.rb:85 Puppet::Indirector::Face#find implementation, required on Ruby 1.8:
 
    76: when_invoked do |*args|
    77:   # Default the key to Puppet[:certname] if none is supplied
    78:   if args.length == 1
    79:     key = Puppet[:certname]
    80:     options = args.last
    81:   else
    82:     key, options = *args
    83:   end
    84:   require 'pry-byebug';binding.pry
 => 85:   call_indirection_method :find, key, options[:extra]
    86: end
 
[9] pry(#<Puppet::Indirector::Face>)> args.length==1
=> false
[10] pry(#<Puppet::Indirector::Face>)> options
=> "operatingsystem"
[11] pry(#<Puppet::Indirector::Face>)> args
=> ["show", "operatingsystem", {:extra=>{}}]

Key and options are the 2nd and 3rd items, not 1st and 2nd. It appears that 'puppet facts show <fact>' doesn't end up in this function at all in 7.x.

Josh Cooper (Jira)

unread,
Feb 1, 2021, 2:04:04 PM2/1/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10884

puppet facts show isn't available in 6.x, but what happens is find is the default action for puppet facts. So what you're running is puppet facts find for the node named show, and operatingsystem is being passed as an option. Several people have been bitten by this. It might be good to implement puppet facts show either to raise an error or backport the functionality to 6.x to assist with migration?

Mihai Buzgau (Jira)

unread,
Feb 2, 2021, 11:02:02 AM2/2/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Feb 3, 2021, 4:31:04 AM2/3/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Feb 3, 2021, 4:33:04 AM2/3/21
to puppe...@googlegroups.com
Mihai Buzgau commented on Bug PUP-10884
 
Re: 'puppet facts show' gives conversion error on 6.x agent

The purpose of this ticket is to back-port the changes from Puppet 7 to Puppet 6.
Once this ticket is done puppet facts show will show the following error: "puppet facts show requires version 4.0.40 or greater of Facter"

We do plan to add the resolve API to facter that would enable puppet facts show to work on Puppet 6. Facter ticket: https://tickets.puppetlabs.com/browse/FACT-2935

Gheorghe Popescu (Jira)

unread,
Feb 4, 2021, 6:10:03 AM2/4/21
to puppe...@googlegroups.com

Nick Burgan (Jira)

unread,
Feb 5, 2021, 3:24:04 PM2/5/21
to puppe...@googlegroups.com
Nick Burgan commented on Bug PUP-10884
 
Re: 'puppet facts show' gives conversion error on 6.x agent

Is this a recent change? We are using `puppet facts show` in a job in CI, and it just started failing due to this.

Nick Burgan (Jira)

unread,
Feb 5, 2021, 3:27:05 PM2/5/21
to puppe...@googlegroups.com
Nick Burgan updated an issue
Change By: Nick Burgan
Comment: -Is this a recent change? We are using `puppet facts show` in a job in CI, and it just started failing due to this.-

Disregard, I was mistaken.  This was a recent addition to our test.

Gheorghe Popescu (Jira)

unread,
Feb 16, 2021, 1:53:03 AM2/16/21
to puppe...@googlegroups.com

Gheorghe Popescu (Jira)

unread,
Feb 16, 2021, 1:53:03 AM2/16/21
to puppe...@googlegroups.com

Gheorghe Popescu (Jira)

unread,
Feb 16, 2021, 1:57:03 AM2/16/21
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Release Notes Summary: The `puppet facts show` action was backported to the 6 stream. This command can be used to retrieve a list of facts from the system and it supports a couple of options.  Check `puppet facts show --help` for all the information.

Claire Cadman (Jira)

unread,
Apr 13, 2021, 10:30:02 AM4/13/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages