4 May 2006 17:55
[rancid] race condition in ssh on CatOS
Michael Stefaniuc <mstefani <at> redhat.com>
2006-05-04 15:55:47 GMT
2006-05-04 15:55:47 GMT
Hello, in october 2004 there was a small thread about this problem "Bug when using SSH on CatOS devices" (http://www.shrubbery.net/pipermail/rancid-discuss/2004-October/000891.html) but it ended with a quick hack that worked for the older Extreme's but dosn't for CatOS (http://www.shrubbery.net/pipermail/rancid-discuss/2004-November/000898.html) The problem with CatOS ssh is that it eats _sometimes_ the echoing of the last packet that made the connection to terminate unlike the Extreme that accordingly to the above was eating only the \n\r. As clogin does a send "exit\r" and that fits in one packet the CatOS ssh will forget to echo that back before terminating the connection. So one gets _sometimes_ Switch> (enable)Connection to switch.foo.bar closed by remote host. Connection to switch.foo.bar closed. I get that not only with cat5rancid but also directly with ssh. Now adapting the proposed patch/hack: TOP: while(<INPUT>) { tr/\015//d; if (/> \(enable\) ?exit$/) { $clean_run=1; last; } # Check and see if it was a "less clean" run. elsif (/> \(enable\) ?exitConnection to (\S+) closed by remote host\./){ $clean_run=1; last;(Continue reading)
RSS Feed