bzed / pkg-nagios-plugins-contrib

Migrated to salsa!
https://salsa.debian.org/nagios-team/nagios-plugins-contrib
40 stars 41 forks source link

check_running_kernel doesn't seem to work on CentOS 6/7 #63

Closed HOSTED-POWER closed 7 years ago

HOSTED-POWER commented 8 years ago

OK: Running kernel matches on disk image: [Linux version 2.6.32-573.26.1.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Wed May 4 00:57:44 UTC 2016]

While a newer version was installed with yum update. After reboot newer kernel was present.

bzed commented 8 years ago

I guess that check was never ever tested on a non-Debian system. Could you create a patch?

HOSTED-POWER commented 8 years ago

Well I'm not sure where to begin exactly to fix this to be honest :(

It would be great however if there was a working solution for other systems than Debian. CentOS is certainly one of the more widely used distro's :)

bzed commented 8 years ago

But maybe you realize that this repository in tracking the Debian packaging of the included plugins. We happily accept patches for other distributions, but our first priority is to keep the package in shape for Debian.

HOSTED-POWER commented 8 years ago

Hi,

I see :)

Do you know if there is some other/original author of this plugin somewhere? Or was this made specifically for Debian?

bzed commented 8 years ago

It was written by the Debian system administration team for the Debian infrastructure. But it should not be too hard to make our work on CentOS.

bzed commented 7 years ago

Should be fixed in fbd854d195095ec256195a042e65e422b97136bd - please give it a try.

HOSTED-POWER commented 7 years ago

Hi,

Thanks, is there an easy way to download the patched file? Not sure how to do this, sorry.

HOSTED-POWER commented 7 years ago

Unless I'm mistaken this was not included in the master branch? Or does it still need to be applied?

evgeni commented 7 years ago

The fix is in a separate patch file that needs to be applied during build time. This happens automatically when you build the Debian package from this Git.

HOSTED-POWER commented 7 years ago

ah but the fix is for CentOS, would it be applied that easily as well? Just downloading the raw file normally...

Sorry if this is a stupid question, but it's strange to me the patch is kept separately.

evgeni commented 7 years ago

The fix is actually generic to newer kernels. Not only CentOS. And yes. Download the raw check kernel, apply the raw patch bzed committed and you should be fine.

And for not committing the patched version: well, we like to keep the original file virgin. Same happens in RPM packaging too: you have the source and the patches and then the spec applies them.

HOSTED-POWER commented 7 years ago

Thx evgeni for being so helpful!

For now I think I just keep a copy of the patched version somewhere myself. But likely I might miss interesting future updates like this.

I can't think of an easy and hassle free method to apply any patch committed to it and auto install it in a simple manner on any os (without installing all the files/packages).

HOSTED-POWER commented 6 years ago

Hi

Just wondering: is this patch already included? Can't image we really need to apply all kind of patches for a working version of the master branch or am I missing something ? :)

bzed commented 6 years ago

@HOSTED-POWER as mentioned before, it is included in fbd854d195095ec256195a042e65e422b97136bd - you will have to learn how debian builds its packages and use quilt to apply the patches from debian/patches.