[Nagiosplug-devel] RFC: check_disk trying to be clever re: mountpoints

Ton Voon ton.voon at altinity.com
Wed May 24 02:37:03 CEST 2006


On 19 May 2006, at 09:15, Andreas Ericsson wrote:

> Ton Voon wrote:
>> On 18 May 2006, at 17:03, sean finney wrote:
>>> i think what happened was at some point (1.4.2 maybe?), this  
>>> behaviour
>>> disappeared.  i recieved a couple bugs about it in the debian  
>>> BTS, so
>>> i added a patch that the restores the functionality, if my memory
>>> servers me correctly.
>> John has come down on "this behaviour is wrong" with a good  
>> example  of why, which I am swaying towards. Sean, is there a good  
>> counter- example for when this behaviour is desirable?
>>>>   1) Make the default force the directories to be mount points and
>>>>      exit critical if they aren't. Add a flag to allow the current
>>>>      behavior. (My preferred option)
>>>>
>>>>   2) Make the current operation the default and add a flag that   
>>>> forces
>>>>      the specified directory to me a mount point and exit  
>>>> critical  if it
>>>>      isn't.
>>>
>>>
>>> i think either of these would be a good solution to the problem. i'm
>>> more partial to (2) because it's more in line with how i remember
>>> check_disk historically working.
>> I'm more inclined to go with (1) because of John's failure case,  
>> but  I'd rather get rid of the walk filesystem altogether :)
>
> I vote 2 as well. There's no sane reason to name a file or  
> directory that's inside a mount-point rather than actually naming  
> the mount-point itself, and mount-points can reside on other  
> mounted filesystems which just begs to break if we find multiple  
> mount-points while walking to it from the root (which is also a  
> mount-point, btw).

Summary: General consensus says to keep current behaviour (walk  
filesystem for best match), but have a flag to specify exact  
filesystem match only. I hope no-one wants the case of "walk the  
filesystem for this -p but check for this exact filesystem" - they  
will have to run two separate check_disks ;)

I'm currently trying to sync the plugins with coreutils 2.95 to pull  
in newer df code (there was a report ages ago about failure to run ./ 
configure on newer FreeBSD systems). I then plan on moving some of  
the C functions out of check_disk into an external disk_utils.c file  
so that I can run libtap unit tests against the functions. I also  
want to fix problems against reiserfs filesystems.

This will take a few weeks, but hopefully we'll have something more  
rigourous at the end.

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon






More information about the Devel mailing list