NagiosEnterprises/ndoutils

Duplicated queues on reload

Closed this issue · 3 comments

Hi,

I'm using ndoutils v2.1.3 (latest), with multiple nagios versions (at least 4.4.2, but I can test with others).

Sometimes when reloading nagios, new queues are created, and the old ones are not deleted:

# ipcs -q | grep nagios | wc -l
81
# service nagios reload
Running configuration check... Reloading nagios configuration... done
# ipcs -q | grep nagios | wc -l
81
# service nagios reload
Running configuration check... Reloading nagios configuration... done
# service nagios reload
Running configuration check... Reloading nagios configuration... done
# service nagios reload
# ipcs -q | grep nagios | wc -l
84

These queues don't appear to contain any message

# ipcs -q
------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
0x36000002 0          nagios     600        0            0
0xc1000002 3702785    nagios     600        0            0
0xb5000002 65538      nagios     600        0            0
0x90000002 98307      nagios     600        0            0
0xfb000002 131076     nagios     600        0            0
0xcb000002 163845     nagios     600        0            0
0x99000002 229383     nagios     600        0            0

Sometimes, restarting Nagios removes some queues, but not everytime.

Does anyone can replicate this behavior?
Thanks

Workaround using ipcrm to manually remove the queues:


# service nagios stop
Stopping nagios: done.
# for q in $(ipcs -q | grep nagios | awk '{print $2}')
> do
> ipcrm -q $q
> done
# ipcs -q

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages

# service nagios start
Starting nagios: Running configuration check... done.

I can't reproduce with latest Nagios (4.4.5). Maybe fixed by NagiosEnterprises/nagioscore#573?

Yes, there were a couple of other changes to NEB module loading in Core 4.4.4, so I wouldn't be surprised if one of them fixed your issue.

I'm going to close this for now, but if you're able to reproduce with this or a future version of Core, let me know and I'll re-open.