Jira (FACT-2883) Gem-based Facter 4.0.x does not log the facts in debug mode

23 views
Skip to first unread message

Sanjay Tripathi (Jira)

unread,
Dec 1, 2020, 9:09:03 PM12/1/20
to puppe...@googlegroups.com
Sanjay Tripathi created an issue
 
Facter / Bug FACT-2883
Gem-based Facter 4.0.x does not log the facts in debug mode
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/12/01 6:08 PM
Priority: Normal Normal
Reporter: Sanjay Tripathi

Add new os support on litmus modules

Before to start, make sure the new platform is provided by vmpooler and it's fully equipped
an image with the new os is available from puppet agent team

Here you can find a list with all the converted modules to use litmus

Step1: Using pdksync, check/update metadata.json, ci-job-configs/jenkii/platform/projects/modules-unified.yaml

metadata.json file

  • check for section: operatingsystem_support
  • add new version under the intended operatingsystem and save

ci-job-configs/jenkii/platform/projects/modules-unified.yaml

  • check for the module and add new platform under smoke_platforms| pe_platforms (if this platform was released)

Step2: Using pdksync, create PR with the changes on modules
Step3: Create PR on ci-job-configs
Step4: Deploy experimental platform intended module
Step5: Run ad-hoc tests using that experimental
Step6: Check testing results
Step7: If failures, fix them, re-execute all the testing part until they are green
Step8: Ask for review/merge

check for vmpooler platform
pdksync: update metadata.json
pdksync: push changes, create commit
create PR on ci-job-configs
deploy experimental platform intended module
run tests through ad-hoc jenkins using that experimental
check testing report
if failures, fix them, re-execute ad-hoc until they are green
review/merge PR

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

Sanjay Tripathi (Jira)

unread,
Dec 1, 2020, 9:09:03 PM12/1/20
to puppe...@googlegroups.com

Sanjay Tripathi (Jira)

unread,
Dec 1, 2020, 9:14:02 PM12/1/20
to puppe...@googlegroups.com
Sanjay Tripathi commented on Bug FACT-2883
 
Re: Gem-based Facter 4.0.x does not log the facts in debug mode

In debug mode, native facter logs the fact and its value - as in the following example:

Facter: fact "fqdn" has resolved to "mymachine.mydomain.com".

This is very helpful in debugging.

But the gem-based facter does not log the value in the debug mode – instead it logs the cryptic messages, like:

Facter: User query is: ["fqdn"]
Facter: Query is fqdn
Checking query tokens fqdn
Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00000219b7a0dfc0 @name="fqdn", @fact_class=Facts::Windows::Networking::Fqdn, @filter_tokens=[], @user_query="fqdn", @type=:legacy, @file=nil>]

This is not helpful at all. Please change the debug logging to the previous format of logging the value. Also, it would help to avoid the unnecessary clutter, as in the above example of fqdn.

Bogdan Irimie (Jira)

unread,
Dec 2, 2020, 3:05:03 AM12/2/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
 
Change By: Bogdan Irimie
Sprint: ghost-2.12
Sub-team: ghost
Team: Night's Watch

Bogdan Irimie (Jira)

unread,
Dec 2, 2020, 6:51:03 AM12/2/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Dec 2, 2020, 11:41:03 AM12/2/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Dec 2, 2020, 11:41:04 AM12/2/20
to puppe...@googlegroups.com
Bogdan Irimie commented on Bug FACT-2883
 
Re: Gem-based Facter 4.0.x does not log the facts in debug mode

Hi Sanjay Tripathi, please give https://github.com/puppetlabs/facter/pull/2203/files a try and let me know if the new log suites your needs.

A snippet from the new log:

