Jira (FACT-2497) Facts are resolved multiple times

2020-03-31 Thread Romain Tartière
Title: Message Title


 
 
 
 

 
 
 

 
   
 Romain Tartière commented on  FACT-2497  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Facts are resolved multiple times   
 

  
 
 
 
 

 
 Awesome, after rebasing my work on top of master, the right values are collected! 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.351133.1585166799000.25970.1585674780235%40Atlassian.JIRA.


Jira (FACT-2497) Facts are resolved multiple times

2020-03-31 Thread Bogdan Irimie (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bogdan Irimie commented on  FACT-2497  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Facts are resolved multiple times   
 

  
 
 
 
 

 
 Romain Tartière today we merged https://tickets.puppetlabs.com/browse/FACT-2498 into master. This PR resolved the loading order of facts when using a OS hierarchy. You should be able to override facts from Solaris in Bsd, please let me know if it works for you.  
 

  
 
 
 
 

 
 
 

 
 
 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.351133.1585166799000.25651.1585665780492%40Atlassian.JIRA.


Jira (FACT-2497) Facts are resolved multiple times

2020-03-26 Thread Bogdan Irimie (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bogdan Irimie commented on  FACT-2497  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Facts are resolved multiple times   
 

  
 
 
 
 

 
 Romain Tartière thank you for reporting the issue. There seem to be two distinct problems: 
 
the internal fact loader loads all facts from hierarchy, even facts that are duplicated 
facts with aliases are resolved multiple times 
 I have broken the issue in two subtask.  
 

  
 
 
 
 

 
 
 

 
 
 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.351133.1585166799000.21320.1585217040048%40Atlassian.JIRA.


Jira (FACT-2497) Facts are resolved multiple times

2020-03-25 Thread Bogdan Irimie (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bogdan Irimie assigned an issue to Bogdan Irimie  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2497  
 
 
  Facts are resolved multiple times   
 

  
 
 
 
 

 
Change By: 
 Bogdan Irimie  
 
 
Assignee: 
 Bogdan Irimie  
 

  
 
 
 
 

 
 
 

 
 
 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.351133.1585166799000.21000.1585170300031%40Atlassian.JIRA.


Jira (FACT-2497) Facts are resolved multiple times

2020-03-25 Thread Romain Tartière
Title: Message Title


 
 
 
 

 
 
 

 
   
 Romain Tartière updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2497  
 
 
  Facts are resolved multiple times   
 

  
 
 
 
 

 
Change By: 
 Romain Tartière  
 

  
 
 
 
 

 
 *Puppet Version:* N/A — 6.14.0*Puppet Server Version:* N/A — 6.9.2*OS Name/Version:* FreeBSDWhile adding support of FreeBSD to facter-ng, we discovered that the fact resolution was not behaving as expected. Inspecting the resolved facts after this line: [ https://github.com/puppetlabs/facter-ng/blob/6323e3b6ef72271aa8176ad9662d649dc5442a53/lib/framework/core/fact/internal/internal_fact_manager.rb#L40 ] shows that a single fact (os.release) was resolved with by the Solaris and the Bsd providers, and they have been resolved multiple times (at the time of writting, the bsd provider is not part of facter yet):{{puts resolved_facts.select \{ |r| r.name == 'os.release'  \ }.map(&:value)}}{{  {"full"=>nil, "major"=>nil, "minor"=>nil}   \ {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  {"full"=>nil, "major"=>nil, "minor"=>nil}   \ {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}   \ {"full"=>nil, "major"=>nil, "minor"=>nil}  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}   \ {"full"=>nil, "major"=>nil, "minor"=>nil}   \ {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  {"full"=>nil, "major"=>nil, "minor"=>nil}   \ {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}   \ {"full"=>nil, "major"=>nil, "minor"=>nil}  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  }}*Desired Behavior:*The fact should be resolved only once and only with the appropriate provider.*Actual Behavior:*Facts are resolved by multiple providers multiple times.Current WIP FreeBSD provider for os.release :{{# frozen_string_literal: truemodule Facts  module Bsdmodule Os  class ReleaseFACT_NAME = 'os.release'ALIASES = %w[operatingsystemmajrelease operatingsystemrelease].freezedef call_the_resolver   puts "#{Thread.current} FREE"   /(?(?\d+)\.(?\d+)-(?CURRENT|STABLE|RELEASE(-p(?\d+))?))/ =~ `/bin/freebsd-version`  [Facter::ResolvedFact.new(FACT_NAME, full: full_value, major: major_value, minor: minor_value, branch: branch_value, patchlevel: patchlevel_value),   Facter::ResolvedFact.new(ALIASES.first, major_value, :legacy),   Facter::ResolvedFact.new(ALIASES.last, full_value, :legacy)]end  endend  endend}}  
 

  
 
 
 
 

 

Jira (FACT-2497) Facts are resolved multiple times

2020-03-25 Thread Oana Tanasoiu (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oana Tanasoiu updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2497  
 
 
  Facts are resolved multiple times   
 

  
 
 
 
 

 
Change By: 
 Oana Tanasoiu  
 
 
Sub-team: 
 ghost  
 
 
Team: 
 Night's Watch  
 

  
 
 
 
 

 
 *Puppet Version:* N/A — 6.14.0 *Puppet Server Version:* N/A — 6.9.2 *OS Name/Version:* FreeBSDWhile adding support of FreeBSD to facter-ng, we discovered that the fact resolution was not behaving as expected. Inspecting the resolved facts after this line: [ https://github.com/puppetlabs/facter-ng/blob/6323e3b6ef72271aa8176ad9662d649dc5442a53/lib/framework/core/fact/internal/internal_fact_manager.rb#L40 ] shows that a single fact (os.release) was resolved with by the Solaris and the Bsd providers, and they have been resolved multiple times (at the time of writting, the bsd provider is not part of facter yet):{{puts resolved_facts.select \{ |r| r.name == 'os.release'  \  }.map(&:value)}}{{  {"full"=>nil, "major"=>nil, "minor"=>nil}  \  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  {"full"=>nil, "major"=>nil, "minor"=>nil}  \  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  \  {"full"=>nil, "major"=>nil, "minor"=>nil}  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  \  {"full"=>nil, "major"=>nil, "minor"=>nil}  \  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  {"full"=>nil, "major"=>nil, "minor"=>nil}  \  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  \  {"full"=>nil, "major"=>nil, "minor"=>nil}  {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}  }}*Desired Behavior:*The fact should be resolved only once and only with the appropriate provider.*Actual Behavior:*Facts are resolved by multiple providers multiple times.Current WIP FreeBSD provider for os.release :{{# frozen_string_literal: truemodule Facts module Bsd module Os class Release FACT_NAME = 'os.release' ALIASES = %w[operatingsystemmajrelease operatingsystemrelease].freezedef call_the_resolver   puts "#{Thread.current} FREE"  /(?(?\d+)\.(?\d+)-(?CURRENT|STABLE|RELEASE(-p(?\d+))?))/ =~ `/bin/freebsd-version`[Facter::ResolvedFact.new(FACT_NAME, full: full_value, major: major_value, minor: minor_value, branch: branch_value, patchlevel: patchlevel_value), Facter::ResolvedFact.new(ALIASES.first, major_value, :legacy), Facter::ResolvedFact.new(ALIASES.last, full_value, :legacy)] end end end end end }}  
 

Jira (FACT-2497) Facts are resolved multiple times

2020-03-25 Thread Romain Tartière
Title: Message Title


 
 
 
 

 
 
 

 
   
 Romain Tartière created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Facter /  FACT-2497  
 
 
  Facts are resolved multiple times   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Affects Versions: 
 FACT 4.0.13  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2020/03/25 1:06 PM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Romain Tartière  
 

  
 
 
 
 

 
 Puppet Version: N/A — 6.14.0 Puppet Server Version: N/A — 6.9.2 OS Name/Version: FreeBSD While adding support of FreeBSD to facter-ng, we discovered that the fact resolution was not behaving as expected. Inspecting the resolved facts after this line: https://github.com/puppetlabs/facter-ng/blob/6323e3b6ef72271aa8176ad9662d649dc5442a53/lib/framework/core/fact/internal/internal_fact_manager.rb#L40 shows that a single fact (os.release) was resolved with by the Solaris and the Bsd providers, and they have been resolved multiple times (at the time of writting, the bsd provider is not part of facter yet): puts resolved_facts.select { |r| r.name == 'os.release' }.map(&:value) {{ {"full"=>nil, "major"=>nil, "minor"=>nil} {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}{"full"=>nil, "major"=>nil, "minor"=>nil} {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"} {"full"=>nil, "major"=>nil, "minor"=>nil}{"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"} {"full"=>nil, "major"=>nil, "minor"=>nil} {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"}{"full"=>nil, "major"=>nil, "minor"=>nil} {"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"} {"full"=>nil, "major"=>nil, "minor"=>nil}{"full"=>"12.1-RELEASE-p3", "major"=>"12", "minor"=>"1", "branch"=>"RELEASE-p3", "patchlevel"=>"3"} }} Desired Behavior: The fact should be resolved only once and only with the appropriate provider. Actual Behavior: Facts are resolved by multiple providers multiple times. Current WIP FreeBSD provider for os.release : {{# frozen_s