[Xorp-users] "Reloading" config

Ben Greear greearb at candelatech.com
Mon Aug 16 09:44:29 PDT 2010


On 08/16/2010 09:40 AM, Jeff Mitchell wrote:
> On 08/16/2010 12:37 PM, Ben Greear wrote:
>> On 08/16/2010 09:29 AM, Jeff Mitchell wrote:
>>> I should have made it clear I'm on xorp.ct, fairly recent git. Comments
>>> inline:
>>>
>>> On 08/16/2010 11:21 AM, Ben Greear wrote:
>>
>>>> One thing we noticed is that we needed to commit after un-loading old
>>>> stuff,
>>>> and again after loading the new stuff. Xorp.ct makes commit much
>>>> faster,
>>>> but it's still around 1 second for big changes on moderate machines.
>>>>
>>>> Some of those limitations may be removed in xorp.ct, but I haven't
>>>> tried removing my intermediate 'commit' logic from my scripts.
>>>
>>> The xorp config file I need to use is getting generated
>>> dynamically...it'd be quite difficult to unload old stuff and then load
>>> the new stuff in. I think. Or is it?
>>
>> Yeah, it's not trivial..but you are going to have to do a 'diff' somehow,
>> which means delete the un-needed stuff and add new.
>>
>> In my case, if I am going to change IP on an interface, I might
>> just remove the interface completely (from the protocol sections)
>> and then re-add it.
>>
>> Actually, xorpsh will do a 'diff' for you, but again, at least when
>> I started, it was flaky unless I committed after deleting and before
>> re-adding. Especially if you have time to debug and help fix things,
>> you might try using xorpsh to do all the 'diff' logic and not worry
>> about any extra commits..and just help fix bugs that might pop up.
>
> Perhaps my best bet would be to keep the previous config file around,
> then to step through the relevant sections and remove that config from
> xorp, then switch to the new file and add that config to xorp?

If xorpsh works according to design (and likely it does not in all cases),
you *should* be able to remove everything, re-add everything you want, and
then commit.  Xorpsh would then make the appropriate changes.  It has the
logic to (attempt to) make the minimal set of changes for you.

Getting this working makes xorp much easier to automate, so I'm willing to
put some effort into fixing any issues you find..but, I don't have an
over abundance of time, so no promises!

Thanks,
Ben

>
> Thanks,
> Jeff


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



More information about the Xorp-users mailing list