[2020-12-02 16:03:27.230497 ] DEBUG Facter::FactManager - fact "os.release" has resolved to: {"full"=>"20.1.0", "major"=>"20", "minor"=>"1"} 
[2020-12-02 16:03:27.230507 ] DEBUG Facter::FactManager - fact "os.macosx.product" has resolved to: macOS 
[2020-12-02 16:03:27.230519 ] DEBUG Facter::FactManager - fact "os.macosx.version" has resolved to: {"full"=>"11.0.1", "major"=>"11.0", "minor"=>"1"} 
[2020-12-02 16:03:27.230528 ] DEBUG Facter::FactManager - fact "os.macosx.build" has resolved to: 20B29 
[2020-12-02 16:03:27.230537 ] DEBUG Facter::FactManager - fact "os.name" has resolved to: Darwin 
[2020-12-02 16:03:27.230546 ] DEBUG Facter::FactManager - fact "os.hardware" has resolved to: x86_64 
[2020-12-02 16:03:27.230555 ] DEBUG Facter::FactManager - fact "os.architecture" has resolved to: x86_64 
[2020-12-02 16:03:27.230566 ] DEBUG Facter::FactManager - fact "os.family" has resolved to: Darwin 
[2020-12-02 16:03:27.230574 ] DEBUG Facter::FactManager - fact "kernelversion" has resolved to: 20.1.0 
[2020-12-02 16:03:27.230657 ] DEBUG Facter::FactManager - fact "kernelrelease" has resolved to: 20.1.0 
[2020-12-02 16:03:27.230677 ] DEBUG Facter::FactManager - fact "processors.isa" has resolved to: i386 
[2020-12-02 16:03:27.230690 ] DEBUG Facter::FactManager - fact "processors.physicalcount" has resolved to: 6 
[2020-12-02 16:03:27.230700 ] DEBUG Facter::FactManager - fact "processors.speed" has resolved to: 2.20 GHz 

 

Regarding the other debug messages, they are helpful in diagnostic other types of errors and they should remain.

Sanjay Tripathi (Jira)

unread,
Dec 2, 2020, 1:26:03 PM12/2/20
to puppe...@googlegroups.com

Yes, the logging would be helpful as shown in the above snippet. Thanks for the prompt response. Can we minimize the other facter-related debug logging to avoid clutter?

Josh Cooper (Jira)

unread,
Dec 2, 2020, 2:10:04 PM12/2/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Dec 3, 2020, 12:32:03 PM12/3/20
to puppe...@googlegroups.com
Bogdan Irimie commented on Bug FACT-2883
 
Re: Gem-based Facter 4.0.x does not log the facts in debug mode

Sanjay Tripathi great, glad you like the new debug messages. They should get in the next release https://github.com/puppetlabs/facter/pull/2203 

Regarding the other debug messages we don't plan to remove them as they help us debug complex use cases.

Josh Cooper (Jira)

unread,
Dec 4, 2020, 10:22:02 AM12/4/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Add new os support on litmus modules

*Before to start, make sure the new platform is provided by vmpooler and it's fully equipped*
*an image with the new os is available from puppet agent team*

[Here|https://confluence.puppetlabs.com/display/ECO/How+to+add+support+for+new+platforms] you can find a list with all the converted modules to use litmus


Step1: Using pdksync, check/update metadata.json, ci-job-configs/jenkii/platform/projects/modules-unified.yaml

*metadata.json file*
- check for section: operatingsystem_support
- add new version under the intended operatingsystem and save

*[ci-job-configs/jenkii/platform/projects/modules-unified.yaml|https://github.com/puppetlabs/ci-job-configs/blob/master/jenkii/platform/projects/modules-unified.yaml]*
- check for the module and add new platform under smoke_platforms| pe_platforms (if this platform was released)


Step2: Using pdksync, create PR with the changes on modules

Step4: Deploy experimental platform intended module
Step5: Run ad-hoc tests using that experimental
Step6: Check testing results
Step7: If failures, fix them, re-execute all the testing part until they are green
Step8: Ask for review/merge

(-) check for vmpooler platform
(-) pdksync: update metadata.json
(-) pdksync: push changes, create commit
(-) create PR on ci-job-configs
(-) deploy experimental platform intended module
(-) run tests through ad-hoc jenkins using that experimental
(-) check testing report
(-) if failures, fix them, re-execute ad-hoc until they are green
(-) review/merge PR

Josh Cooper (Jira)

unread,
Dec 4, 2020, 10:22:04 AM12/4/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
In debug mode, native facter logs the fact and its value - as in the following example:

Facter: fact "fqdn" has resolved to "mymachine.mydomain.com".

This is very helpful in debugging.

But the gem-based facter does not log the value in the debug mode – instead it logs the cryptic messages, like:

Facter: User query is: ["fqdn"]
Facter: Query is fqdn
Checking query tokens fqdn
Facter: List of resolvable facts: [#<Facter::SearchedFact:0x00000219b7a0dfc0 @name="fqdn", @fact_class=Facts::Windows::Networking::Fqdn, @filter_tokens=[], @user_query="fqdn", @type=:legacy, @file=nil>]

Mihai Buzgau (Jira)

unread,
Dec 9, 2020, 7:24:04 AM12/9/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages