Subject: | update( on_missing_ds => ignore ) not working as intended |
Reading the following comment in Simple.pm, the intent of on_missing_ds
=> "ignore" is to only ignore the new DSes while updating the existing DSes.
# Ignore the offending missing data source name
The problem however, is that because the offending new DSes are never
taken out of %ds hash, subsequent invocation of
my @rtn = RRDs::update($rrdfile, @def);
would trigger an error from RRDtool. I've included a one-line change to
take out the offending DSes from the hash.
Subject: | on_missing_ds.diff |
--- Simple.pm.orig 2011-11-03 20:10:24.038314484 -0700
+++ Simple.pm 2011-11-03 20:11:16.789562402 -0700
@@ -305,6 +305,7 @@
# Ignore the offending missing data source name
if ($stor->{on_missing_ds} eq 'ignore') {
TRACE("on_missing_ds = ignore; ignoring data supplied for missing data source '$ds'");
+ delete $ds{$ds};
# Fall on our bum and die horribly if requested to do so
} elsif ($stor->{on_missing_ds} eq 'die' || $stor->{on_missing_ds} eq 'croak') {