quattor / ncm-cdispd

Node Configuration Manager Configuration Dispatch Daemon
www.quattor.org
Other
2 stars 5 forks source link

15.12.0: undefined ARRAY reference #25

Closed jouvin closed 8 years ago

jouvin commented 8 years ago

I saw already several times the following error in ncm-cdispd:

2016/01/21-21:31:49 [INFO] new profile arrived, examining...
updated /var/lib/ccm/profile.900/ccm-active-profile.900-12102
Can't use an undefined value as an ARRAY reference at /usr/sbin/ncm-cdispd line 783.

The faulty line is:

            my $old_iclist = [ @{ $this_app->{ICLIST} } ];

A code added in 809c910171b0c5ee306f21564db12cdf71167bd9. I remember commenting on this change that the initial state should be checked (as having unit test for ncm-cdispd is almost impossible)... I'm afraid we missed something. It seems to happen after a new profile was received identical to the previous one. The log lines before the error are typically:

2016/01/21-21:04:49 [INFO] new profile arrived, examining...
updated /var/lib/ccm/profile.899/ccm-active-profile.899-12102
2016/01/21-21:04:49 [INFO] new profile has same checksum as old one, no NCM run
2016/01/21-21:31:49 [INFO] new profile arrived, examining...
updated /var/lib/ccm/profile.900/ccm-active-profile.900-12102
jouvin commented 8 years ago

I should have added that this is a very bad problem as after occuring, ncm-cdispd doesn't process any new profile...

stdweird commented 8 years ago

very serious indeed. i never saw it, and it looks strange given https://github.com/quattor/ncm-cdispd/blob/809c910171b0c5ee306f21564db12cdf71167bd9/src/main/scripts/ncm-cdispd#L717

patch should be trivial, but it would be good to know where the undef comes from.

stdweird commented 8 years ago

if it is easy to reproduce, i'm very interested in a --debug 5 output

stdweird commented 8 years ago

the launch_ncd code seems to be prepared for it...

jouvin commented 8 years ago

Thanks. I'll try to deploy it tomorrow. Unfortunately, I don't know how to trigger it as it doesn't seem to happen everytime...