Bugs item #1767368, was opened at 2007-08-03 16:12 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100259&aid=1767368&group_id=259
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: systemimager-server Group: v3.8.1 Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Andrea Righi (righiandr) Summary: si_getimage does not send __cloning_complete__ w/ rsync/ssh Initial Comment: si_getimage fails to send __cloning_completed__ when you are using rsync over ssh. The fault seems to be withing si_getimage perl script (/usr/sbin/si_getimage) line 453: system('rsync ' . $source_host . '::' . $SystemImager::Common::rsync_magic_string . '>/dev/null 2>&1'); Previous lines for rsync are using $options to setup the rsync line like the following (line 440): open (RSYNC, "rsync -aHSv --numeric-ids $options |"); The important line that sets $options (for this issue, that is) is as follows (line 432): $options = $options . " rsync://${source_host}:${port}/root/ $imagedir/"; The options line is specifying the port to use when connecting. This port is setup by si_prepareclient on the client side. If rsync does not have the port specified, then after ssh'ing to the client, it will launch rsync bypassing the rsync launched by si_preparclient and not log to the file in /tmp/file?????. If the magic string does not get logged into the proper log file, si_prepareclient does not properly close rsync. My testing involved replacing line 453 with the following: system('rsync ' . ' -e ssh -aHSv rsync://root@<Hard coded IP>:873/' . $SystemImager::Common::rsync_magic_string . '>/dev/null 2>&1'); Of course the '<Hard coded IP>' is replaced with the real IP. With this test, I verified that rsync closed out on the client side properly. -Dustin Kamper [EMAIL PROTECTED] ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-08-15 13:00 Message: Logged In: NO Patch with revision 4128 works, but the other does not. I found another issue though, which is due to the timing on the ssh tunnel. Line 303(version 3.8.1): $command="ssh -f -l $ssh_user -L $port:$source_host:873 $source_host sleep 5"; A 5 second sleep is too short for the image download to complete and the tunnel closes before the rsync for __cloning_completed__ is issued. The rsync then is pointing to 127.0.0.1 (where the ssh tunnel should be, but is not) and prompts for the localhost password rather then the remote host password. I tested with a sleep 500 and that worked for shorter image downloads. Perhaps a better solution would work that does not rely on timing. I think that monitoring the rsync log file in /tmp for the __cloning_completed__ string (like the way si_prepareclient does) may be more reliable for closing the ssh tunnel. If this should be logged under a new bug, I would be more then happy to submit it. Thanks, -Dustin Kamper ---------------------------------------------------------------------- Comment By: Andrea Righi (righiandr) Date: 2007-08-05 09:00 Message: Logged In: YES user_id=696767 Originator: NO The correct fix is the following (to be checked in trunk, 3.9.x and 3.8.x branches). Thanks for reporting, -Andrea File Added: si_getimage-rsync-over-ssh-completion-fix.patch ---------------------------------------------------------------------- Comment By: Andrea Righi (righiandr) Date: 2007-08-04 04:04 Message: Logged In: YES user_id=696767 Originator: NO Could you check if the following patch fixes as well? Thanks, -Andrea File Added: si_getimage-rsync-over-ssh-completion-fix.patch ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100259&aid=1767368&group_id=259 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ sisuite-devel mailing list sisuite-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sisuite-devel