| 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>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | | |
- 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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- 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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- 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.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
* adrien/tickets/next/6613:
(#6613) Switch solaris macaddress fact to netstat
|
| |/ /
| | |
| | |
| | |
| | | |
- ifconfig on solaris will only return the mac address if run as root.
netstat -np will provide the information to any user.
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| | |
If xend is not running, xm list writes to stderr and facter propagates
this to the user. Redirect stderr to /dev/null.
|
| |
| |
| |
| |
| | |
The arp command is in /sbin on Fedora/RHEL, not /usr/sbin. Using
Facter::Util::Resolution.exec is preferable to hard-coding the path.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | | |
* tickets/next/6716-osx-ipv6-macaddress:
Clean up indentation, and alignment in macaddress_spec.rb
(#6716) fix facter issues on OSX with ipv6 in macaddress.rb.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Due to "netstat -rn" returning multiple protocols (IPv4 and IPv6) the
"default_interface" can get more than one entry in to it, causing the
macaddress resolving to break. This limits it to just one interface.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The fact now checks for an EC2 ARP or in the EU Zone for an EC2 MAC
This should mean the fact's return is much more robust
The fact also now supports returning userdata (which is a bit ugly
given Facter returns strings but a good bookmark for refactor in 2.0)
|
| | |
| | |
| | |
| | |
| | | |
Added facts arp (like the ipaddress etc) facts
Added facts arp_interfacename
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The EC2 fact is completely broken at the moment:
* Timeout::Error isn't caught by rescue (due to how it inherits)
* The issue of wrong open semantics outlined here, this is causing hidden immediate failure
* The fact is going to cause a 2 second wait to every facter run
Whilst the following patch fixes the first two, I'm not sure we want to take
the timeout hit, we also want to add tests as even simple ruby code can get
logic errors such as the open().
Signed-off-by: Paul Nasrat <pnas...@googlemail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added support for VMWareESX and ESXi to operatingsystem and
operatingsystemrelease facts
Added appropriate tests
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's no easy defined way of getting memory information from the command
line.
Copying mainly the OpenBSD facts, but having to pull in memory free from
the vm_stat utility, and parsing the weird vm.swapusage sysctl value for
swap. Parsing "top -l 1 -n 0" seemed an option, but that took over a
second to run each time, so this appears cheaper.
|
|\ \ \ |
|
| |/ / |
|
| | | |
|