Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Avoid exceptions for zone facts on FreeBSD #412

Conversation

smortex
Copy link
Contributor

@smortex smortex commented Mar 25, 2020

FreeBSD currently loads all Solaris facts, but FreeBSD does not have "zones", and the zone related facts fail hardly when being processed.

Improve error detection when building the zone facts, and do not emit these facts when an error occurred.

This fixes the following errors:

#<Thread:0x0000000804e91810@/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:23 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
	13: from /usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:25:in `block (2 levels) in start_threads'
	12: from /usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'
	11: from /usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'
	10: from /usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'
	 9: from /usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'
	 8: from /usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'
	 7: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'
	 6: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'
	 5: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'
	 4: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'
	 3: from /usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'
	 2: from /usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'
	 1: from /usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'
/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn': No such file or directory - /usr/sbin/zoneadm (Errno::ENOENT)
#<Thread:0x0000000804e916f8@/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:23 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
	13: from /usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:25:in `block (2 levels) in start_threads'
	12: from /usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'
	11: from /usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/current.rb:11:in `call_the_resolver'
	10: from /usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'
	 9: from /usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'
	 8: from /usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'
	 7: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `post_resolve'
	 6: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `fetch'
	 5: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `block in post_resolve'
	 4: from /usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:17:in `build_current_zone_name_fact'
	 3: from /usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'
	 2: from /usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'
	 1: from /usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'
/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn': No such file or directory - /bin/zonename (Errno::ENOENT)

@smortex smortex requested review from a team March 25, 2020 18:20
@smortex smortex force-pushed the improve-solaris-facts-failure-resilience branch from 4fb3469 to 3ba06cc Compare March 25, 2020 18:26
@smortex
Copy link
Contributor Author

smortex commented Mar 25, 2020

Please note that this PR is not enough to run Facter 4 on FreeBSD: I try to isolate each issue and handle them independently. Thanks!

@smortex smortex force-pushed the improve-solaris-facts-failure-resilience branch 2 times, most recently from 26798cb to c4a8b3a Compare March 25, 2020 19:16
@BogdanIrimie
Copy link
Contributor

@smortex Thank you for the PR. I made an experimental error handling mechanism that would help us in identifying quickly all the errors https://github.com/puppetlabs/facter-ng/tree/experimental_error_handling_for_facts please give it a try.

@smortex
Copy link
Contributor Author

smortex commented Mar 25, 2020

@IrimieBogdan nice! When running your branch without my patch, I get:

[2020-03-25 10:32:15.827569 ] ERROR Facter::InternalFactManager - Error while resolving fact: solaris_zones.zones, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.827960 ] ERROR Facter::InternalFactManager - Error while resolving fact: zone_.*_brand, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.828303 ] ERROR Facter::InternalFactManager - Error while resolving fact: zone_.*_iptype, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.828663 ] ERROR Facter::InternalFactManager - Error while resolving fact: zone_.*_name, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.829012 ] ERROR Facter::InternalFactManager - Error while resolving fact: zone_.*_uuid, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.829348 ] ERROR Facter::InternalFactManager - Error while resolving fact: zone_.*_id, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.834362 ] ERROR Facter::InternalFactManager - Error while resolving fact: zone_.*_path, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.834961 ] ERROR Facter::InternalFactManager - Error while resolving fact: zone_.*_status, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.835518 ] ERROR Facter::InternalFactManager - Error while resolving fact: zones, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:18:in `build_zone_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/zone_resolver.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/zone.rb:23:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.836471 ] ERROR Facter::InternalFactManager - Error while resolving fact: solaris_zones.current, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:17:in `build_current_zone_name_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/current.rb:11:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 
[2020-03-25 10:32:15.836550 ] ERROR Facter::InternalFactManager - Error while resolving fact: zonename, ["/usr/local/lib/ruby/2.6/open3.rb:213:in `spawn'", "/usr/local/lib/ruby/2.6/open3.rb:213:in `popen_run'", "/usr/local/lib/ruby/2.6/open3.rb:159:in `popen2'", "/usr/local/lib/ruby/2.6/open3.rb:342:in `capture2'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:17:in `build_current_zone_name_fact'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `block in post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `fetch'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/solaris/solaris_zone_name.rb:13:in `post_resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:21:in `block in resolve'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `synchronize'", "/usr/home/romain/Projects/facter-ng/lib/resolvers/base_resolver.rb:19:in `resolve'", "/usr/home/romain/Projects/facter-ng/lib/facts/solaris/solaris_zones/current.rb:11:in `call_the_resolver'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/core_fact.rb:12:in `create'", "/usr/home/romain/Projects/facter-ng/lib/framework/core/fact/internal/internal_fact_manager.rb:29:in `block (2 levels) in start_threads'"] 

When I merge my branch, these errors are not reported anymore. Thanks!

@smortex
Copy link
Contributor Author

smortex commented Mar 25, 2020

Rubocop does not report any error when running on my system. Is it possible to have the CI report the "2 new offenses" detected to fix them?

@BogdanIrimie
Copy link
Contributor

Sure, you can remove the files that you have changed from https://github.com/puppetlabs/facter-ng/blob/master/.rubocop_todo.yml and rubocop will report the errors in those files.

FreeBSD currently loads all Solaris facts, but FreeBSD does not have
"zones", and the zone related facts fail hardly when being processed.

Improve error detection when building the zone facts, and do not emit
these facts when an error occurred.
@smortex smortex force-pushed the improve-solaris-facts-failure-resilience branch from c4a8b3a to aa60dcc Compare March 25, 2020 21:15
@BogdanIrimie
Copy link
Contributor

@smortex excellent job with this PR!

@BogdanIrimie BogdanIrimie merged commit 54f6570 into puppetlabs:master Mar 26, 2020
@smortex smortex deleted the improve-solaris-facts-failure-resilience branch March 26, 2020 17:09
@oanatmaria oanatmaria added community bugfix Something isn't working labels Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Something isn't working community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants