summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Use boot_rom_version to detect VMware guests on macOSTim Smith2018-03-271-2/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Detect virtualbox and vmware guests on MacsTim Smith2018-03-271-0/+20
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* adds test where we saw whitespace conditionRichard Mcleod2018-03-271-5/+9
| | | | Signed-off-by: Richard Mcleod <rmcleod8@ip-1-70-103-68.dob1.bcpc.bloomberg.com>
* Fix for chefstyle -S.Cavallo2018-03-141-1/+1
| | | | | | spec/unit/plugins/cloud_spec.rb:454:31: C: Style/TrailingCommaInLiteral: Put a comma after the last item of a multiline hash. Signed-off-by: S.Cavallo <smcavallo@hotmail.com>
* add ohai support for softlayer cloudS.Cavallo2018-03-141-0/+36
| | | | Signed-off-by: S.Cavallo <smcavallo@hotmail.com>
* (chef/ohai#1110) Adds case to virtualization_spec.David Salazar2018-01-101-0/+24
|
* Add a plugin to provide PCI bus information using `lspci`. (#1107)Phil Dibowitz2018-01-031-0/+131
| | | | | | | | | This is based on an original plugin from: https://github.com/GLOBAL2000/chef-ohai-plugins/ With modifications from the fork here: https://github.com/GLOBAL2000/chef-ohai-plugins/ Signed-off-by: Phil Dibowitz <phil@ipom.com>
* [linux/network] Tunnel information (#1104)Phil Dibowitz2017-12-191-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gathers extra information on tunnel devices. Unfortunately iproute2 is a little inconsistent as to how it prints these out, some are booleans some are key values, but there's no way to tell them apart other than to know, so I parse the ones I know about (from reading the source), and ignore anything else. Note that I didn't add any ifconfig support to the tests. This is for a few reasons: 1. the output in the tests from ifconfig is ancient, ifconfig on linux doesn't look like that anymore, it looks like this: ``` eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.1.1.2 netmask 255.255.255.0 broadcast 10.1.1.255 inet6 2601:645:c001:56bb::2 prefixlen 64 scopeid 0x0<global> inet6 fe80::52e5:49ff:fe38:d761 prefixlen 64 scopeid 0x20<link> ether 50:e5:49:38:d7:61 txqueuelen 1000 (Ethernet) RX packets 203501353 bytes 98738916585 (91.9 GiB) RX errors 0 dropped 559 overruns 0 frame 0 TX packets 1035989265 bytes 1458478887585 (1.3 TiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ``` And I couldn't find a machine old enough to generate the type of output in the tests *and* have modern ip6tunnel drivers on it. So don't ask. :) 2. Only iproute2 shows the extra tunnel info anyway, so it's not really useful to do have the interface in the ifconfig output. Note I will backport this to Ohai 8 after this is merged. Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Remove extra ()s on methodsredundantTim Smith2017-12-023-8/+8
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #1081 from zfjagann/masterTim Smith2017-11-281-0/+13
|\ | | | | Added systemd-nspawn virtualization detection
| * Removed mock for File.exists? in nspawn specZeal Jagannatha2017-11-201-1/+0
| | | | | | | | Signed-off-by: Zeal Jagannatha <zealjagannatha@gmail.com>
| * Fixed chefstyle issueZeal Jagannatha2017-11-201-1/+1
| | | | | | | | Signed-off-by: Zeal Jagannatha <zealjagannatha@gmail.com>
| * Added systemd-nspawn virtualization detectionZeal Jagannatha2017-11-201-0/+14
| | | | | | | | Signed-off-by: Zeal Jagannatha <zealjagannatha@gmail.com>
* | [mdadm] Handle journal and spare devices properly (#1094)Phil Dibowitz2017-11-271-2/+23
|/ | | | | | | | | | | | | | | | Journal and spare devices are important to report clearly. This puts them in their own arrays. I'd like to backport this to 12.x - but it's unclear here what backwards compat here is. I *could* put *all* devices into `members` and then also specify special members in their own list... but prior to me fixing this plugin a few months, ago, spares and journal wouldn't have been reported anyway... and it is probably incorrect to report them as normal members... so this feels like a further fix on a previous fix, so I've opted for just fixing it. However, let me know how you guys feel. Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Add support for Linux MemAvailableDzmitry Pasiukevich2017-11-121-0/+6
| | | | Signed-off-by: Dzmitry Pasiukevich <dpasiukevich@gmail.com>
* [mdadm] Support arrays more than 10 disksPhil Dibowitz2017-11-081-0/+14
| | | | Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Update EC2 specsTim Smith2017-11-071-4/+34
| | | | | | Make sure we have line returns as well since that's burned us before in specs Signed-off-by: Tim Smith <tsmith@chef.io>
* Add a VERY basic windows specrackspace_windowsTim Smith2017-10-241-0/+12
| | | | | | | All we have is the main rackspace attribute and since we're checking ruby versions in the method we can't really mock out the wmi stuff. Signed-off-by: Tim Smith <tsmith@chef.io>
* Updating AIX uptime_seconds to reflect elapsed seconds from boot rather than ↵rmcleod82017-10-131-2/+1
| | | | | | epoch Signed-off-by: rmcleod8 <richard.mcleod@gmail.com>
* also check for lxc-startJose Asuncion2017-10-061-5/+13
| | | | Signed-off-by: Jose Asuncion <jeunito@gmail.com>
* Fix regression in #1047 (#1066)Phil Dibowitz2017-10-041-1/+10
| | | | | | | | PR #1047 allows a plugin to return partial data which may be incredibly dangerous. It's a totally reasonable thing to want, however, so we gate it behind a plugin config. However, the default behavior reverts to where it was. Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Critical Plugins (#1064)Phil Dibowitz2017-10-041-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new Ohai configuration `critical_plugins` which will cause Ohai to exit (or `fail` if inside of Chef) if the plugins in the list do not run successfully. This feature only supports Ohai 7-style named plugins, not the ancient Ohai 6-style stuff. Tests to follow, but: ``` $ cat /home/phild/ohai.rb ohai.critical_plugins << :Filesystem $ ./bin/ohai -c /home/phild/ohai.rb [2017-10-03T13:43:14-07:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping... [2017-10-03T13:43:14-07:00] ERROR: The following plugins marked as critical failed: [:Filesystem] ``` And when I run Chef: ``` [2017-10-03T13:44:11-07:00] FATAL: RuntimeError: The following plugins marked as critical failed: [:Filesystem2]. Failing Chef run. ``` This fixes #879. Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Merge pull request #1042 from oslerw/masterTim Smith2017-09-102-0/+88
|\ | | | | Add Arch Linux support to package plugin
| * Add Arch Linux support to package pluginWilliam Osler2017-09-102-0/+88
| | | | | | | | Signed-off-by: William Osler <oslerw@fb.com>
* | Merge pull request #1055 from jeunito/bug/833Tim Smith2017-09-081-0/+11
|\ \ | | | | | | Detect LXC if LXC and Docker are on the same host
| * | refactoringJose Asuncion2017-09-081-3/+1
| | | | | | | | | | | | Signed-off-by: Jose Asuncion <jeunito@gmail.com>
| * | detect lxc guest using /proc/1/environJose Asuncion2017-09-071-0/+13
| | | | | | | | | | | | Signed-off-by: Jose Asuncion <jeunito@gmail.com>
* | | Merge pull request #1033 from chef/azureTim Smith2017-09-085-10/+188
|\ \ \ | | | | | | | | Add Azure metadata endpoint support
| * | | Add azure plugin specs for metadataTim Smith2017-09-071-0/+81
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Return nils on error instead of an empty hashTim Smith2017-09-071-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Chefstyle fixesTim Smith2017-09-071-6/+6
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Minor tweaks to the ec2 / softlayer specsTim Smith2017-09-072-5/+3
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Add a simple spec for the azure mixinTim Smith2017-09-071-0/+67
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Fix cloud specs for azure changesTim Smith2017-08-111-5/+37
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | Move windows detect to its own method and add specsTim Smith2017-09-071-2/+34
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | Remove specs for the org detection method on Windowsec2_windowsTim Smith2017-09-061-10/+2
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | Fix spec that counted on specific log outputloggingTim Smith2017-09-061-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | Merge pull request #1047 from jeunito/bug/1011Tim Smith2017-09-061-0/+12
|\ \ \ \ | | | | | | | | | | Add error handling in Linux filesystem plugin
| * | | | rescue shell_out exceptions as error handling instead of whichJose Asuncion2017-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jose Asuncion <jeunito@gmail.com>
| * | | | improve descriptionJose Asuncion2017-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jose Asuncion <jeunito@gmail.com>
| * | | | add error handlingJose Asuncion2017-08-211-0/+12
| |/ / / | | | | | | | | | | | | Signed-off-by: Jose Asuncion <jeunito@gmail.com>
* | | | not sure why these style changes werent savedrichard mcleod2017-09-011-2/+1
| | | | | | | | | | | | | | | | Signed-off-by: richard mcleod <rmcleod8@bloomberg.net>
* | | | changing method to gather AIX uptimerichard mcleod2017-09-011-9/+8
| |/ / |/| | | | | | | | Signed-off-by: richard mcleod <richard.mcleod@gmail.com>
* | | Merge pull request #1038 from chef/slesTim Smith2017-08-221-87/+123
|\ \ \ | |/ / |/| | Handle situations where /proc/cpuinfo lacks core data
| * | Update testing for systems w/o core count in /proc/cpuinfoslesTim Smith2017-08-151-87/+123
| |/ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | bumping timeout for lsblk and blkid to 60sRichard Mcleod2017-08-071-8/+8
|/ | | | Signed-off-by: Richard Mcleod <richard.mcleod@gmail.com>
* Add a test for bigip platform detectionf5Tim Smith2017-07-191-0/+19
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Address review commentsJaymala Sinha2017-07-111-6/+3
| | | | Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* Fix solaris2 ipaddress attribute searchJaymala Sinha2017-07-111-2/+2
| | | | | | | | | | | | | ```# ohai ipaddress ``` returns following warnings and replaces the node IP address with a blank IP after chef-client run ``` [2017-07-07T20:36:32+00:00] WARN: [inet] no ip address on net0 [2017-07-07T20:36:32+00:00] WARN: unable to detect ipaddress /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ohai-8.19.1/lib/ohai/system.rb:193:in `attributes_print': I cannot find an attribute named ipaddress! (ArgumentError) ``` Tested this fix on solaris11 client node and verfied IP address was retained after ccr. Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* Merge pull request #1020 from chef/pr/1016Tim Smith2017-06-292-0/+5
|\ | | | | PR #1016 with updates