[Xorp-hackers] transaction fix for nodes shared across modules

Pavlin Radoslavov pavlin at icir.org
Thu Jun 1 14:00:06 PDT 2006


> If a user creates an interface (with vrrp):
> 
> >create interfaces ethernet eth0 vrrp virtual-address 1.1.1.1
> 
> So that that both the modules interfaces and rl_interfaces are
> created. Both these modules specify transactions, and within the
> context of the ethernet node the transactions look like:
> 
> start_transaction (interfaces)
> restore-original-config-on-shutdown
> commit_transaction (interfaces)
> 
> start_transaction (rl_interfaces)
> create_interface
> set_interface_enabled
> create_vif
> set_vif_enabled
> commit_transaction (rl_interfaces)

With your modification, what is the ordering of the XRLs. Is it
something like the following:

====
start_transaction (interfaces)
restore-original-config-on-shutdown

start_transaction (rl_interfaces)
create_interface
set_interface_enabled
create_vif
set_vif_enabled
commit_transaction (rl_interfaces)

commit_transaction (interfaces)
====

If the %modinfo definitions are nested, then I believe the
start/commit transactions should also be nested.
BTW, I believe originally the %modinfo definitions were not designed
to be nested, so I am not surprised that the XRL order is not as
expected.

> The problem above is that the XRL's between the rl_interfaces
> transaction are meant to be sandwiched between the interfaces
> transaction--when executing the create_interfaces the rtrmgr
> generates an error stating the TID is incorrect.
> 
> 
> If the rl_module creation is moved to another (subnode for
> instance), then the interface transaction proceeds correctly.

Are you saying that if the %modinfo declaration for the nested
rl_interfaces module is moved to one of the "ethernet" children
nodes, then the
start_transaction(rl_interfaces)/commit_transaction(rl_interfaces)
is nested within
start_transaction(interfaces)/commit_transaction(interfaces) even
without your modification?

> The problem is when there are multiple transactions (which are
> caused by having more than one module transaction on the same
> node) on the same node. Note that loading order of the template
> file alters this behavior (if rl_interfaces.tp were changed to
> a_interfaces.tp--the transaction structure above would be
> different).

I am confused here. Are you saying that if the template file
ordering was changed, then the XRL ordering for the nested
transaction would be different? Is this true with or without your
modifications?
In any case, can you list the result XRL order.

Thanks,
Pavlin



More information about the Xorp-hackers mailing list