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

Michael Larson mike at vyatta.com
Thu Jun 1 12:34:01 PDT 2006


Pavlin,

I've attached the two template files that we are using here that demonstrate the problem (and some additional information the problematic behavior).

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)

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.

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). 

Mike

----- Original Message -----
From: Pavlin Radoslavov <pavlin at icir.org>
To: Michael Larson <mike at vyatta.com>
Cc: xorp-hackers at icir.org
Sent: Thursday, June 1, 2006 11:46:13 AM GMT-0800
Subject: Re: [Xorp-hackers] transaction fix for nodes shared across modules

> I've attached a diff file that fixes a problem in the rtrmgr when
> more than one module is assigned (via modinfo) on a common
> node. Xorp only allows a single transaction to be assigned per
> module/node and therefore when more than one module is assigned
> transactions will be grouped once on the last loaded module.
> 
> The fix is the assign actions to transactions based on the module
> and not on the module assigned to the node. This approach allows
> for multiple transactions to execute within the context of the
> same node (on different modules). The following files where
> changed:
> 
> M      master_template_tree_node.cc
> M      module_command.cc
> M      template_commands.cc
> M      module_command.hh
> M      template_commands.h
> 
> The module assignment is stored per action and not per node in
> these changes. The majority of the changes are in passing the
> additional argument.

Mike,

Could you send a short sample template file with a brief description
of how the semantics have changed, so it would be easier to
understand the original issue.

Thanks,
Pavlin

_______________________________________________
Xorp-hackers mailing list
Xorp-hackers at icir.org
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interfaces.tp
Type: application/octet-stream
Size: 25574 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20060601/63904bd5/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rl_interfaces.tp
Type: application/octet-stream
Size: 5062 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20060601/63904bd5/attachment-0003.obj 


More information about the Xorp-hackers mailing list