[DRBD-user] [patch] drbd-0.7 svn 2189

Christopher Boumenot boumenot at gmail.com
Tue May 9 16:10:27 CEST 2006

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Greetings,

This patch fixes the way drbdadm verifies IP address.  Instead of 
exec'ing a bash process to determine if the address is valid it opens a 
socket to the kernel, enumerates the interfaces, and verifies if they 
are correct.  This was done to avoid the error message "Child process 
does not terminate."  This was frequently seen when making long process 
chains or calling drbdadm from an ssh session.

$ drbdadm state all | sort | grep -v Primary etc, etc
$ ssh host drbdadm state all

I've removed the code for verifying routing information.  This can be 
done by opening a socket to the kernel as well, but I didn't write the 
code.  If someone has a default route this will always succeed, and I 
have to believe 99.9% have a default route configured.  If there's a 
real need I can add the code.

The majority of this code was taken from Steven's book "UNIX Network 
Programming," so he deserves all of the real credit.

I've tested the patch in our environment, and it works well, but it 
still needs more testing.

This patch doesn't completely address "Child process does not terminate" 
  because drbdadm calls drbdsetup.  Besides this problem the return code 
of drbdsetup is discarded by drbdadm which would be useful.  Is there a 
reason these two programs are separate?  Would you accept a patch to 
combine them into one?


Regards,

Christopher Boumenot


P.S. - I couldn't get my editor to have the same white spaces layout as 
you, so the diff as a few line or erroneous data.



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: drbd.diff
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20060509/132c550d/attachment.asc>


More information about the drbd-user mailing list