mentby.com
Blog | Jobs | Help | Signup | Login

Puppet on RedHat - Manage Kernel Modules ?



Can puppet manage kernel customization on RedHat ?
I have some third-party gahrbaj that needs its own kernel level driver to ork.

And, or course, every time the kerner version bumps up, it breaks until yo rebuild the custom stuff into the new kernel.

“Sometimes I think the surest sign that intelligent life exists elsewher in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

--
You received this message because you are subscribed to the Google Groups Puppet Users" group.
To post to this group, send email to puppet-users*******.
To unsubscribe from this group, send email to puppet-users unsubscribe*******.
For more options, visit this group at  http://groups.google.com/group/puppe-users?hl=en.


Dan White Fri, 24 Feb 2012 08:02:48 -0800

I haven't tested this but it should work.

class kernel(version='latest')
{
  package { 'rhel-
kernel':
    ensure =>
$version,
    alias  =>
kernel,
    notify => Exec['rebuild
gahrbaj'],
  }

  exec { 'rebuild
gahrbaj':
    cwd         => '/foo/bar/
gahrbaj',
    command     => '/usr/bin/make; /usr/bin/make install; modprobe
gahrbaj', # commands to bulid and install
mdoule
    unless      => '/bin/grep gahrbaj /proc/modules', # check if
module is loaded, if so don't
rebuild
    require     => Package['rhel-
kernel'],
    refreshonly => true, # only attempt if rhel-kernel has been
updated
  }
}

You would use it like this
node example.com {
  class { 'kernel':
    version => '3.2.7',
  }
}

When you want to upgrade the kernel you would bump the version to the
next release. When puppet runs it will upgrade the kernel and the next
reboot puppet will detect that the module isn't loaded and then
rebuild and install the module.

--
You received this message because you are subscribed to the Google Groups Puppet Users" group.
To post to this group, send email to puppet-users*******.
To unsubscribe from this group, send email to puppet-users unsubscribe*******.
For more options, visit this group at  http://groups.google.com/group/puppe-users?hl=en.


Jared Curtis Fri, 24 Feb 2012 15:55:38 -0800

Sorry about the format, try this  https://gist.github.com/1904714

--
You received this message because you are subscribed to the Google Groups Puppet Users" group.
To post to this group, send email to puppet-users*******.
To unsubscribe from this group, send email to puppet-users unsubscribe*******.
For more options, visit this group at  http://groups.google.com/group/puppe-users?hl=en.


Jared Curtis Fri, 24 Feb 2012 15:58:33 -0800

Because RHEL tries to preserve the Kernel ABI it should be possible to
build modules kernel version agnostic.

http://wiki.centos.org/HowTos/BuildingKernelModules?highligh[..] http://wiki.centos.org/HowTos/Custom_Kernel

--
Kind Regards, Markus Falb


Markus Falb Sat, 25 Feb 2012 12:05:37 -0800



Related Topics

Post a Comment