-
-
Notifications
You must be signed in to change notification settings - Fork 436
When using structured RRD folders, permission issues may be flagged incorrectly #5814
Description
Describe the bug
Sometimes it happened to us that the rrd subfolder for a device ID is not created when adding the device.
Then Cacti starts to complain that the webpage has no write access ( -> rrd.php/rrdtool_parse_error() ).
(there's also a little thought conflict here .. seel below)
Cacti version is 1.2.27
To Reproduce
Happens randomly .. hard to say, maybe deleting an existing rrd folder can trigger the error, if the system is not creating it from scratch, when data is delivered for the corresponding device. it could be related to this bug we recently discussed (#
Expected behavior
The descriptions are a bit vague - the webpage actually has write access (as my patch shows), but the folder has not been created upstream, probably because the data has not yet been delivered.
The function only checks the error itself (of course, that's why it is called "rrdtool_parse_error"), but actually this isn't enough to determine the problem. It doesn't try to actually create the folder to see if that is really the error or if something else might have gone wrong.
I created a patch so that the function tries to create the folder and throws an error, if that is not working.
bernisys@5a45d37
But i am not sure about one thing:
The function name could then be a bit inconvenient, it suggests that the function only evaluates (parses) the returned string.
So should this function actually check if a folder can be created?
Or would it be better if the function is renamed and then does the whole bunch of sanity checks on its own?
Additional context
I somehow suspect that the issue might be related to #5797 .. the device was created when we were still on 1.2.18 - now we switched to 1.2.27, but the DB repair was not yet done. We want to observe stability for a bit, and then finally run the repair.
I will try and check the queries @TheWitness sent me and see if any of the buggy data IDs are listed.