Merge 6 stable #271

Merged
merged 95 commits into from Jan 13, 2014

Conversation

Projects
None yet
10 participants
Contributor

mcquin commented Jan 10, 2014

Merges most of 6-stable into master. Remaining files which need merge:

lib/ohai/plugins/cloud.rb
lib/ohai/plugins/gce.rb
spec/unit/plugins/gce_spec.rb

Also, the spec tests for aix plugins need to be done up version 7 style.

@sersut Can you take a look at/help me with the remaining files that need to be merged? For some reason I'm having trouble determining what to keep and what to change... I can fix the broken aix tests tomorrow/weekend/definitely before Monday.

danielsdeleo and others added some commits Jul 17, 2013

Disable root_group on Windows
Fixes OHAI-490: http://tickets.opscode.com/browse/OHAI-490

Implementation of root_group for windows has been found to have poor
performance when the host is joined to an AD domain. Opting to disable
on Windows since large changes will be required for a performant
implementation.

Cherry-picked from master for 6-stable.

Conflicts:
	spec/unit/plugins/root_group_spec.rb
[OHAI-412] fix uptime plugins for seconds_to_human change
Previously there was a _seconds_to_human method defined by the top level
uptime plugin, but this was moved to a mixin and the leading underscore
removed from the method name.
[OHAI-412] fix missing stubs in darwin kernel spec
Some popen commands weren't being stubbed so the tests fail on windows.
[OHAI-412] fix missing stub in linux kernel plugin
Was causing spec failures on windows
Revert "Merge branch 'OHAI-489'"
This reverts commit 3d669f4, reversing
changes made to d338698.

