[rancid] Re: race condition in ssh on CatOS

john heasley heas at shrubbery.net
Fri May 5 22:58:17 UTC 2006


Thu, May 04, 2006 at 05:55:47PM +0200, Michael Stefaniuc:
> Switch> (enable) exitConnection to switch.foo.bar closed by remote host.
> wont happen in the middle of a cat5run run ever. But is is very likely 
> to get
> Switch> (enable)Connection to switch.foo.bar closed by remote host.
> between 2 commands. One cannot safely set $clean_run=1 in that case.
> The method i used was to split up 'send "exit\r"' in clogin into
> send "exit"
> sleep 0.1
> send "\r"
> Alternatively using send -h "exit\r" and using the "hangover" human 
> speed setting (see man expect) works too. This way i reduce the problem 
> to detecting "Switch> (enable) exitConnection ...".
> 
> Is there a better way to achieve a reliable backup of CatOS devices with 
> rancid using ssh besides having to patch clogin and cat5rancid? Not that 
> patching would be a problem but having the right fix upstream makes 
> future maintanance easier.

Normally I'd say use your support contract to harrass cisco to fix their
broken stuff before we make hacks permanent (unless its an Extreme), but I
think this has been fixed.  Of 43 chassis I collect, only one is failing
(I have not looked into why).  So, I suggest you try more recent code, try
ipservicesk9-mz.122-18.SXF vintage.



More information about the Rancid-discuss mailing list