Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-23 Thread Maggie Dreyer (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Maggie Dreyer commented on  FACT-2937  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: 'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
 I'm also seeing this when I start the developer repl for puppetserver, even after taking up the commit that resolved this ticket. I don't see it when I start the server from a package build. It seems to happen as part of creating the settings catalog:  
 
 
 
 
 2021-03-23 14:37:53,963 ERROR [clojure-agent-send-pool-0] [puppetserver] Facter error while resolving custom facts in /Users/aileen/.puppetlabs/opt/puppet/cache/lib/facter/service_provider.rb Could not autoload puppet/provider/service/upstart: Could not autoload puppet/provider/service/debian: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass  
 
 
 backtrace:  
 
 
 /Users/aileen/code/server/puppetserver/ruby/puppet/lib/puppet/provider/service/init.rb:24:in `block in '  
 
 
 org/jruby/RubyModule.java:3249:in `module_eval'  
 
 
 /Users/aileen/code/server/puppetserver/ruby/puppet/lib/puppet/util/classgen.rb:132:in `genthing'  
 
 
 /Users/aileen/code/server/puppetserver/ruby/puppet/lib/puppet/util/classgen.rb:33:in `genclass'  
 
 
 /Users/aileen/code/server/puppetserver/ruby/puppet/lib/puppet/type.rb:1847:in `provide'  
 
 
 /Users/aileen/code/server/puppetserver/ruby/puppet/lib/puppet/provider/service/init.rb:3:in `'  
 
 
 org/jruby/RubyKernel.java:1009:in `load'  
 
 
 /Users/aileen/code/server/puppetserver/ruby/puppet/lib/puppet/util/autoload.rb:78:in 

Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-11 Thread Claire Cadman (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Claire Cadman updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Claire Cadman  
 
 
Labels: 
 customer0  doc_reviewed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.163286.1615453560184%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-03 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  FACT-2937  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: 'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
 Makes sense, thanks!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.156228.1614789840036%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-03 Thread Kevin Reeuwijk (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Kevin Reeuwijk updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Kevin Reeuwijk  
 
 
Comment: 
 This breaks PE 2021.0.0 for me, I can't use the product at all in this state.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.156120.1614786900131%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-03 Thread Kevin Reeuwijk (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Kevin Reeuwijk commented on  FACT-2937  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: 'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
 This breaks PE 2021.0.0 for me, I can't use the product at all in this state.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.156020.1614779400026%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-03 Thread Mihai Buzgau (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mihai Buzgau commented on  FACT-2937  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: 'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
 This ticket addresses the --show-legacy CLI option that was created with the intent to "hide" legacy facts and not to block them.    Blocking should block facts. For example, if a user decides to block the EC2 metadata, any module that relies on this information will no longer work.   By default Facter 4 does not block any facts, it only provides a couple of pre-defined block groups that users can be used.   These default groups also serve as examples for creating new groups.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.155842.1614761040029%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-02 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu commented on  FACT-2937  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: 'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
 Josh Cooper thanks for looking into this. I would be inclined to move this issue to a separate ticket as it is impacting the general Facter blocking mechanism. We can talk more about it and decide the behaviour that we want. For the `puppet facts show` issue, the fix was made in the `Facter.resolve` which fetches all the facts and then it can filter out specific facts(like legacy). If someone blocks legacy facts using the config file, that is going thorough the Facter blocking mechanism. We need to define a clear way on how we want it to behave and make sure we document it accordingly for all the uses-case. I would assume that if someone explicitly blocks "legacy" facts in their config, they really want that, not just partially block them in certain situations. cc Bogdan Irimie Mihai Buzgau  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.155781.1614754860116%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-02 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  FACT-2937  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: 'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
 I verified the "Could not autoload" errors are resolved. But if legacy facts are blocked, then Facter.value(:operatingsystem) is returning nil. I thought we were only going to block legacy facts when listed (eg puppet facts show), but not when a legacy fact is explicitly requested via `Facter.value(:operatingsystem)`? To reproduce, install stahnma/puppetlabs_yum on a redhat8 puppetserver:  
 
 
 
 
 # puppet module install stahnma/puppetlabs_yum  
 
 
 Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...  
 
 
 Notice: Downloading from https://forgeapi.puppet.com ...  
 
 
 Notice: Installing -- do not interrupt ...  
 
 
 /etc/puppetlabs/code/environments/production/modules  
 
 
 └── stahnma-puppetlabs_yum (v0.1.4)  
 
 
 # puppet agent -t  
 
 
 ...  
 
 
 Info: Applying configuration version '1614713076'  
 
 
 Notice: Applied catalog in 0.01 seconds  
 
 
 # mkdir /etc/puppetlabs/facter  
 
 
 # cat < 

Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-03-02 Thread Gene Liverman (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gene Liverman updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gene Liverman  
 
 
Labels: 
 customer0  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.155065.1614704220195%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-26 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Fix Version/s: 
 FACT 4.0.52  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.153137.1614363060081%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-17 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu assigned an issue to Gheorghe Popescu  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 
 
Assignee: 
 Gheorghe Popescu  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.143770.1613565900100%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-17 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 
 
Story Points: 
 5  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.143694.1613561700032%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-17 Thread Mihai Buzgau (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mihai Buzgau updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Mihai Buzgau  
 
 
Sprint: 
 Triaged tickets NW - 2021-03-03  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.143690.1613561340027%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-09 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 
 
Sprint: 
 Triaged tickets  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.136704.1612886760092%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-05 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  FACT-2937  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: 'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
 Given there are so many 3rd party modules with legacy facts in them, it seems unlikely that someone would ever be able to block legacy facts entirely for the foreseeable future. Could facter instead warn if a legacy fact is requested (with the fact name and where it came from), but still collect and return it? That way individual modules can be updated as needed? Also I'd recommend having a facter setting that could be used to hide deprecation warnings, for example, puppet has a strict setting.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.134631.1612550760034%40Atlassian.JIRA.


Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-04 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 

  
 
 
 
 

 
 When running `puppet facts show` and puppetlabs-stdlib is installed, the following error message is shown:{noformat}Error: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Facter: error while resolving custom facts in /etc/puppetlabs/code/modules/stdlib/lib/facter/service_provider.rb Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass{noformat}- puppet facts show calls `Facter.resolve` which sets show_legacy to false- when resolving facts, Facter also load modules facts(stdlib)- stdlib has a fact that creates a dummy provider: https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/lib/facter/service_provider.rb- when Facter loads that fact, it calls Puppet to initalize the provider, Puppet tries to see what specific provider is suitable, and when it gets to `init.rb` it calls Facter back, with `operatingsystem`- because `Facter::Options[:show_legacy]` is false, Facter.value(:operatingsystem) returns `nil`, which breaks the call of `downcase`: https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/init.rb#L24This happens because `Facter::Options` is globally set for the entire run.Note that the command is working, and running  `  " puppet facts show #{fact} ` "  does not log any error  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 

Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-04 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 

  
 
 
 
 

 
 When running `puppet facts show` and puppetlabs-stdlib is installed, the following error message is shown:{noformat}Error: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Facter: error while resolving custom facts in /etc/puppetlabs/code/modules/stdlib/lib/facter/service_provider.rb Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass{noformat}- puppet facts show calls `Facter.resolve` which sets show_legacy to false- when resolving facts, Facter also load modules facts(stdlib)- stdlib has a fact that creates a dummy provider: https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/lib/facter/service_provider.rb- when Facter loads that fact, it calls Puppet to initalize the provider, Puppet tries to see what specific provider is suitable, and when it gets to `init.rb` it calls Facter back, with `operatingsystem`- because `Facter::Options[:show_legacy]` is false, Facter.value(:operatingsystem) returns `nil`, which breaks the call of `downcase`: https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/init.rb#L24This happens because `Facter::Options` is globally set for the entire run.Note that the command is working, and running "puppet facts show  # {fact}" does not log any error  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
   

Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-04 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 

  
 
 
 
 

 
 When running `puppet facts show` and puppetlabs-stdlib is installed, the following error message is shown:{noformat}Error: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Facter: error while resolving custom facts in /etc/puppetlabs/code/modules/stdlib/lib/facter/service_provider.rb Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass{noformat}- puppet facts show calls `Facter.resolve` which sets show_legacy to false- when resolving facts, Facter also load modules facts(stdlib)- stdlib has a fact that creates a dummy provider: https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/lib/facter/service_provider.rb- when Facter loads that fact, it calls Puppet to initalize the provider, Puppet tries to see what specific provider is suitable, and when it gets to `init.rb` it calls Facter back, with `operatingsystem`- because `Facter::Options[:show_legacy]` is false, Facter.value(:operatingsystem) returns `nil`, which breaks the call of `downcase`: https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/init.rb#L24This happens because `Facter::Options` is globally set for the entire run.Note that the command is working, and running "puppet facts show  { fact } " does not log any error  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
  

Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-04 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 

  
 
 
 
 

 
 When running `puppet facts show` and puppetlabs-stdlib is installed, the following error message is shown:{noformat}Error: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Facter: error while resolving custom facts in /etc/puppetlabs/code/modules/stdlib/lib/facter/service_provider.rb Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass{noformat}- puppet facts show calls `Facter.resolve` which sets show_legacy to false- when resolving facts, Facter also load modules facts(stdlib)- stdlib has a fact that creates a dummy provider: https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/lib/facter/service_provider.rb- when Facter loads that fact, it calls Puppet to initalize the provider, Puppet tries to see what specific provider is suitable, and when it gets to `init.rb` it calls Facter back, with `operatingsystem`- because `Facter::Options[:show_legacy]` is false, Facter.value(:operatingsystem) returns `nil`, which breaks the call of `downcase`: https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/init.rb#L24This happens because `Facter::Options` is globally set for the entire run. Note that the command is working, and running `puppet facts show #{fact}` does not log any error  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 

Jira (FACT-2937) 'puppet facts show' logs error when stdlib is installed

2021-02-04 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  'puppet facts show' logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 
 
Summary: 
 Puppet 'puppet  facts show '  logs error when stdlib is installed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.386159.1612446678000.134084.1612505160134%40Atlassian.JIRA.


Jira (FACT-2937) Puppet facts show logs error when stdlib is installed

2021-02-04 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  Puppet facts show logs error when stdlib is installed   
 

  
 
 
 
 

 
Change By: 
 Gheorghe Popescu  
 

  
 
 
 
 

 
 When running `puppet facts show` and puppetlabs-stdlib is installed, the following error message is shown:{noformat}Error: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClassError: Facter: error while resolving custom facts in /etc/puppetlabs/code/modules/stdlib/lib/facter/service_provider.rb Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass{noformat}- puppet facts show calls `Facter.resolve` which sets show_legacy to  fals  false - when resolving facts, Facter also load modules facts(stdlib)- stdlib has a fact that creates a dummy provider: https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/lib/facter/service_provider.rb- when Facter loads that fact, it calls Puppet to initalize the provider, Puppet tries to see what specific provider is suitable, and when it gets to `init.rb` it calls Facter back, with `operatingsystem`- because `Facter::Options[:show_legacy]` is false, Facter.value(:operatingsystem) returns `nil`, which breaks the call of `downcase`: https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/init.rb#L24This happens because `Facter::Options` is globally set for the entire run.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

  

Jira (FACT-2937) Puppet facts show logs error when stdlib is installed

2021-02-04 Thread Gheorghe Popescu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Gheorghe Popescu created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2937  
 
 
  Puppet facts show logs error when stdlib is installed   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2021/02/04 5:51 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Gheorghe Popescu  
 

  
 
 
 
 

 
 When running `puppet facts show` and puppetlabs-stdlib is installed, the following error message is shown:  
 
 
 
 
 Error: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass  
 
 
 Error: Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass  
 
 
 Error: Facter: error while resolving custom facts in /etc/puppetlabs/code/modules/stdlib/lib/facter/service_provider.rb Could not autoload puppet/provider/service/bsd: Could not autoload puppet/provider/service/init: undefined method `downcase' for nil:NilClass
  
 
 
 
  
 
puppet facts show calls `Facter.resolve` which sets show_legacy to fals 
when resolving facts, Facter also load modules facts(stdlib)