| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
If a requested fact isn't found in the same location as its name, we want to
load all of the facts to find it. However, to simplify that, we were previously
just preloading all the facts every time. Because requesting a fact now
implicitly loads all facts if necessary, we can rely on that, providing results
much more quickly in the case where facts do match their filenames.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the previous behavior, any fact which depended on another fact in a file
not matching its name would fail to properly load the required fact, resulting
in missing, incorrect, or inconsistent values.
For instance, the operatingsystem fact depends on the lsbdistid fact found in
lsb.rb. The first time the operatingsystem fact is requested, it requires
lsb.rb, and so the required fact is loaded first. But if Facter is subsequently
cleared and the operatingsystem fact requested again, the require will not
occur, and the fact will not be automatically loaded because it doesn't match
its filename.
Now if a fact is requested and can't be found, we will attempt to load all the
facts to find it. Such an approach appears heavy-handed, but in the case where
we want a particular fact, this is the only way to make sure we've found it. In
the case where we eventually want other facts, we are conveniently eagerly
loading them.
Paired-With: Jacob Helwig <jacob@puppetlabs.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* next: (32 commits)
(#7507) Fix 1.9.2 test failure
Removed inappropriately uncredited Ohai method from ec2 fact
(#6614) Update ipaddress6 fact to work with Ruby 1.9
(#6612) Changed uptime spec to be endian agnostic
(#6728) Facter improperly detects openvzve on CloudLinux systems
(#5135) Fix faulty logic in physicalprocessorcount
Ensures that ARP facts are returned only on EC2 hosts
Fixed #6974 - Moved to Apache 2.0 license
refactor the mechanism for allowing for resolution ordering to be influenced
(#6740) facter doesn't always respect facts in environment variables
Partial fix for #6971 - Fix for virtual tests
(#2714) Fixed faulty test
(#2714) Added timeout to prtdiag resulution
(#5135) Refactored physicalprocessorcount
Re-factor. Do not use pure-Ruby file reading against "/proc/cpuinfo" and possibly any entry under "/sys" from the sysfs file system.
Fix. Using sysfs file system entries to count the number of physical CPUs. Fall-back to "/proc/cpuinfo" included for backward-compatibility with legacy systems.
(#3856) Add virtualbox detection via lspci (graphics card), dmidecode, and prtdiag for Solaris and corresponding tests. Darwin case is not handled yet.
(#6883) Update Facter install.rb to be slightly more informative.
(#5394) Document each Facter fact.
(#6862) Add a default subject for the mail_patches rake task
...
|
| |\
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
* master:
Update CHANGELOG for 1.5.9
Updated CHANGELOG for 1.5.9rc6
Removed inappropriately uncredited Ohai method from ec2 fact
Add facter test for ticket 7039
downcase arp output so that the ec2 arp is matched
(#7039) Pre-load all facts when requesting a single fact
|
| | |
|
| | |
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
CentOS 5.4 arp gives the arp output as uppercase; downcase it so
we're ensured a match
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
* tickets/master/7039-multiple-facts-same-file:
(#7039) Pre-load all facts when requesting a single fact
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Since multiple facts can be defined in a single file and we have no
way of knowing which "additional" facts are defined in which files, we
pre-load all facts when we're looking for specific one.
Paired-with: Max Martin <max@puppetlabs.com>
|
| |\
| | |
| | |
| | |
| | | |
* ticket/next/7507-ruby19_fix:
(#7507) Fix 1.9.2 test failure
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Dir.glob returns an array, but a test was stubbing it to return a
string. In Ruby 1.8.7 if you call enumerable methods (each, collect,
etc) on a string, the string is split on \n first. This meant the poor
stubbing didn't affect 1.8.7, but 1.9.2 is more strict and won't
automatically convert when you call enumerable methods on strings.
Paired-with: Josh Cooper <josh@puppetlabs.com>
|
| | |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'ticket/next/6728-facter_improperly_detects_openvzve_on_cloudlinux_systems' into next
* ticket/next/6728-facter_improperly_detects_openvzve_on_cloudlinux_systems:
(#6728) Facter improperly detects openvzve on CloudLinux systems
(#6883) Update Facter install.rb to be slightly more informative.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make the openvz check for more than just the vz directory to be sure it's
OpenVZ.
Update the OpenVZ fact to be slightly more resilient in it's checking of
OpenVZ, so it doesn't clash with CloudLinux's LVE container system.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Give slightly more information to the user when installing facter and the
pre-requisite Ruby libraries are not installed.
In the case of OpenSSL, the user can have OpenSSL installed, and not the
gem/library, but the error message given in no way hints to this.
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* tickets/next/6614-ipaddress6-ruby-19-compat:
(#6614) Update ipaddress6 fact to work with Ruby 1.9
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Calling #to_s on an Array such as ["foo"] in Ruby 1.9 will result in
the string '["foo"]', instead of stringifying the element in the array
which would have given the expected result of "foo". Since the
element of the array we're dealing with is already a string, we can
just grab it out of the array by using #first.
Paired-with: Josh Cooper <josh@puppetlabs.com>
|
| |\ \ \
| | |/ /
| |/| | |
|
| |/ /
| | |
| | |
| | |
| | | |
The sysctl uptime fixture was little endian, which fails on sparc
hardware. Added a big endian fixture and endian detection.
|
| |\ \
| |/ /
|/| |
| | |
| | |
| | | |
* master:
Update CHANGELOG for 1.5.9rc5
Ensures that ARP facts are returned only on EC2 hosts
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ARP facts on large network might lead to inconstant values
as we are always using the first ARP entry from the output of the ARP
command
Signed-off-by: Ohad Levy <ohadlevy@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
- Was doing unnessary string manipulation when all that needed to be
done was a uniq'd array.
- Removed some backwards way of nil checking.
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* tickets/master/6976:
Ensures that ARP facts are returned only on EC2 hosts
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
ARP facts on large network might lead to inconstant values
as we are always using the first ARP entry from the output of the ARP
command
Signed-off-by: Ohad Levy <ohadlevy@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is in line with our proposed plan to change
from the GPL license to Apache 2.0.
Please see this link for further explanation:
https://groups.google.com/d/topic/puppet-users/NuspYhMpE5o/discussion
|
| | |
| | |
| | |
| | |
| | | |
renames Facter::Util::Resolution#length to weight as a more generic
mechanism for allowing resolutions to state their importance
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On an OSX host:
$ facter operatingsystem
Darwin
$ facter_operatingsystem=Not_Darwin facter operatingsystem
Not_Darwin
But on a linux/solaris host:
$ facter operatingsystem
CentOS
$ facter_operatingsystem=Not_CentOS facter operatingsystem
CentOS
As the operatingsystem fact resolution for linux-based kernels has higher
precedence than the environment variable as it has more matching confines than
the value from the environment variable.
This patch adds from_environment to the resolution mechanism, which makes the
resolution have an artificially high weight by claiming the length of its
confines array is 1 billion.
|
| | | |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* adrien/tickets/next/6719:
(#6719) Corrected faulty logic in bugfix
Conflicts:
lib/facter/virtual.rb
|
| | | | |
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* adrien/tickets/next/2714:
(#2714) Fixed faulty test
(#2714) Added timeout to prtdiag resulution
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Looks like some copy/paste added some linux tests that relied on
prtdiag, which isn't possible. Corrected them to check against
solaris.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- prtdiag would hang in specific cases, subsequently hanging facter.
This should kill prtdiag if it takes excessively long.
|
| |\ \ \ \
| | |/ / /
| |/| | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
- Refactored code to make testing simpler
|
| | | | |
| | | | |
| | | | |
| | | | | |
possibly any entry under "/sys" from the sysfs file system.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Fall-back to "/proc/cpuinfo" included for backward-compatibility with legacy systems.
|
| | | | |
| | | | |
| | | | |
| | | | | |
prtdiag for Solaris and corresponding tests. Darwin case is not handled yet.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Give slightly more information to the user when installing facter and the
pre-requisite Ruby libraries are not installed.
In the case of OpenSSL, the user can have OpenSSL installed, and not the
gem/library, but the error message given in no way hints to this.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Document all the builtin Facter facts in puppetdoc/rdoc format.
This is laying the ground work for using a tool like puppet doc, or puppet
describe but for facter, so you can see what a fact is for and how it
resolves this. This is the "leg work" of documenting the actual facts, and
the syntax of them may change in future.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This will prevent committers to forget to write cover letter subject
when rake mail_patches needs to send multiple e-mails.
It defaults to the "type" and "branch name" of the patch-set.
This is taken from Brice's patch against Puppet
(37f9ca09135330ed180fb68d9295a4967a5cc857).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- ifconfig on solaris will only return the mac address if run as root.
netstat -np will provide the information to any user.
|
| | | | | |
|
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | | |
prtdiag for Solaris and corresponding tests. Darwin case is not handled yet.
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
'barn/tickets/next/5394-Improve_Facter_fact_value_documentation' into next
* barn/tickets/next/5394-Improve_Facter_fact_value_documentation:
(#5394) Document each Facter fact.
|