Ohai 0.6.12.rc.1 released


#1

Hey Chef’ers

Ohai 0.6.12.rc.1 is up on Rubygems.org

You can install it on a system with ‘sudo gem install ohai --pre’ or
of course across all the systems with ‘knife ssh : sudo gem install
ohai --pre’

We don’t usually get as much testing with Ohai as I’d like, and it
often means that we release one or two immediate re-releases as people
who didn’t bother to test it start building production system from the
latest version on rubygems.org. Please, don’t be surprised by a
regression and try this release candidate out. Our policy is to let
three days without a regression go by before we release a final
version.

One huge feature in this release is the new "platform_family"
attribute which is currently a hardcoded list of platforms that are
alike. If you write a cookbook to run on CentOS, but it should also
run on Scientific Linux, RHEL and Oracle, you can test for
platform_family == “rhel” instead of testing for all the individual
platforms.

Here is the current list:

when /debian/, /ubuntu/, /mint/
platform_family "debian"
when /fedora/, /amazon/
platform_family "fedora"
when /oracle/, /centos/, /redhat/, /scientific/, /enterpriseenterprise/
platform_family "rhel"
when /suse/
platform_family "suse"
when /gentoo/
platform_family "gentoo"
when /slackware/
platform_family "slackware"
when /arch/
platform_family “arch”

There is also fixed support for Scientific Linux, added support for
Oracle, and an important iproute2 fix for Arch users.

Below is the list of issues in this release:

OHAI-325 Add support for iproute2 for linux networking
OHAI-324 Add specs for linux network, precursor to some other bug fixes
OHAI-323 spec failure in sigar/network_route_spec.rb failure
OHAI-319 ohai detects “scientific” as "scientificsl"
OHAI-316 venet0 IP address detected incorrectly on newer versions of OpenVZ
OHAI-314 plugins/os.rb RbConfig / Config warning in Ruby 1.9.3
OHAI-312 OpenBSD uptime.rb plugin does not generate output
OHAI-308 Can not detect oracle server linux platform during chef installation
OHAI-303 filesystem uuid support


Bryan McLellan | opscode | technical program manager
© 206.607.7108 | (t) @btmspox | (b) http://blog.loftninjas.org


#2

On Thu, Feb 9, 2012 at 1:12 PM, Bryan McLellan btm@opscode.com wrote:

There is also fixed support for Scientific Linux, added support for
Oracle, and an important iproute2 fix for Arch users.

Caleb Tennis reminded me on twitter this morning that the iproute2
change [8] actually switches to use the ‘ip’ command over the
’ifconfig’ command to gather network information for all Linux
distributions, not just Arch.a

The net-tools package, which includes ifconfig, has apparently been
abandoned as no release has been made since version 1.60 on April 15,
2001 [1]. Last year Arch Linux, known as a leading edge Linux
distribution, decided to deprecate net-tools [2] and begin the switch
to using iproute2. It appears that Arch no longer includes net-tools
and ifconfig in a default install now.

Trying to research this history of this is surprisingly difficult. On
the surface most people are claiming it is deprecated because
wikipedia says so [6] but wikipedia uses the deprecation by Arch Linux
[2] as its source, hardly enough to support the project itself being
deprecated. Bernd Eckenfels is the last known net-tools maintainer,
but his personal website doesn’t mention it any longer. It appears
that he was maintaining the debian package and provide patches in the
packaging for debian bugs. Around 2005 he planned a 1.65 release [3]
that never happened. From that same thread it looks like he was
getting frustrated with maintaining net-tools in debian. Debian [4]
and Redhat [5] were both struggling with maintaining a large number of
patches on top of the last release as of a few years ago. openSuSE
went so far as to add a warning to the ifconfig man page about its
deprecation [9][10] although that decision appears to not have been
thought out.

However the git repository [7] from the new sourceforge site for the
project [6] which replaces the berlios.de site [1] has recent commits
by Bernd Eckenfels. It does seem possible that net-tools is not
abandoned per se. Perhaps the maintainers are disenfranchised with the
distribution communities. I sent Bernd a note to see if he could clear
any of this up.

There are some arch folks who complained on forums about ifconfig
disappearing when it worked perfectly fine for them. As I’ve always
taken Arch to be for people who wanted cutting edge, this seemed odd
but underscores that change always makes someone unhappy. Ten years
without a net-tools release, while iproute2 has been in active
development and versioning alongside the kernel [11] and plenty of
activity on the netdev kernel list.

We’re going to see increased use of iproute2 simply because it
supports features of the kernel that ifconfig never will. For
instance, you can add a second IP address to an existing interface
with iproute2, but cannot manage it with ifconfig [12]. Many existing
scripts and users will continue using ifconfig, so I expect it to be
around for some time. However, the purpose of Ohai is to provide you
with information, and we’re starting to need iproute2 to get that
information, which is what justifies the switch.

This switch includes a provision to fallback and use ifconfig, so it
should be painless and error-free. As we joke at Opscode, “no bugs
will be found in production.” Lets give this some testing and make
sure this is true together.

Bryan McLellan

Please forgive my footnotes not being sorted properly.

[1] https://developer.berlios.de/projects/net-tools/
[2] http://www.archlinux.org/news/deprecation-of-net-tools/
[3] http://lists.debian.org/debian-devel/2005/09/msg00426.html
[4] http://packages.debian.org/changelogs/pool/main/n/net-tools/current/changelog
[5] http://www.redhat.com/archives/rhl-devel-list/2007-March/msg00554.html
[6] http://sourceforge.net/projects/net-tools/develop
[7] git://net-tools.git.sourceforge.net/gitroot/net-tools/net-tools
[8] http://tickets.opscode.com/browse/OHAI-325
[9] http://tickets.opscode.com/browse/OHAI-209
[10] https://bugzilla.novell.com/show_bug.cgi?id=366477
[11] http://marc.info/?l=linux-netdev&m=109122713104140&w=2
[12] http://tickets.opscode.com/browse/OHAI-109


#3

On Feb 10, 2012, at 9:20 AM, Bryan McLellan wrote:

On Thu, Feb 9, 2012 at 1:12 PM, Bryan McLellan btm@opscode.com wrote:

There is also fixed support for Scientific Linux, added support for
Oracle, and an important iproute2 fix for Arch users.

Caleb Tennis reminded me on twitter this morning that the iproute2
change [8] actually switches to use the ‘ip’ command over the
’ifconfig’ command to gather network information for all Linux
distributions, not just Arch.a

I know I’m late to the party, but I have some code that solves this problem in C. Would you find it useful?

No need for scanning ifconfig, iproute, etc – just ask the kernel; it’s working currently on FreeBSD, Linux, and OS X. :slight_smile:

-Erik


#4

On Fri, Feb 10, 2012 at 12:24 PM, Erik Hollensbe
erik.hollensbe@wildfireapp.com wrote:

I know I’m late to the party, but I have some code that solves this problem
in C. Would you find it useful?

OHAI-92 [1] considers doing this very thing using sigar. I wouldn’t
want to put C in Ohai itself when we have alternatives, because we
save ourselves the complexity of building extensions and doing so on
multiple platforms. There was not enough energy at the time to cover
all the use cases to justify a switch of framework though.

Requiring a development environment to install a library dependency
was a little painful, particularly on Windows when we started using
YAJL. The Omnibus client really resolves that issue for those who
simply want to use Chef rather than hack on and develop it.

Bryan

[1] http://tickets.opscode.com/browse/OHAI-92