3

Backstory:

It was determined that when using lxc container VMs the Nagios nrpe shutdown script when run on the host of the containers would kill the nrpe processes inside the containers. This was remediated by changing the script to use pidfiles instead of searching the process table for the nrpe process.

Regrettably start-stop-daemon is a C program that resulted from translating a Perl script and it shows. There are far too many global varibles in start-stop-daemon.c and although there are some nice blocks of comments there are far to few comments that explain the intent behind variable names such as "schedule" (the string "schedule" appears in many contexts.) The manual page for start-stop-daemon strongly suggests that unless you use the "--retry" option the start-stop-daemon program may return before the process it sent a signal to actually calls exit() and terminates, however it doesn't actually state this in plain English.

The obtuseness of start-stop-daemon is most likely the reason that the "fixed" version of the script includes a dubious comment indicating that sometimes the pid file has not been removed. I can easily see why someone would not understand that he left the --retry option missing. This bug also causes failures when the script is given the "restart" option; the nrpe daemon will shutdown but not start up again.

Did I mention that since applying the update our nrpe servers started crashing over and over? Repairing this is why I am doing this work.

I have been working on remediating the fix. You can see my current work in this PPA.

Actual Question:

The upstream version number of nagios-nrpe-server in lucid-updates is

2.12-4ubuntu1.10.04.1

My PPA uses this version number

2.12-4ubuntu1.10.04.1.1~ppa1~lucid1

I check the rules here and use this test program and I am lead to believe that the version number I use in my PPA is greater than the one in lucid-updates yet when I ran:

sudo add-apt-repository ppa:nutznboltz/nrpe-unbreak-lp-600941
sudo apt-get update
sudo aptitiude dist-upgrade

The replacement package was not installed.

I was able to install it using

sudo aptitude install nagios-nrpe-server=2.12-4ubuntu1.10.04.1.1~ppa1~lucid1

Can anyone explain this behavior? Why didn't my version number appear greater to "aptitude dist-upgrade"?

Thanks

$ cat /etc/apt/preferences
Package: *
Pin: release a=lucid-backports
Pin-Priority: 400

Package: *
Pin: release a=lucid-security
Pin-Priority: 990

Package: *
Pin: release a=lucid-updates
Pin-Priority: 900

Package: *
Pin: release a=lucid-proposed
Pin-Priority: 400
$ ls /etc/apt/preferences.d/
$

Should not make any difference as a PPA cannot be in any of those pockets.

I went ahead and bumped the version number in the PPA to 2.12-4ubuntu1.10.04.2~ppa1~lucid1. I'll see if that makes a difference.

I do notice that lintian complains:

W: nagios-nrpe-server: debian-revision-not-well-formed 2.12-4ubuntu1.10.04.2~ppa1~lucid1

1 Answer 1

7

You can verify if a package version is greater than another one using dpkg --compare-versions <version_1> gt <version_2>:

$ dpkg --compare-versions 2.12-4ubuntu1.10.04.1.1~ppa1~lucid1 gt 2.12-4ubuntu1.10.04.1
$ echo $?
0

After this check, you should verify with apt-cache policy <package> that the candidate version isn't the one you expect. One possible reason could be that the package version is being held. In that case apt-get --ignore-hold should fix the problem.

5
  • There are no packages on hold. dpkg -l | grep ^h returns nothing.
    – nutznboltz
    Nov 23, 2011 at 16:24
  • I added the contents of /etc/apt/preferences to the question.
    – nutznboltz
    Nov 23, 2011 at 16:29
  • 1
    The output of apt-cache policy nagios-nrpe-server could be also useful.
    – jcollado
    Nov 23, 2011 at 17:54
  • I tried on a different system with the original PPA version number 2.12-4ubuntu1.10.04.1.1~ppa1~lucid1 and dist-upgrade worked so it has to be something about the way the first test system is configured.
    – nutznboltz
    Nov 23, 2011 at 20:52
  • At this point 95 other systems installed 2.12-4ubuntu1.10.04.1.1~ppa1~lucid1 without any issues.
    – nutznboltz
    Nov 24, 2011 at 0:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .