Hi,
I'm having problems with monitoring of installations. When I enable it,
I get some parse errors and monitoring doesn't work (although imaging
goes well). They are cause by this command:

IMAGESIZE=`rsync -av $IMAGESERVER::$IMAGENAME | grep "total size" | sed
-e "s/total size is \([0-9]*\).*/\1/"`

If I run this rsync command from the client console I get this:

$ rsync -av imageserver::imagename
receiving file list ... rsync: connection unexpectedly closed (139132
bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600)
[receiver=3.0.0pre6]

After some testing, I've found it's caused by LDAP being enabled in
image server. Also I've found this FAQ:

http://samba.anu.edu.au/rsync/issues.html

which in Q2 suggests to use --numeric-ids as a workaround. So I attach a
patch against revision 4438 which adds this option to rsync. I've tested
with version 4.0.2 (Fedora 5) and it works.

Cheers,
Àlex

Index: initrd_source/skel/etc/init.d/functions
===================================================================
--- initrd_source/skel/etc/init.d/functions	(revision 4438)
+++ initrd_source/skel/etc/init.d/functions	(working copy)
@@ -1748,7 +1748,7 @@
     # Evaluate image size.
     logmsg "Evaluating image size..."
     if [ ! "x$BITTORRENT" = "xy" ]; then
-        IMAGESIZE=`rsync -av $IMAGESERVER::$IMAGENAME | grep "total size" | sed -e "s/total size is \([0-9]*\).*/\1/"`
+        IMAGESIZE=`rsync -av --numeric-ids $IMAGESERVER::$IMAGENAME | grep "total size" | sed -e "s/total size is \([0-9]*\).*/\1/"`
     else
         if [ -f "${TORRENTS_DIR}/image-${IMAGENAME}.tar.torrent" ]; then
             torrent_file="${TORRENTS_DIR}/image-${IMAGENAME}.tar.torrent"

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to