[Xorp-users] xorpsh load command

Arsi Antila bbb999 at zerodistance.fi
Wed Jan 16 03:20:40 PST 2008


On Wed, Jan 09, 2008 at 11:05:27AM -0800, Pavlin Radoslavov wrote:
> Arsi Antila <bbb999 at zerodistance.fi> wrote:
> 
> > On Wed, Jan 09, 2008 at 06:53:27AM -0800, Pavlin Radoslavov wrote:
> > > Arsi Antila <bbb999 at zerodistance.fi> wrote:
> > > 
> > > > Xorpsh load command does not seem to work in all situations.
> > > > 
> > > > If I start XORP with xorp1.conf shown below, and then try to load
> > > > xorp2.conf by using the load command in xorpsh, the following error
> > > > message is shown:
> > > > 
> > > > [ 2008/01/09 12:05:14  WARNING xorp_policy:5327 XrlPolicyTarget +360 
> > > > policy_base.cc handle_policy_0_1_delete_policy ] Handling method for 
> > > > policy/0.1/delete_policy failed: XrlCmdError 102 Command failed delete_policy: 
> > > > DependancyError from line 154 of dependancy.hh: Dependency remove: Object test 
> > > > in use by: bgp
> > > > [ 2008/01/09 12:05:14  ERROR xorp_rtrmgr:5324 RTRMGR +675 
> > > > master_conf_tree.
> > > > cc commit_pass2_done ] Commit failed: 102 Command failed delete_policy: 
> > > > DependancyError from line 154 of dependancy.hh: Dependency remove: Object 
> > > > test in use by: bgp
> > > > ERROR: Load failed.
> > > > 102 Command failed delete_policy: DependancyError from line 154 of 
> > > > dependancy.hh: Dependency remove: Object test in use by: bgp [edit]
> > > > 
> > > > 
> > > > If I start XORP with xorp2.conf as parameter, and then load
> > > > xorp1.conf by using xorpsh, it works OK.
> > > > 
> > > > Is there a way to change from xorp1.conf to xorp2.conf without
> > > > restarting XORP? Even some kind of workaround would be OK. I am using
> > > > Linux, XORP 1.4.
> > > 
> > > The problem is that in xorp1.conf inside the "bgp" config there
> > > is [export: "test"] statement. During the loading of xorp2.conf, the
> > > first processed configuration delta is the deletion of the policy
> > > statement, but from policy manager perspective it is still in use by
> > > BGP, hence the above error.
> > > 
> > > The work-around would be to delete first [export: "test"] inside
> > > bgp, commit the change, and then load xorp2.conf.
> > > 
> > 
> > Would that be a generic solution to the problem of changing from
> > arbitrary configuration A to configuration B at run time? If I have a
> > script which first deletes all policies, and then issues a load command,
> > is there something that would prevent it from working in all situations?
> > If both configurations A and B had restrictive policies, it would seem
> > that there would be no policy rules in use for a few seconds during the
> > transformation from A to B.
> 
> The issue I described applies to all cases if the to-be-deleted
> policies are referred by other part of the current configuration
> (which typically is being exported or imported by some protocol).
> In all such cases you have to apply the same solution:
> delete first the export/import policy statement in the protocols,
> commit, and then delete the previously used policy (or load new
> configuration).
> 
> Adding new policies or deleting policies that are not
> exported/imported shouldn't trigger this issue.
> FYI, loading new configuration is basically performing delta between
> the two configurations, and then deleting/adding the deltas.

I have experimented switching between different configurations by using
the xorpsh load command. It seems to work OK, but I found one situation
which produces an error message. This happens when I try to convert OSPF
link type from broadcast to p2p, as described below.

Start XORP with 'test_no_p2p_xorp.conf' as parameter.

Use xorpsh load command with 'test_p2p_xorp.conf' as parameter.

This results in an error message: 

root at sisa4a# load test_p2p_xorp.conf
[ 2008/01/16 11:15:54  ERROR xorp_ospfv2:4825 OSPF +936 peer.cc
add_neighbour ]
Neighbour exists Address: 12.4.0.1RouterID: 12.4.0.1
[ 2008/01/16 11:15:54  WARNING xorp_ospfv2:4825 XrlOspfv2Target +604
ospfv2_base.cc handle_ospfv2_0_1_add_neighbour ] Handling method for
ospfv2/0.1/add_neighbour failed:
 XrlCmdError 102 Command failed Failed to add neighbour 12.4.0.1
[ 2008/01/16 11:15:54  ERROR xorp_rtrmgr:4821 RTRMGR +675
master_conf_tree.cc commit_pass2_done ] Commit failed: 102 
Command failed Failed to add neighbour 12.4.0.1
ERROR: Load failed.
102 Command failed Failed to add neighbour 12.4.0.1[edit]




------- test_no_p2p_xorp.conf -----------

interfaces {
  restore-original-config-on-shutdown: false
  interface eth0 {
    default-system-config
  }
}
protocols {
  ospf4 {
    router-id: 12.4.0.2
    area 0.0.0.0 {
      interface eth0 {
        vif eth0 {
          address 12.4.0.2 {
          }
        }
      }
    }
  }
}


-------- test_p2p_xorp.conf ----------

interfaces {
  restore-original-config-on-shutdown: false
  interface eth0 {
    default-system-config
  }
}
protocols {
  ospf4 {
    router-id: 12.4.0.2
    area 0.0.0.0 {
      interface eth0 {
        link-type: "p2p"
        vif eth0 {
          address 12.4.0.2 {
            neighbor 12.4.0.1 {
              router-id: 12.4.0.1
            }
          }
        }
      }
    }
  }
}



More information about the Xorp-users mailing list