[Xorp-users] CLI spin fix (hack)

Ben Greear greearb at candelatech.com
Mon Oct 1 10:59:40 PDT 2007


Pavlin Radoslavov wrote:
> Ben Greear <greearb at candelatech.com> wrote:
> 
>> Pavlin Radoslavov wrote:
>>> Ben Greear <greearb at candelatech.com> wrote:
>>>
>>>   
>>>> It seems that if you pipe multiple commands into the CLI, it will busy
>>>> spin waiting for the previous command to complete.  Since 'commit'
>>>> can take multiple seconds when adding an interface, this eats a lot
>>>> of CPU.
>>>>     
>>> Could you clarify what you mean by piping multiple commands into the
>>> CLI. Is it when you use multiple "-c <cmd>" arguments after applying
>>> your second patch.
>>>   
>> Yes, or when you do xorpsh < cmd_file.txt
>> where cmd_file.txt has several lines in it, like:
>>
>> configure
>> remove interface foo
>> commit
>> ...
>> exit
>> exit
> 
> Could you send me the exact initial config.boot and the cmd_file.txt
> configuration files you are using in your testing, so we can have a
> calibration point.

Here are the commands I'm sending to xorpsh.  The numbers on the left
are millisecond timestamps, so this delete takes about 11 seconds!

The 3 router config files are attached, the 'vr: xxxx' cooresponds
to the number in the routing config files.


After starting with the attached config files, I remove the interface
from one VR:

1191260992793:  Card.cc 5684: Writing XORP cli commands to vr: 20002 cmds -:
configure
delete interfaces interface rddVR44
commit
delete protocols ospf4 area 0.0.0.0 interface rddVR44
commit
exit
exit
:-
1191261003885:  Card.cc 5690: Done with xorp-cli, rv: 0


And then add it to another:
1191261004057:  Card.cc 5684: Writing XORP cli commands to vr: 20001 cmds -:
configure
set interfaces interface rddVR44 vif rddVR44 address 10.4.0.7 prefix-length 24
commit
set protocols ospf4 area 0.0.0.0 interface rddVR44 vif rddVR44 address 10.4.0.7 interface-cost 1
commit
exit
exit
:-
1191261017077:  Card.cc 5690: Done with xorp-cli, rv: 0

After this is complete, XORP seems to be configured correctly,
but the OSPF peers remain in ExStart and Init states (depending
on which xorp you are querying.)

There is some other magic with routing rules to allow all of this to work on a single
machine, but you could probably reproduce this with 3 machines and some
vlan interfaces or similar...

If you want access to a system with my control software on it, I can
provide one on our DMZ.

Thanks,
Ben



> 
> Thanks,
> Pavlin


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xorp-vr10001.conf
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20071001/5e9fc82a/attachment.ksh 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xorp-vr10002.conf
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20071001/5e9fc82a/attachment-0001.ksh 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xorp-vr10008.conf
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20071001/5e9fc82a/attachment-0002.ksh 


More information about the Xorp-users mailing list