[rancid] Re: race condition in ssh on CatOS

Michael Stefaniuc mstefani at redhat.com
Sat May 6 08:54:48 UTC 2006


john heasley wrote:
> 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.
I was talking about CatOS. We do not have any problems with backing up
IOS devices. Sadly there is no IOS available for the good old Cat2948.
I'll have to check the release notes for the newer CatOS versions if
they fixed this problem and cross check that on a device under normal
operation load. If the problem still persists i'll harrass Cisco.
Anyway the proper fix will take quite long so i will have to live with
the patch in my rancid tree.

bye
	michael

-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart



More information about the Rancid-discuss mailing list