Commit 4286efe is a "hotfix" for
OHAI-489. The upcoming patch for OHAI-412 will introduce a structural
fix for the root cause of OHAI-489, making the hotfix unnecessary.
Update new specs for plugin class split
Rebased from 3967b5a to
d338698. Fix tests added in the interim
to correctly setup Ohai::System and plugin classes.
Fix ruby warnings Config => RbConfig
Fixes warnings like:
  spec/unit/plugins/ruby_spec.rb:44:in `block in <top (required)>': Use
  RbConfig instead of obsolete and deprecated Config.

RbConfig is available at least as far back as 1.8.7.
Replace all calls to `stub!` with `stub`
`stub!` is deprecated as of RSpec 2.14.x.
replace all calls to `mock` with `double`
`mock` is deprecated in RSpec 2.14.x
Replace deprecated should_receive(:m).any_number_of_times
In Rspec 2.14.x, `should_receive(:m).any_number_of_times` is deprecated
and should be replaced with just `stub(:m)`
include chef as a dev dependency
Otherwise the chef plugin does not run when tests are run with `bundle
exec`
update chef plugin tests for system/plugin split
Appears to have been broken in rebase
Disable root_group on Windows
Fixes OHAI-490: http://tickets.opscode.com/browse/OHAI-490

Implementation of root_group for windows has been found to have poor
performance when the host is joined to an AD domain. Opting to disable
on Windows since large changes will be required for a performant
implementation.
Adam Edwards
Merge pull request #175 from opscode/adamed-oc-9106
OC-8704: OC-9106: AIX patches for Ohai platform detection
adamedx
Revert "Merge pull request #175 from opscode/adamed-oc-9106"
This reverts commit f1dd92a, reversing
changes made to dfe0051. This commit unintentionally pulled in changes from the master branch.
Adam Edwards
Merge pull request #204 from opscode/adamed-6-stable-revert
Revert unintentional changes from master

lamont-granquist and others added some commits Oct 17, 2013

Test for LANG=C and input contains UTF-8
- currently we bomb with "invalid byte sequence in US-ASCII"
force encode all strings to UTF-8
- this is a bit of a hack for ohai-6 while we're still using
  popen4 instead of mixlib-shellout
- this may mean that we poorly support ISO-8851 / Shift_JIS or other
  non-UTF-8 encodings for characters where there is no
  translation between the external encoding and UTF-8
- this essentially standardizes on using UTF-8 internally
Merge pull request #213 from opscode/lcg/force-encode
Test for LANG=C and input contains UTF-8
OHAI-412 was reverted on the 6-stable branch
The OHAI-412 changes are for Ohai 7.0.0+ and were accidentally merged to the
6-stable branch. They were reverted in these commits:

87042c0
91edd2b
Serdar Sutay
Merge pull request #216 from opscode/systemu-version-pin
Pin version of systemu to the same version included in chef.
OHAI-537: Require the os plugin in the hostname plugin
The hostname plugin uses the os plugin, so it needs to be loaded first.
In a normal run it happens to be loaded but if you're only running the
hostname plugin it will fail without the os plugin.
Merge pull request #235 from opscode/OHAI-537
OHAI-537: Require the os plugin in the hostname plugin
Clean up `jenkins_run_tests.bat`
This change ensures the bat file is in sync with what we have in
opscode/chef.
Conflicts:
	ci/jenkins_run_tests.bat
Claire McQuin
merged most of 6-stable into master. remaining files: lib/ohai/plugin…
…s/cloud.rb, lib/ohai/plugins/gce.rb, spec/unit/plugins/gce_spec.rb
Owner

sersut commented Jan 10, 2014

Awesome work @mcquin. About the files you've listed:

1-) lib/ohai/plugins/cloud.rb
Looks sane to me. Maybe we can chat about the specific thing that was bugging you

2-) lib/ohai/plugins/gce.rb
Looks like some of the logic in looks_like_gce?() is refactored to a seperate function. Picking that up will I think make it work.

3-) spec/unit/plugins/gce_spec.rb
I will check on this with @adamedx. He probably know the final state this plugin should be in therefore he would know the right thing to pick up in the spec.

Let's chat when you have some time today and if needed I can continue this for you as well.

Contributor

mcquin commented Jan 13, 2014

TODO:
-- merge spec/unit/plugins/gce_spec.rb
-- in aix plugins: convert to shell_out

@sersut can you help with the second item? I'm not familiar with all the different ways from, popen4, and shell_out work.

Owner

sersut commented Jan 13, 2014

Sweet @mcquin...

I'll take over one as well and fix that after syncing with @adamedx today.

Contributor

mcquin commented Jan 13, 2014

Great. Thanks!
On Jan 13, 2014 8:14 AM, "Serdar Sutay" notifications@github.com wrote:

Sweet @mcquin https://github.com/mcquin...

I'll take over one as well and fix that after syncing with @adamedxhttps://github.com/adamedxtoday.


Reply to this email directly or view it on GitHubhttps://github.com/opscode/ohai/pull/271#issuecomment-32183492
.

sersut added some commits Jan 13, 2014

sersut
Fix gce plugin and gce plugin specs. The changes are:
1-) Remove the dmi related code from gce plugin since it's not used anymore.
2-) When the hints file doesn't exist, gce plugin will still try to find the metadata server and get required information from it.
Owner

sersut commented Jan 13, 2014

@adamedx can you check the last two commits for AIX and GCE changes?

Contributor

adamedx commented on lib/ohai/plugins/gce.rb in edfedd7 Jan 13, 2014

This is due to Ohai 7 changes?

Ohai 7 change as well, right?

Contributor

adamedx commented on edfedd7 Jan 13, 2014

Looks good @sersut, thank you.

@paulrossman, fyi, this change to Ohai master (not 6-stable) is a port of the existing GCE plugin to the new Ohai 7 plugin format so we can release an RC of Ohai 7. Changes were made to support the new plugin interface and make tests pass (dmi is removed in this change, similar to your forthcoming pr). Only people using our release candidate will get this change.

You can continue your new PR against 6-stable, I will make a port for Ohai 7 for you.

We don't need to retain this superfluous line, right?

Contributor

adamedx commented Jan 13, 2014

?w=1 made it easier to review -- looks good, we should have used shell_out in the first place.

Go ahead and merge, I'm going to run specs later this afternoon and will let you know if there's an issue or not.

Owner

sersut commented Jan 13, 2014

👍 thanks for checking @adamedx

sersut pushed a commit that referenced this pull request Jan 13, 2014

@sersut sersut merged commit 8890c7f into master Jan 13, 2014

@tas50 tas50 deleted the merge-6-stable branch Apr 22, 2016

@lamont-granquist lamont-granquist locked and limited conversation to collaborators Nov 16, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.