Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Night's Watch
-
5
-
NW - 2021-03-17
-
Needs Assessment
-
Bug Fix
-
-
Needs Assessment
Description
Facter 4 implements `Facter.value` differently than Facter 3.
On Facter 3, search is done in multiple steps, and the next step is executed only if the previous one was not able to resolve the fact:
- search in the internal collection
- load the `fact_name.rb` from the configured custom directories
- load all the core facts, external facts and env facts
- load all custom facts
Calling `Facter.value(:os)` will:
- search for `os` in its internal collection
- load `custom_dir/os.rb`
- load core, external and env facts
Calling `Facter.value(:custom_fact)` will:
- search for `custom_fact` in its internal collection
- load `custom_dir/custom_fact.rb`
- load core, external and env facts
- load all custom facts
On Facter 4, when `Facter.value` is called, Facter will load all the core facts and all the custom facts, then will resolve only the facts that match the requested query.
Due to this issue, puppet may not be able to manage services, because puppet selects base as the default service provider instead of systemd:
change from 'stopped' to 'running' failed: Services must specify a start command or a binary (corrective)
|